FFTMakerBase

class baseband_tasks.fourier.base.FFTMakerBase[source] [edit on github]

Bases: object

Base class for all FFT factories.

Methods Summary

__call__(shape, dtype[, direction, axis, ...])

Create an FFT instance.

get_frequency_data_info(shape, dtype[, axis])

Determine frequency-domain array shape and dtype.

Methods Documentation

__call__(shape, dtype, direction='forward', axis=0, ortho=False, sample_rate=None, **kwargs)[source] [edit on github]

Create an FFT instance.

This method should generally by overridden by subclasses.

Parameters
shapetuple

Shape of the time-domain data array, i.e. the input to the forward transform and the output of the inverse.

dtypestr or dtype

Data type of the time-domain data array. May pass either the name of the dtype or the dtype object.

direction‘forward’ or ‘backward’, optional

Direction of the FFT.

axisint, optional

Axis to transform. Default: 0.

orthobool, optional

Whether to use orthogonal normalization. Default: False.

sample_ratefloat, Quantity, or None, optional

Sample rate, used to determine the FFT sample frequencies. If None, a unitless rate of 1 is used.

Returns
fftcls._FFTBase instance

Single pre-defined FFT object.

get_frequency_data_info(shape, dtype, axis=0)[source] [edit on github]

Determine frequency-domain array shape and dtype.

Parameters
shapetuple

Shape of the time-domain data array, i.e. the input to the forward transform and the output of the inverse.

dtypestr or dtype

Data type of the time-domain data array. May pass either the name of the dtype or the dtype object.

axisint, optional

Axis of transform. Default: 0.

Returns
frequency_shapetuple

Shape of the frequency-domain data array.

frequency_dtypedtype

Data type of the frequency-domain data array.