DADAStreamBase¶
-
class
baseband.dada.base.
DADAStreamBase
(fh_raw, header0, squeeze=True, subset=(), verify=True)[source] [edit on github]¶ Bases:
baseband.vlbi_base.base.VLBIStreamBase
Base for DADA streams.
Attributes Summary
bps
Bits per elementary sample. complex_data
Whether the data are complex. header0
First header of the file. sample_rate
Number of complete samples per second. sample_shape
Shape of a complete sample (possibly subset or squeezed). samples_per_frame
Number of complete samples per frame. squeeze
Whether data arrays have dimensions with length unity removed. start_time
Start time of the file. subset
Specific components of the complete sample to decode. time
Time of the sample pointer’s current offset in file. verify
Whether to do consistency checks on frames being read. Methods Summary
close
()tell
([unit])Current offset in the file. Attributes Documentation
-
bps
¶ Bits per elementary sample.
-
complex_data
¶ Whether the data are complex.
-
header0
¶ First header of the file.
-
sample_rate
¶ Number of complete samples per second.
-
sample_shape
¶ Shape of a complete sample (possibly subset or squeezed).
-
samples_per_frame
¶ Number of complete samples per frame.
-
squeeze
¶ Whether data arrays have dimensions with length unity removed.
If
True
, data read out has such dimensions removed, and data passed in for writing has them inserted.
-
start_time
¶ Start time of the file.
See also
time
for the time of the sample pointer’s current offset, and (if available)stop_time
for the time at the end of the file.
-
subset
¶ Specific components of the complete sample to decode.
The order of dimensions is the same as for
sample_shape
. Set by the class initializer.
-
time
¶ Time of the sample pointer’s current offset in file.
See also
start_time
for the start time, and (if available)stop_time
for the end time, of the file.
-
verify
¶ Whether to do consistency checks on frames being read.
Methods Documentation
-
close
() [edit on github]¶
-
tell
(unit=None) [edit on github]¶ Current offset in the file.
Parameters: unit :
Unit
or str, optionalTime unit the offset should be returned in. By default, no unit is used, i.e., an integer enumerating samples is returned. For the special string ‘time’, the absolute time is calculated.
Returns: offset : int,
Quantity
, orTime
Offset in current file (or time at current position).
-