Mark4Payload

class baseband.mark4.Mark4Payload(words, header=None, nchan=1, bps=2, fanout=1)[source] [edit on github]

Bases: baseband.vlbi_base.payload.VLBIPayloadBase

Container for decoding and encoding Mark 4 payloads.

Parameters:

words : ndarray

Array containg LSB unsigned words (with the right size) that encode the payload.

header : Mark4Header, optional

If given, used to infer the number of channels, bps, and fanout.

nchan : int, optional

Number of channels, used if header is not given. Default: 1.

bps : int, optional

Number of bits per sample, used if header is not given. Default: 2.

fanout : int, optional

Number of tracks every bit stream is spread over, used if header is not given. Default: 1.

Notes

The total number of tracks is nchan * bps * fanout.

Attributes Summary

data Full decoded payload.
dtype Numeric type of the decoded data array.
nbytes Size of the payload in bytes.
ndim Number of dimensions of the decoded data array.
shape Shape of the decoded data array.
size Total number of component samples in the decoded data array.

Methods Summary

fromdata(data, header) Encode data as payload, using header information.
fromfile(fh, header) Read payload from filehandle and decode it into data.
tofile(fh) Write payload to filehandle.

Attributes Documentation

data

Full decoded payload.

dtype

Numeric type of the decoded data array.

nbytes

Size of the payload in bytes.

ndim

Number of dimensions of the decoded data array.

shape

Shape of the decoded data array.

size

Total number of component samples in the decoded data array.

Methods Documentation

classmethod fromdata(data, header)[source] [edit on github]

Encode data as payload, using header information.

classmethod fromfile(fh, header)[source] [edit on github]

Read payload from filehandle and decode it into data.

The payload_nbytes, number of channels, bits per sample, and fanout ratio are all taken from the header.

tofile(fh) [edit on github]

Write payload to filehandle.