Channelize

class baseband_tasks.channelize.Channelize(ih, n, samples_per_frame=1, frequency=None, sideband=None)[source] [edit on github]

Bases: baseband_tasks.base.TaskBase

Basic channelizer.

Divides input into blocks of n time samples, Fourier transforming each block. The output sample shape is (channel,) + ih.sample_shape.

Parameters
ihtask or baseband stream reader

Input data stream, with time as the first axis.

nint

Number of input samples to channelize. For complex input, output will have n channels; for real input, it will have n // 2 + 1.

samples_per_frameint, optional

Number of complete output samples per frame (see Notes). Default: 1.

frequencyQuantity, optional

Frequencies for each channel in ih (channelized frequencies will be calculated). Default: taken from ih (if available).

sidebandarray, optional

Whether frequencies in ih are upper (+1) or lower (-1) sideband. Default: taken from ih (if available).

See also

baseband_tasks.fourier.fft_maker

to select the FFT package used.

Notes

Instances initialize an FFT that acts upon axis 1 of an input with shape:

(samples_per_frame, n) + ih.sample_shape

Setting samples_per_frame to a number larger than 1 results in the FFT performing channelization on multiple blocks per call. Depending on the backend used, this may speed up sequential channelization, though for tests using numpy.fft the performance improvement seems to be negligible.

Methods Summary

inverse(ih)

Create a Dechannelize instance that undoes this Channelization.

task(data)

Methods Documentation

inverse(ih)[source] [edit on github]

Create a Dechannelize instance that undoes this Channelization.

Parameters
ihtask or baseband stream reader

Input data stream to be dechannelized.

task(data)[source] [edit on github]