pulsarbat.readers.DADAStokesReader#
- class pulsarbat.readers.DADAStokesReader(name, /)[source]#
Reader for full Stokes data in DADA format.
- Parameters
- name
File name, filehandle, or sequence of file names to pass on to
baseband.open()to create a DADAStreamReader object via baseband.open(name, ‘rs’, format=’dada’).
Attributes
complex_dataWhether the data is complex-valued.
dtSample spacing (
1 / sample_rate).dtypeData-type of data.
intensityWhere the data is intensity data (as opposed to raw baseband).
lower_sidebandWhether data is lower sideband (LSB) data.
ndimNumber of dimensions in data.
real_basebandWhether the data is real-valued baseband data.
sample_rateSample rate of the signal data.
sample_shapeShape of a sample.
shapeShape of data.
start_timeTimestamp at first sample.
stop_timeTimestamp after last sample.
time_lengthLength of signal in time units.
Methods
contains(t, /)Whether time(s) are within the bounds of the signal.
dask_read(offset, n, /, **kwargs)Read n samples from given offset using Dask arrays.
offset_at(t, /)Returns nearest integer offset at given time.
read(offset, n, /, **kwargs)Read n samples from given offset.
time_at(offset, /[, unit])Returns time at given offset.
- contains(t, /)#
Whether time(s) are within the bounds of the signal.
- dask_read(offset, n, /, **kwargs)#
Read n samples from given offset using Dask arrays.
A convenience method equivalent to the
read()method withuse_dask=True.
- offset_at(t, /)#
Returns nearest integer offset at given time.
- read(offset, n, /, **kwargs)#
Read n samples from given offset.
- Parameters
- offset
int Position to read from. Must be non-negative.
- n
int Number of samples to read. Must be non-negative.
- **kwargs
Currently supported keyword arguments:
use_dask– Whether to use dask arrays.chunks– Chunk sizes if using dask arrays. By default, there is no chunking along the zeroth dimension.lock– A lock object to prevent concurrent reads. Must be a context manager.
- offset
- Returns
SignalSignal of length n containing data that was read.
- time_at(offset, /, unit=None)#
Returns time at given offset.
- Parameters
- Returns