functions in yeti_fftw.i -
cfftw
|
cfftw | |
SEE | fftw |
fftw
|
fftw(x, plan) -or- cfftw(x, dir) Computes the fast Fourier transform of X with the "fastest Fourier transform in the West". The fftw function makes use of PLAN that has been created by fftw_plan (which see) and computes a real to complex or complex to real transform, if PLAN was created with keyword REAL set to true; otherwise, fftw computes a complex transform. The cfftw function always computes a complex transform and creates a temporary plan for the dimensions of X and FFT direction DIR (+/-1). If you want to compute seral FFT's of identical dimensions and directions, or if you want to compute real to complex (or complex to real) transforms, or if you want to use the "measure" strategy in defining FFTW plan, you should rather use fftw_plan and fftw. | |
SEE | ALSO, fftw_plan. |
fftw_convolve
|
fftw_convolve(orig, psf); -or- fftw_convolve(orig, psf, do_not_roll); Return discrete convolution (computed by FFTW) of array ORIG by point spread function PSF (ORIG and PSF must have same dimension list). Unless argument DO_NOT_ROLL is true, PSF is rolled before. Keywords FP and BP may be used to specify FFTW plans for the forward and/or backward transforms respectively (which must have been created with REAL set to true if and only if _both_ ORIG and PSF are real arrays). | |
SEE ALSO: | fftw, fftw_plan, roll |
fftw_dist
|
fftw_dist(dimlist); Returns Euclidian lenght of spatial frequencies in frequel units for a FFT of dimensions DIMLIST. If keyword NYQUIST is true, the frequel coordinates get rescaled so that the Nyquist frequency is equal to NYQUIST along every dimension. This is obtained by using coordinates: (2.0*NYQUIST/DIM(i))*fft_indgen(DIM(i)) along i-th dimension of lenght DIM(i). If keyword SQUARE is true, the square of the Euclidian norm is returned instead. If keyword HALF is true, the length is only computed for half of the spatial frequencies so that it can be used with a real to complex FFTW forward transform (the first dimension becomes DIM(1)/2 + 1). | |
SEE ALSO: | fftw, fftw_indgen |
fftw_indgen
|
fftw_indgen(len) Return FFT frequencies along a dimension of length LEN. | |
SEE ALSO: | indgen, span, fftw_dist |
fftw_plan
|
fftw_plan(dimlist, dir) Creates a plan for fast Fourier transforming by fftw (which see) of arrays of dimension list DIMLIST. DIR=+/-1 and has the same meaning as in fft (which see): DIR meaning 1-D discrete Fourier transform --- --------------------- ------------------------------ +1 "forward" transform sum_k x(k)*exp(-i*2*PI*k*l/N) -1 "backward" transform sum_k x(k)*exp(+i*2*PI*k*l/N) where i=sqrt(-1). Except when keyword REAL is true (se below), the name "forward" or "backward" is only a question of convention, only the sign of the complex exponent really matters. If keyword REAL is true, then the result is a plan for a real to complex transform if DIR=+1 ("forward") or for a complex to real transform if DIR=-1 ("backward"). The result of a real to complex transform contains only half of the complex DFT amplitudes (since the negative-frequency amplitudes for real data are the complex conjugate of the positive-frequency amplitudes). If the real array is N1xN2x...xNn then the result is a complex (N1/2 + 1)xN2x...xNn array. Reciprocally, the complex to real transform takes a (N1/2 + 1)xN2x...xNn complex input array to compute a N1xN2x...xNn real array. When the plan is created with REAL set to true, DIMS must be the dimension list of the real array and DIR must be +1 ("forward") for a real to complex transform and -1 ("backward") for a complex to real transform. If keyword MEASURE is true, then FFTW attempts to find the optimal plan by actually computing several FFT's and measuring their execution time. The default is to not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). Computing an efficient plan for FFTW (with keyword MEASURE set to true) may be very expensive. FFTW is therefore mostly advantageous when several FFT's of arrays with same dimension lists are to be computed; in this case the user should save the plan in a variable, e.g.: plan_for_x_and_dir = fftw_plan(dimsof(x), dir, measure=1); for (...) { ...; fft_of_x = fftw(x, plan_for_x_and_dir); ...; } instead of: for (...) { ...; fft_of_x = fftw(x, fftw_plan(dimsof(x), dir, measure=1)); ...; } However note that it is relatively inexpensive to compute a plan for the default strategy; therefore: for (...) { ...; fft_of_x = fftw(x, fftw_plan(dimsof(x), dir)); ...; } is not too inefficient (this is what does cfftw). | |
SEE | ALSO, fftw,, fft,, fft_setup. |
fftw_smooth
|
fftw_smooth(a, fwhm) Returns array A smoothed along all its dimensions by a discrete convolution by a gaussian with full width at half maximum equals to FWHM (in "pixel" units). Keywords FP and BP may be used to specify FFTW plans for the forward and/or backward transforms respectively (which must have been created with REAL set to true if and only if A is a real array). | |
SEE ALSO: | fftw, fftw_plan |