sigpyproc.block
sigpyproc.block¶
- class sigpyproc.block.FilterbankBlock(input_array, header, dm=0)¶
Bases:
numpy.ndarrayAn array class to handle a discrete block of data in time-major order.
- Parameters
- Returns
2 dimensional array of shape (nchans, nsamples) with header metadata
- Return type
Notes
Data is converted to 32 bits regardless of original type.
- downsample(tfactor=1, ffactor=1)¶
Downsample data block in frequency and/or time.
- Parameters
- Returns
2 dimensional array of downsampled data
- Return type
- Raises
ValueError – If number of channels is not divisible by ffactor.
- normalise(by='mean', chans=True)¶
Normalise the data block (Subtract mean/median, divide by std).
- Parameters
- Returns
A normalised version of the data block
- Return type
- get_tim()¶
Sum across all frequencies for each time sample.
- Returns
Sum of all channels as timeseries
- Return type
- get_bandpass()¶
Average across each time sample for all frequencies.
- Returns
the bandpass of the data
- Return type
- dedisperse(dm, only_valid_samples=False)¶
Dedisperse the block.
- Parameters
- Returns
a dedispersed version of the block
- Return type
- Raises
ValueError – If there are not enough time samples to dedisperse.
Notes
Frequency dependent delays are applied as rotations to each channel in the block.