Package fftw3 :: Module planning :: Class Plan
[hide private]
[frames] | no frames]

Class Plan

source code

object --+
         |
        Plan

Object representing a fftw plan used to execute Fourier transforms in
fftw

Attributes:
    shape       --  the shape of the input and output arrays, i.e. the FFT
    flags       --  a list of the fft flags used in the planning
    direction   --  the direction of the FFT
    ndim        --  the dimensionality of the FFT
    inarray     --  the input array
    outarray    --  the output array
    

Instance Methods [hide private]
 
__init__(self, inarray=None, outarray=None, direction='forward', flags=['estimate'], realtypes=None, create_plan=True, nthreads=1)
Initialize the fftw plan.
source code
 
__set_shape(self, shape) source code
 
__get_shape(self) source code
 
create_plan(self, inarray, outarray)
Create the actual fftw-plan from inarray and outarray
source code
 
_get_parameter(self) source code
 
__call__(self)
Perform the Fourier transform outarray = fft(inarray) for the arrays given at plan creation
source code
 
execute(self)
Execute the fftw plan, i.e.
source code
 
__del__(self) source code
 
guru_execute_dft(self, inarray, outarray)
Guru interface: perform Fourier transform on two given arrays, outarray=fft(inarray).
source code
 
get_flops(self)
Return an exact count of the number of floating-point additions, multiplications, and fused multiply-add operations involved in the plan's execution.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  shape
  _as_parameter_

Inherited from object: __class__

Method Details [hide private]

__init__(self, inarray=None, outarray=None, direction='forward', flags=['estimate'], realtypes=None, create_plan=True, nthreads=1)
(Constructor)

source code 
Initialize the fftw plan. 
Parameters:
    inarray     --  array to be transformed (default=None)
    outarray    --  array to contain the Fourier transform
                    (default=None)
    If one of the arrays is None, the fft is considered to be
    an inplace transform.

    direction   --  direction of the Fourier transform, forward
                    or backward (default='forward')
    flags       --  list of fftw-flags to be used in planning
                    (default=['estimate'])
    realtypes   --  list of fft-types for real-to-real ffts, this
                    needs to be given if both input and output
                    arrays are real (default=None)
    create_plan --  weather to actually create the plan (default=True)
    nthreads    --  number of threads to be used by the plan,
                    available only for threaded libraries (default=1)
    

Overrides: object.__init__

execute(self)

source code 

Execute the fftw plan, i.e. perform the FFT outarray = fft(inarray) for the arrays given at plan creation

guru_execute_dft(self, inarray, outarray)

source code 

Guru interface: perform Fourier transform on two given arrays, outarray=fft(inarray). Important: This method 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 possibly python segfaulting

get_flops(self)

source code 

Return an exact count of the number of floating-point additions, multiplications, and fused multiply-add operations involved in the plan's execution. The total number of floating-point operations (flops) is add + mul + 2*fma, or add + mul + fma if the hardware supports fused multiply-add instructions (although the number of FMA operations is only approximate because of compiler voodoo).


Property Details [hide private]

shape

Get Method:
__get_shape(self)
Set Method:
__set_shape(self, shape)

_as_parameter_

Get Method:
_get_parameter(self)