DiscreteFourierTransformBase

class odl.trafos.fourier.DiscreteFourierTransformBase(*args, **kwargs)[source]

Bases: odl.operator.operator.Operator

Base class for discrete fourier transform classes.

Attributes
adjoint

Adjoint transform, equal to the inverse.

axes

Axes along the FT is calculated by this operator.

domain

Set of objects on which this operator can be evaluated.

halfcomplex

Return True if the last transform axis is halved.

impl

Backend for the FFT implementation.

inverse

Inverse Fourier transform.

is_functional

True if this operator’s range is a Field.

is_linear

True if this operator is linear.

range

Set in which the result of an evaluation of this operator lies.

sign

Sign of the complex exponent in the transform.

Methods

_call(self, x, out, \*\*kwargs)

Implement self(x, out[, **kwargs]).

clear_fftw_plan(self)

Delete the FFTW plan of this transform.

derivative(self, point)

Return the operator derivative at point.

init_fftw_plan(self[, planning_effort])

Initialize the FFTW plan for this transform for later use.

norm(self[, estimate])

Return the operator norm of this operator.

__init__(self, inverse, domain, range=None, axes=None, sign='-', halfcomplex=False, impl=None)[source]

Initialize a new instance.

All parameters are given according to the specifics of the forward transform. The inverse parameter is used to control conversions for the inverse transform.

Parameters
inversebool

If True, the inverse transform is created, otherwise the forward transform.

domainDiscretizedSpace

Domain of the Fourier transform. If its DiscretizedSpace.exponent is equal to 2.0, this operator has an adjoint which is equal to the inverse.

rangeDiscretizedSpace, optional

Range of the Fourier transform. If not given, the range is determined from domain and the other parameters as a uniform_discr with exponent unit cell size and exponent p / (p - 1) (read as ‘inf’ for p=1 and 1 for p=’inf’).

axesint or sequence of ints, optional

Dimensions in which a transform is to be calculated. None means all axes.

sign{‘-‘, ‘+’}, optional

Sign of the complex exponent.

halfcomplexbool, optional

If True, calculate only the negative frequency part along the last axis in axes for real input. This reduces the size of the range to floor(N[i]/2) + 1 in this axis i, where N is the shape of the input arrays. Otherwise, calculate the full complex FFT. If dom_dtype is a complex type, this option has no effect.

impl{‘numpy’, ‘pyfftw’, None}, optional

Backend for the FFT implementation. The ‘pyfftw’ backend is faster but requires the pyfftw package. None selects the fastest available backend.