Ignore:
Timestamp:
Feb 15, 2001, 6:58:16 PM (25 years ago)
Author:
ansari
Message:

Ajout documentation - Reza 15/2/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/fftservintf.cc

    r1402 r1405  
    66  \ingroup NTools
    77  Defines the interface for FFT (Fast Fourier Transform) operations.
     8  Definitions :
     9    - Sampling period \b T
     10    - Sampling frequency \b fs=1/T
     11    - Total number of samples \b N
     12    - Frequency step in Fourier space \b =fs/N=1/(N*T)
     13    - Component frequencies
     14        - k=0      ->  0
     15        - k=1      ->  1/(N*T)
     16        - k        ->  k/(N*T)
     17        - k=N/2    ->  1/(2*T)   (Nyquist frequency)
     18        - k>N/2    ->  k/(N*T)   (or negative frequency -(N-k)/(N*T))
     19
     20  For a sampling period T=1, the computed Fourier components correspond to :
     21  \verbatim
     22  0  1/N  2/N  ... 1/2  1/2+1/N  1/2+2/N ... 1-2/N  1-1/N
     23  0  1/N  2/N  ... 1/2                   ...  -2/N   -1/N
     24  \endverbatim
     25
     26  For complex one-dimensional transforms:
     27  \f[
     28  out(i) = F_{norm} \Sigma_{j} \ e^{-2 \pi \sqrt{-1} \ i \  j} \ {\rm (forward)}
     29  \f]
     30  \f[
     31  out(i) = F_{norm} \Sigma_{j} \ e^{2 \pi \sqrt{-1} \ i \  j} \ {\rm (backward)}
     32  \f]
     33  i,j= 0..N-1 , where N is the input or the output array size.
     34
     35  For complex multi-dimensional transforms:
     36  \f[
     37  out(i1,i2,...,id) = F_{norm} \Sigma_{j1} \Sigma_{j2} ... \Sigma_{jd} \
     38  e^{-2 \pi \sqrt{-1} \ i1 \ j1} ... e^{-2 \pi \sqrt{-1} \ id \ jd} \ {\rm (forward)}
     39  \f]
     40  \f[
     41  out(i1,i2,...,id) = F_{norm} \Sigma_{j1} \Sigma_{j2} ... \Sigma_{jd} \
     42  e^{2 \pi \sqrt{-1} \ i1 \ j1} ... e^{2 \pi \sqrt{-1} \ id \ jd} \ {\rm (backward)}
     43  \f]
     44
     45  For real forward transforms, the input array is real, and
     46  the output array complex, with Fourier components up to k=N/2.
     47  For real backward transforms, the input array is complex and
     48  the output array is real.
    849*/
    950
     
    2364
    2465/* --Methode-- */
     66//! Forward Fourier transform for double precision complex data
     67/*!
     68  \param in : Input complex array
     69  \param out : Output complex array
     70 */
    2571void FFTServerInterface::FFTForward(TArray< complex<r_8> > const &, TArray< complex<r_8> > &)
    2672{
     
    2975
    3076/* --Methode-- */
     77//! Backward (inverse) Fourier transform for double precision complex data
     78/*!
     79  \param in : Input complex array
     80  \param out : Output complex array
     81 */
    3182void FFTServerInterface::FFTBackward(TArray< complex<r_8> > const &, TArray< complex<r_8> > &)
    3283{
     
    3586
    3687/* --Methode-- */
     88//! Forward Fourier transform for double precision real input data
     89/*!
     90  \param in : Input real array
     91  \param out : Output complex array
     92 */
    3793void FFTServerInterface::FFTForward(TArray< r_8 > const &, TArray< complex<r_8> > &)
    3894{
     
    4197
    4298/* --Methode-- */
     99//! Backward (inverse) Fourier transform for double precision real output data
     100/*!
     101  \param in : Input complex array
     102  \param out : Output real array
     103  \param usoutsz : if true, use the output array size for computing the inverse FFT.
     104 */
    43105void FFTServerInterface::FFTBackward(TArray< complex<r_8> > const &, TArray< r_8 > &, bool)
    44106{
     
    50112
    51113/* --Methode-- */
     114//! Forward Fourier transform for complex data
     115/*!
     116  \param in : Input complex array
     117  \param out : Output complex array
     118 */
    52119void FFTServerInterface::FFTForward(TArray< complex<r_4> > const &, TArray< complex<r_4> > &)
    53120{
     
    56123
    57124/* --Methode-- */
     125//! Backward (inverse) Fourier transform for complex data
     126/*!
     127  \param in : Input complex array
     128  \param out : Output complex array
     129 */
    58130void FFTServerInterface::FFTBackward(TArray< complex<r_4> > const &, TArray< complex<r_4> > &)
    59131{
     
    62134
    63135/* --Methode-- */
     136//! Forward Fourier transform for real input data
     137/*!
     138  \param in : Input real array
     139  \param out : Output complex array
     140 */
    64141void FFTServerInterface::FFTForward(TArray< r_4 > const &, TArray< complex<r_4> > &)
    65142{
     
    68145
    69146/* --Methode-- */
     147//! Backward (inverse) Fourier transform for real output data
     148/*!
     149  \param in : Input complex array
     150  \param out : Output real array
     151  \param usoutsz : if true, use the output array size for computing the inverse FFT.
     152 */
    70153void FFTServerInterface::FFTBackward(TArray< complex<r_4> > const &, TArray< r_4 > &, bool)
    71154{
     
    76159
    77160/* --Methode-- */
     161/*!
     162  \class SOPHYA::FFTArrayChecker
     163  \ingroup NTools
     164  Service class for checking array size and resizing output arrays,
     165  to be used by FFTServer classes
     166*/
     167
    78168template <class T>
    79169FFTArrayChecker<T>::FFTArrayChecker(string msg, bool checkpack, bool onedonly)
Note: See TracChangeset for help on using the changeset viewer.