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 | ||||||||||||||||||||||||||||||||||
|
Functions | ||
|
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 0x7f4945ae17a0> > default_rfft = <fft.RFFT_FLOATTYPE; proxy of <Swig Object of type 'CDS::RFFT< float_type > *' at 0x7f4945ae0c30> > |