NumpyFFTMaker

class baseband_tasks.fourier.NumpyFFTMaker[source] [edit on github]

Bases: baseband_tasks.fourier.base.FFTMakerBase

FFT factory class utilizing numpy.fft functions.

FFTs of real-valued time-domain data use rfft and its inverse. rfft performs a real-input transform on one dimension of the input, halving that dimension’s length in the output.

__call__ creates individual transforms.

Methods Summary

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

Creates an FFT.

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)[source] [edit on github]

Creates an FFT.

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
fftNumpyFFT instance

Single pre-defined FFT object.

get_frequency_data_info(shape, dtype, axis=0) [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.