sigpyproc.io.fbh5

sigpyproc.io.fbh5#

Sigproc-style HDF5 header parsing.

This module contains functions for parsing Sigproc-style HDF5 headers.

Functions

map_dimensions

Map HDF5 dimension labels to their corresponding axis numbers.

parse_header

Parse the metadata from a single Sigproc-style HDF5 file.

sigpyproc.io.fbh5.map_dimensions(dimension_labels)[source]#

Map HDF5 dimension labels to their corresponding axis numbers.

Parameters:
dimension_labelsnp.ndarray or List[str]

Array or list of dimension labels from HDF5 file.

Returns:
Dict[str, int]

Dictionary mapping dimension names to axis numbers.

Raises:
ValueError

If an unexpected dimension label is encountered.

sigpyproc.io.fbh5.parse_header(filename)[source]#

Parse the metadata from a single Sigproc-style HDF5 file.

Parameters:
filenamestr | Path

Path to the sigproc HDF5 file containing the metadata

Returns:
dict

Observational metadata

Raises:
FileNotFoundError

If the file does not exist

OSError

If file header is not in sigproc HDF5 format or no data block found in file