HDF5CodedPayload¶
- class baseband_tasks.io.hdf5.payload.HDF5CodedPayload(words, header=None, **kwargs)[source] [edit on github]¶
Bases:
baseband_tasks.io.hdf5.payload.HDF5Payload
,baseband.base.payload.PayloadBase
Attributes Summary
Full decoded payload.
Numeric type of the decoded data array.
Size of the payload in bytes.
Number of dimensions of the decoded data array.
Shape of the decoded data array.
Total number of component samples in the decoded data array.
Methods Summary
fromdata
(data[, header, bps])Encode data as a payload.
fromfile
(fh[, header])Get payload words from HDF5 file or group.
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=None, bps=2) [edit on github]¶
Encode data as a payload.
- Parameters
- data
ndarray
Data to be encoded, either complex or real. The trailing dimensions are used to infer
sample_shape
.- headerheader instance, optional
If given, used to infer to get
bps
.- bpsint, optional
Bits per elementary sample, i.e., per channel and per real or imaginary component, used if header is not given. Default: 2.
- data
- classmethod fromfile(fh, header=None) [edit on github]¶
Get payload words from HDF5 file or group.
- Parameters
- fh
File
orGroup
Handle to the HDF5 file/group which has an ‘payload’ dataset. If the payload does not exist, it will be created.
- header
HDF5Header
, optional Must be given for encoded payloads, or to create a payload.
- fh
- tofile(fh) [edit on github]¶
Write payload to filehandle.