GSBFileWriter¶
-
class
baseband.gsb.base.
GSBFileWriter
(fh_raw)[source] [edit on github]¶ Bases:
baseband.vlbi_base.base.VLBIFileBase
Simple writer for GSB data files.
Adds
write_payload
method to the basic VLBI binary file wrapper.Methods Summary
close
(self)temporary_offset
(self)Context manager for temporarily seeking to another file position.
write_payload
(self, data[, bps])Write single data block.
Methods Documentation
-
close
(self) [edit on github]¶
-
temporary_offset
(self) [edit on github]¶ Context manager for temporarily seeking to another file position.
To be used as part of a
with
statement:with fh_raw.temporary_offset() [as fh_raw]: with-block
On exiting the
with-block
, the file pointer is moved back to its original position.
-
write_payload
(self, data, bps=4)[source] [edit on github]¶ Write single data block.
- Parameters
- data
ndarray
orGSBPayload
If an array,
bps
needs to be passed in.- bpsint, optional
Bits per elementary sample, to use when encoding the payload. Ignored if
data
is a GSB payload. Default: 4.
- data
-