r3963 - trunk/bse
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r3963 - trunk/bse
- Date: Thu, 12 Oct 2006 11:17:03 -0400 (EDT)
Author: stw
Date: 2006-10-12 11:16:01 -0400 (Thu, 12 Oct 2006)
New Revision: 3963
Modified:
trunk/bse/ChangeLog
trunk/bse/gslfft.h
Log:
Thu Oct 12 16:54:42 2006 Stefan Westerfeld <stefan space twc de>
* gslfft.h: Improved documentation on FFT normalization.
Modified: trunk/bse/ChangeLog
===================================================================
--- trunk/bse/ChangeLog 2006-10-12 11:27:58 UTC (rev 3962)
+++ trunk/bse/ChangeLog 2006-10-12 15:16:01 UTC (rev 3963)
@@ -1,3 +1,7 @@
+Thu Oct 12 16:54:42 2006 Stefan Westerfeld <stefan space twc de>
+
+ * gslfft.h: Improved documentation on FFT normalization.
+
Thu Oct 12 13:25:38 2006 Stefan Westerfeld <stefan space twc de>
* bseiirfilter.c: Added some comments.
Modified: trunk/bse/gslfft.h
===================================================================
--- trunk/bse/gslfft.h 2006-10-12 11:27:58 UTC (rev 3962)
+++ trunk/bse/gslfft.h 2006-10-12 15:16:01 UTC (rev 3963)
@@ -42,6 +42,18 @@
* frequency K/n_values. (If you want to interpret negative frequencies,
* note that the frequencies -K/n_values and (n_values-K)/n_values are
* equivalent).
+ *
+ * In general for the gsl_power2_fft*() family of functions, normalization is
+ * only performed during backward transform. However, a popular mathematical
+ * strategy of defining the FFT and IFFT in a way that the formulas are
+ * symmetric is normalizing both, the forward and backward transform with
+ * 1/sqrt(N) - where N is the number of complex values (n_values).
+ *
+ * Compared to the above definition, in this implementation, the analyzed
+ * values produced by gsl_power2_fftac()/gsl_power2_fftar() will be too large
+ * by a factor of sqrt(N), which however are cancelled out on the backward
+ * transform.
+ *
* Note that the transformation is performed out of place, the input
* array is not modified, and may not overlap with the output array.
*/
@@ -60,9 +72,13 @@
* array which is transformed into the frequency domain with
* gsl_power2_fftac() can be reconstructed by issuing gsl_power2_fftsc()
* on the transform.
+ *
* This function also scales the time domain coefficients by a
* factor of 1.0/n_values which is required for perfect reconstruction
- * of time domain data formerly transoformed via gsl_power2_fftac().
+ * of time domain data formerly transformed via gsl_power2_fftac().
+ * More details on normalization can be found in the documentation of
+ * gsl_power2_fftac().
+ *
* Note that the transformation is performed out of place, the input
* array is not modified, and may not overlap with the output array.
*/
@@ -88,6 +104,11 @@
* H(n_values/2) is stored in ri_values_out[1] (the imaginery part of
* H(0)), so that both arrays r_values_in and ri_values_out can be of
* size n_values.
+ *
+ * The normalization of the results of the analysis is explained in
+ * gsl_power2_fftac(). Note that in the real valued case, the number of
+ * complex values N for normalization is n_values/2.
+ *
* Note that the transformation is performed out of place, the input
* array is not modified, and may not overlap with the output array.
*/
@@ -104,9 +125,14 @@
* gsl_power2_fftar(), using the same frequency storage format.
* A real valued data set transformed into the frequency domain
* with gsl_power2_fftar() can be reconstructed using this function.
+ *
* This function also scales the time domain coefficients by a
- * factor of 1.0/n_values which is required for perfect reconstruction
- * of time domain data formerly transformed via gsl_power2_fftar().
+ * factor of 1.0/(n_values/2) which is required for perfect
+ * reconstruction of time domain data formerly transformed via
+ * gsl_power2_fftar().
+ * More details on normalization can be found in the documentation of
+ * gsl_power2_fftac().
+ *
* Note that the transformation is performed out of place, the input
* array is not modified, and may not overlap with the output array.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]