Package fftw3f :: Module planning
[hide private]
[frames] | no frames]

Module planning

source code

Classes [hide private]
  Plan
Object representing a fftw plan used to execute Fourier transforms in fftw
Functions [hide private]
 
create_aligned_array(shape, dtype=<type 'numpy.complex64'>, boundary=16)
Create an array which is aligned in memory
source code
 
execute(plan)
Execute fftw-plan, i.e.
source code
 
guru_execute_dft(plan, inarray, outarray)
Guru interface: perform Fourier transform on two arrays, outarray=fft(inarray) using the given plan.
source code
 
destroy_plan(plan)
Delete the given plan
source code
 
select(inarray, outarray)
From a given input and output np array select the appropriate fftw3 plan to create.
source code
 
_create_complex2real_plan(inarray, outarray, flags)
Internal function to create complex fft plan given an input and output np array and the direction and flags integers
source code
 
_create_complex_plan(inarray, outarray, direction, flags)
Internal function to create complex fft plan given an input and output np array and the direction and flags integers
source code
 
_create_real_plan(inarray, outarray, realtype, flags)
Internal function to create real fft plan given an input and output np array and the realtype and flags integers
source code
 
_create_plan(inarray, outarray, direction='forward', flags=['estimate'], realtypes=None, nthreads=1)
Internal function to create a complex fft plan given an input and output np array and the direction and flags integers
source code
 
_cal_flag_value(flags)
Calculate the integer flag value from a list of string flags
source code
 
print_plan(plan)
Print a nerd-readable version of the plan to stdout
source code
 
fprint_plan(plan, filename)
Print a nerd-readable version of the plan to the given filename
source code
Variables [hide private]
  fftw_flags = {'conserve memory': 4, 'destroy input': 1, 'estim...
  realfft_type = {'discrete hartley': 2, 'halfcomplex c2r': 1, '...
  fft_direction = {'backward': 1, 'forward': -1}
  __package__ = 'fftw3f'
Function Details [hide private]

create_aligned_array(shape, dtype=<type 'numpy.complex64'>, boundary=16)

source code 
Create an array which is aligned in memory

Parameters:
    shape       --  the shape of the array 
    dtype       --  the dtype of the array (default=typeDict['singlecomplex'])
    boundary    --  the byte boundary to align to (default=16)

execute(plan)

source code 

Execute fftw-plan, i.e. perform Fourier transform on the arrays given when the plan was created

guru_execute_dft(plan, inarray, outarray)

source code 

Guru interface: perform Fourier transform on two arrays, outarray=fft(inarray) using the given plan. Important: This function does not perform any checks on the array shape and alignment for performance reasons. It is therefore crucial to only provide arrays with the same shape, dtype and alignment as the arrays used for planning, failure to do so can lead to unexpected behaviour and even python segfaulting.


Variables Details [hide private]

fftw_flags

Value:
{'conserve memory': 4,
 'destroy input': 1,
 'estimate': 64,
 'exhaustive': 8,
 'measure': 0,
 'patient': 32,
 'preserve input': 16,
 'unaligned': 2}

realfft_type

Value:
{'discrete hartley': 2,
 'halfcomplex c2r': 1,
 'halfcomplex r2c': 0,
 'realeven 00': 3,
 'realeven 01': 4,
 'realeven 10': 5,
 'realeven 11': 6,
 'realodd 00': 7,
...