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()
temporary_offset(**kwds) Context manager for temporarily seeking to another file position.
write_payload(data[, bps]) Write single data block.

Methods Documentation

close() [edit on github]
temporary_offset(**kwds) [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(data, bps=4)[source] [edit on github]

Write single data block.

Parameters:

data : ndarray or GSBPayload

If an array, bps needs to be passed in.

bps : int, optional

Bits per elementary sample, to use when encoding the payload. Ignored if data is a GSB payload. Default: 4.