VLBI Base

Routines on which the readers and writers for specific VLBI formats are based.

Reference/API

baseband.vlbi_base Package

baseband.vlbi_base.header Module

Base definitions for VLBI Headers, used for VDIF and Mark 5B.

Defines a header class VLBIHeaderBase that can be used to hold the words corresponding to a frame header, providing access to the values encoded in via a dict-like interface. Definitions for headers are constructed using the HeaderParser class.

Functions

make_parser(word_index, bit_index, bit_length) Construct a function that converts specific bits from a header.
make_setter(word_index, bit_index, bit_length) Construct a function that uses a value to set specific bits in a header.

Classes

HeaderProperty(header_parser, getter[, doc]) Mimic a dictionary, calculating entries from header words.
HeaderPropertyGetter(getter[, doc]) Special property for attaching HeaderProperty.
HeaderParser(*args, **kwargs) Parser & setter for VLBI header keywords.
VLBIHeaderBase(words[, verify]) Base class for all VLBI headers.

Class Inheritance Diagram

Inheritance diagram of baseband.vlbi_base.header.HeaderProperty, baseband.vlbi_base.header.HeaderPropertyGetter, baseband.vlbi_base.header.HeaderParser, baseband.vlbi_base.header.VLBIHeaderBase

baseband.vlbi_base.payload Module

Base definitions for VLBI payloads, used for VDIF and Mark 5B.

Defines a payload class VLBIPayloadBase that can be used to hold the words corresponding to a frame payload, providing access to the values encoded in it as a numpy array.

Classes

VLBIPayloadBase(words[, sample_shape, bps, …]) Container for decoding and encoding VLBI payloads.

Class Inheritance Diagram

Inheritance diagram of baseband.vlbi_base.payload.VLBIPayloadBase

baseband.vlbi_base.frame Module

Base definitions for VLBI frames, used for VDIF and Mark 5B.

Defines a frame class VLBIFrameBase that can be used to hold a header and a payload, providing access to the values encoded in both.

Classes

VLBIFrameBase(header, payload[, valid, verify]) Representation of a VLBI data frame, consisting of a header and payload.

Class Inheritance Diagram

Inheritance diagram of baseband.vlbi_base.frame.VLBIFrameBase

baseband.vlbi_base.base Module

Functions

make_opener(fmt, classes[, doc, append_doc]) Create a baseband file opener.

Classes

VLBIFileBase(fh_raw) VLBI file wrapper, used to add frame methods to a binary data file.
VLBIFileReaderBase(fh_raw) VLBI wrapped file reader base class.
VLBIStreamBase(fh_raw, header0, sample_rate, …) VLBI file wrapper, allowing access as a stream of data.
VLBIStreamReaderBase(fh_raw, header0, …)
VLBIStreamWriterBase(fh_raw, header0, …)

Class Inheritance Diagram

Inheritance diagram of baseband.vlbi_base.base.VLBIFileBase, baseband.vlbi_base.base.VLBIFileReaderBase, baseband.vlbi_base.base.VLBIStreamBase, baseband.vlbi_base.base.VLBIStreamReaderBase, baseband.vlbi_base.base.VLBIStreamWriterBase

baseband.vlbi_base.encoding Module

Encoders and decoders for generic VLBI data formats.

Functions

encode_2bit_base(values) Generic encoder for data stored using two bits.
encode_4bit_base(values) Generic encoder for data stored using four bits.
decode_8bit(words) Generic decoder for data stored using 8 bits.
encode_8bit(values) Encode 8 bit VDIF data.

Variables

OPTIMAL_2BIT_HIGH Optimal high value for a 2-bit digitizer for which the low value is 1.
TWO_BIT_1_SIGMA Optimal level between low and high for the above OPTIMAL_2BIT_HIGH.
FOUR_BIT_1_SIGMA Scaling for four-bit encoding that makes it look like 2 bit.
EIGHT_BIT_1_SIGMA Scaling for eight-bit encoding that makes it look like 2 bit.
decoder_levels Levels for data encoded with different numbers of bits..

baseband.vlbi_base.utils Module

Functions

bcd_decode(value)
bcd_encode(value)

Classes

CRC(polynomial) Cyclic Redundancy Check for a bitstream.

Class Inheritance Diagram

Inheritance diagram of baseband.vlbi_base.utils.CRC