fft
index


Fast Fourier Transform module - wrapper for FFTPACK
 
The following functions are defined
 
  
  fft(v)      - return the complex FFT of v
  fft_inv(v)  - return the complex inverse FFT of
  
  rfft(v)     - return the real FFT of v
  rfft_inv(v) - return the real inverse FFT of v
  
These functions call methods of the following objects default_fft
and default_rfft, which are instances of FFT_CLASS and RFFT_CLASS
classes, respectively. Initialization for a particular length fft is
performed when a different size sequence v is supplied. If taking FFTs
of sequences with differing sizes, instantiate separate FFT_CLASS
objects for each size. The transforms are not normalized. To obtain a
normalized transform the output must be divided by len(v).
 
The algorithms used are:
 
N=len(v)
 
--> forward complex transform 
 
      for j=0,...,N-1
 
             c[j]=the sum from k=0,...,N-1 of
 
                   v[k]*exp(-i*j*k*2*pi/N)
 
                         where i=sqrt(-1)
 
--> inverse complex transform 
 
      for j=0,...,N-1
 
             c[j]=the sum from k=0,...,N-1 of
 
                   v[k]*exp(i*j*k*2*pi/N)
 
                         where i=sqrt(-1)
 
--> forward real transform 
 
      r[0] = the sum from n=0 to n=N-1 of v[n]
 
          if N is even set L = N/2-1   , if N is odd set L = (N-1)/2
 
            then for m = 1,...,L
 
               r[2*m-1] = the sum from n = 0 to n = N-1 of
 
                    v[n]*cos(m*n*2*pi/N)
 
               r[2*m] = the sum from n = 1 to n = N-1 of
 
                   -v[n]*sin(m*n*2*pi/N)
 
          if N is even
 
               r[N-1] = the sum from n = 0 to n = N-1 of
 
                    (-1)**(n)*v[n]
 
 
--> inverse real transform 
 
         for N even and for n = 0,...,N-1
 
               r[n] = v[0]+(-1)**(N-1)*v[N-1]
 
                    plus the sum from m=1 to m=N/2-1 of
 
                     2.*v[2*m-1]*cos(m*n*2*pi/N)
 
                    -2.*v[2*m  ]*sin(m*n*2*pi/N)
 
          for N odd and for n = 0,...,N-1
 
               r[n] = v[0] plus the sum from m=1 to m=(N-1)/2 of
 
                    2.*v[2*m-1]*cos(m*n*2*pi/N)
 
                   -2.*v[2*m  ]*sin(m*n*2*pi/N)
 
 
 
 
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

 
Classes
       
builtins.object
FFT_FLOATTYPE
RFFT_FLOATTYPE

 
FFT = class FFT_FLOATTYPE(builtins.object)
    FFT(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
fft(self, *args, **kwargs) -> 'CDSVector< CDS::Complex< double > >'
fft_inv(self, *args, **kwargs) -> 'CDSVector< CDS::Complex< double > >'
resize(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_FFT_FLOATTYPE(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class FFT_FLOATTYPE(builtins.object)
    FFT_FLOATTYPE(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
fft(self, *args, **kwargs) -> 'CDSVector< CDS::Complex< double > >'
fft_inv(self, *args, **kwargs) -> 'CDSVector< CDS::Complex< double > >'
resize(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_FFT_FLOATTYPE(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
RFFT = class RFFT_FLOATTYPE(builtins.object)
    RFFT(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
fft(self, *args, **kwargs) -> 'CDSVector< double >'
fft_inv(self, *args, **kwargs) -> 'CDSVector< double >'
resize(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_RFFT_FLOATTYPE(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class RFFT_FLOATTYPE(builtins.object)
    RFFT_FLOATTYPE(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
fft(self, *args, **kwargs) -> 'CDSVector< double >'
fft_inv(self, *args, **kwargs) -> 'CDSVector< double >'
resize(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_RFFT_FLOATTYPE(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
Functions
       
fft(*args, **kwargs) -> 'CDSVector< CDS::Complex< double > >' method of FFT_FLOATTYPE instance
fft_inv(*args, **kwargs) -> 'CDSVector< CDS::Complex< double > >' method of FFT_FLOATTYPE instance
omp_get_max_threads() -> 'int'
omp_get_thread_num() -> 'int'
pyXplorHelp(*args) -> 'String'
rfft = fft(*args, **kwargs) -> 'CDSVector< double >' method of RFFT_FLOATTYPE instance
rfft_inv = fft_inv(*args, **kwargs) -> 'CDSVector< double >' method of RFFT_FLOATTYPE instance

 
Data
        FALSE = 0
PI = 3.141592653589793
TRUE = 1
__sthead_hh__ = 1
default_fft = <fft.FFT_FLOATTYPE; proxy of <Swig Object of type 'CDS::FFT< float_type > *' at 0x7f2afd983510> >
default_rfft = <fft.RFFT_FLOATTYPE; proxy of <Swig Object of type 'CDS::RFFT< float_type > *' at 0x7f2afd982190> >