sigpyproc.block#
- class sigpyproc.block.FilterbankBlock(input_array, header, dm=0)#
Bases:
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.
ValueError – If number of time samples is not divisible by tfactor.
- 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, ref_freq='ch1')#
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 with respect to the reference frequency.
- dmt_transform(dm, dmsteps=512, ref_freq='ch1')#
Generate a DM-time transform of the data block by dedispersing at adjacent DM values.
- Parameters:
- Returns:
2 dimensional array of DM-time transform
- Return type: