HDF5CodedHeader¶
- class baseband_tasks.io.hdf5.header.HDF5CodedHeader(*, verify=True, mutable=True, **kwargs)[source] [edit on github]¶
Bases:
HDF5HeaderAttributes Summary
The numpy dtype in which the encoded data are stored.
Methods Summary
clear()copy()fromfile(fh[, verify])Create a header from a yaml-encoded 'header' extension.
fromkeys(iterable[, value])Create a new dictionary with keys from iterable and values set to value.
fromvalues(template[, whole, verify])Initialise a header from a template and/or values.
get(key[, default])Return the value for key if key is in the dictionary, else default.
items()keys()pop(key[, default])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem(/)Remove and return a (key, value) pair as a 2-tuple.
setdefault(key[, default])Insert key with a value of default if key is not in the dictionary.
tofile(fh)Write the header as a yaml-encoded 'header' extension.
update(*[, verify])Update the header with new values.
values()verify()Attributes Documentation
- bps¶
- complex_data¶
- encoded_dtype¶
The numpy dtype in which the encoded data are stored.
- frequency¶
- polarization¶
- sample_rate¶
- sample_shape¶
- samples_per_frame¶
- shape¶
- sideband¶
- time¶
Methods Documentation
- clear() None. Remove all items from D.¶
- copy() a shallow copy of D [edit on github]¶
- classmethod fromfile(fh, verify=True) [edit on github]¶
Create a header from a yaml-encoded ‘header’ extension.
- classmethod fromkeys(iterable, value=None, /)¶
Create a new dictionary with keys from iterable and values set to value.
- classmethod fromvalues(template, whole=None, verify=True, **kwargs) [edit on github]¶
Initialise a header from a template and/or values.
- Parameters:
- templateheader or stream template, optional
Must have attributes that define a header (‘sample_shape’, ‘samples_per_frame’, ‘sample_rate’, ‘time’, and either ‘dtype’ or ‘bps’ and ‘complex_data’).
- wholebool, optional
If
True, assume a header for the complete stream is wanted, and use ‘start_time’ for the ‘time’ and the total number of samples for ‘samples_per_frame’. Default:Trueif the template has both ‘start_time’ and ‘shape’ (i.e., for streams).- verifybool, optional
Whether to do basic verification. Default:
True.- **kwargs
Any additional values. These will override values inferred from the template.
- get(key, default=None, /)¶
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items¶
- keys() a set-like object providing a view on D's keys¶
- pop(key, default=<unrepresentable>, /)¶
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem(/)¶
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)¶
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- tofile(fh) [edit on github]¶
Write the header as a yaml-encoded ‘header’ extension.
- update(*, verify=True, **kwargs) [edit on github]¶
Update the header with new values.
Here, any keywords matching properties are processed as well, in the order set by the class (in
_properties), and after all other keywords have been processed.- Parameters:
- verifybool, optional
If
True(default), verify integrity after updating.- **kwargs
Arguments used to set keywords and properties.
- values() an object providing a view on D's values¶
- verify()[source] [edit on github]¶