VLBIFileBase

class baseband.vlbi_base.base.VLBIFileBase(fh_raw)[source] [edit on github]

Bases: object

VLBI file wrapper, used to add frame methods to a binary data file.

The underlying file is stored in fh_raw and all attributes that do not exist on the class itself are looked up on it.

Parameters
fh_rawfilehandle

Filehandle of the raw binary data file.

Attributes Summary

fh_raw

Methods Summary

close(self)

temporary_offset(self[, offset, whence])

Context manager for temporarily seeking to another file position.

Attributes Documentation

fh_raw = None

Methods Documentation

close(self)[source] [edit on github]
temporary_offset(self, offset=None, whence=0)[source] [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. As a convenience, one can pass on the offset to seek to when entering the context manager. Parameters are as for io.IOBase.seek().