GSBStreamBase¶
- class baseband.gsb.base.GSBStreamBase(fh_ts, fh_raw, header0, sample_rate=None, samples_per_frame=None, payload_nbytes=None, nchan=None, bps=None, complex_data=None, **kwargs)[source] [edit on github]¶
Bases:
StreamBase
Base for GSB streams.
Attributes Summary
Bits per elementary sample.
Whether the data are complex.
First header of the file.
Number of bytes per payload, divided by the number of raw files.
Number of complete samples per second.
Shape of a complete sample (possibly subset or squeezed).
Number of complete samples per frame.
Whether data arrays have dimensions with length unity removed.
Start time of the file.
Time of the sample pointer's current offset in file.
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.
- payload_nbytes¶
Number of bytes per payload, divided by the number of raw files.
- 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.
- time¶
Time of the sample pointer’s current offset in file.
See also
start_time
for the start time of the file.
Methods Documentation
- close()[source] [edit on github]¶
- tell(unit=None) [edit on github]¶
Current offset in the file.
- Parameters:
- unit
Unit
or str, optional Time 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.
- unit
- Returns: