README 4.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
/*! \file libfourier/README
 * \brief C++ library to operate on Fourier transforms (libfourierxx)
 *
 * ----------------------------------------------------------------------------
 *
 * $Id: README 3555 2010-12-11 16:46:58Z tforb $
 * 
 * Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) 
 * 
 * C++ library to operate on Fourier transforms (libfourierxx)
 * 
 * REVISIONS and CHANGES 
 *  - 02/10/2007   V1.0   Thomas Forbriger (started README)
 * 
 * ============================================================================
 */

/*! \mainpage

\author Thomas Forbriger
\since 2002
\date $Date: 2007-10-02 18:49:08 $
\version $Id: README 3555 2010-12-11 16:46:58Z tforb $

The library provides modules to perform Fourier transformations and to operate
on Fourier transforms.
An interface to FFTW is available.
Signal filters can be defined by their response spectrum and applied to a
Fourier transform.
libaff is used to store Fourier coefficients and time series samples.
Further stuff will be collected in this library in the future.
  
*/

/*======================================================================*/

/*! \page page_fftw3 Scaling of Fourier transform in FFTW3
 *
 * \section sec_fftw3_library Fourier transformation in the FFTW3 library
 *
 * The FFTW3 reference
 * http://www.fftw.org/fftw3_doc/The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#The-1d-Discrete-Fourier-Transform-_0028DFT_0029
 * tells:
 * \verbatim
 * 4.8.1 The 1d Discrete Fourier Transform (DFT)
 *
 * The forward (FFTW_FORWARD) discrete Fourier transform (DFT) of a 1d complex
 * array X of size n computes an array Y, where:
 *
 *   Y_k = sum_{j=0}^{n-1} X_j exp(-2i pi j k / n)
 * 
 * The backward (FFTW_BACKWARD) DFT computes:
 *
 *   X_k = sum_{j=0}^{n-1} Y_j exp(+2i pi j k / n)
 *
 * FFTW computes an unnormalized transform, in that there is no coefficient in
 * front of the summation in the DFT. In other words, applying the forward and
 * then the backward transform will multiply the input by n.
 *
 * From above, an FFTW_FORWARD transform corresponds to a sign of -1 in the
 * exponent of the DFT. Note also that we use the standard in-order output
 * orderingthe k-th output corresponds to the frequency k/n (or k/T, where T
 * is your total sampling period). For those who like to think in terms of
 * positive and negative frequencies, this means that the positive frequencies
 * are stored in the first half of the output and the negative frequencies are
 * stored in backwards order in the second half of the output. (The frequency
 * -k/n is the same as the frequency (n-k)/n.) 
 * \endverbatim
 *
 * The forward transform is:
 * \f[
 *   Y_k = \sum_{j=0}^{n-1} X_j e^{-i 2 \pi \frac{j k}{n}}
 * \f]
 *
 * The backward transform is:
 * \f[
 *   X_k = \sum_{j=0}^{n-1} Y_j e^{i 2 \pi \frac{j k}{n}}
 * \f]
 *
 * \section sec_fftw3_integral_transform Integral transform scaling
 *
 * The Fourier transform presented here is scaled to represent the Fourier
 * integral transform pair
 * \f[
 *   \tilde{s}(\omega) = \int\limits_{-\infty}^{+\infty}
 *     s(t)\,e^{-i\omega t}\frac{\textrm{d}\omega}{2\pi}
 *                     = \int\limits_{0}^{N\Delta t}
 *     s(t)\,e^{-i\omega t}\frac{\textrm{d}\omega}{2\pi}
 * \f]
 * with \f$s(t)=0\f$ for \f$t<0\f$ and \f$t>T=N\Delta t\f$
 * and
 * \f[
 *   s(t) = \int\limits_{-\infty}^{+\infty}
 *     \tilde{s}(\omega)\,e^{i\omega t}\,\textrm{d}t
 *        = \int\limits_{-\pi/(N\Delta t)}^{+\pi/(N\Delta t)}
 *     \tilde{s}(\omega)\,e^{i\omega t}\,\textrm{d}t
 * \f]
 * with \f$\tilde{s}(\omega)=0\f$
 * for \f$|\omega|>\pi/T=\pi/(N\Delta t)\f$.
 *
 * The FFTW3 transformation consequently has to be scaled according to
 * \f[
 *   Y_k = \sum_{j=0}^{N-1} X_j e^{-i 2 \pi \frac{j k}{N}} \Delta t
 * \f]
 * and
 * \f[
 *   X_k = \sum_{j=0}^{N-1} Y_j e^{i 2 \pi \frac{j k}{N}} \frac{1}{N\Delta t}
 * \f]
 *
 * Where \f$X_k=s(t=k\Delta t)\f$ is the time series
 * with \f$N\f$ samples at \f$\Delta t\f$ sampling interval.
 * \f$Y_k=\tilde{s}(\omega=k\Delta \omega)\f$ are samples of the Fourier
 * integral transform, where
 * \f$\Delta\omega=2\pi/T\f$ and \f$T=N\Delta t\f$.
 *
 */

// ----- END OF README -----