mth5.io.phoenix.readers.segmented

Submodules

Classes

DecimatedSegmentedReader

Class to create a streamer for segmented decimated time series.

Package Contents

class mth5.io.phoenix.readers.segmented.DecimatedSegmentedReader(path: str | pathlib.Path, num_files: int = 1, report_hw_sat: bool = False, **kwargs)[source]

Bases: mth5.io.phoenix.readers.TSReaderBase

Class to create a streamer for segmented decimated time series.

This reader handles segmented decimated time series files such as ‘td_24k’. These files have sub headers containing metadata for each segment.

Parameters:
  • path (str or Path) – Path to the time series file

  • num_files (int, optional) – Number of files in the sequence, by default 1

  • report_hw_sat (bool, optional) – Whether to report hardware saturation, by default False

  • **kwargs – Additional keyword arguments passed to parent TSReaderBase class

sub_header

SubHeader instance for parsing segment headers

Type:

SubHeader

subheader

Dictionary for additional subheader information

Type:

dict

sub_header
subheader
read_segment(metadata_only: bool = False) Segment[source]

Read a single segment from the file.

Parameters:

metadata_only (bool, optional) – If True, only read metadata without loading data, by default False

Returns:

Segment object containing data and metadata

Return type:

Segment

Raises:

ValueError – If stream is not available

to_channel_ts(rxcal_fn: str | pathlib.Path | None = None, scal_fn: str | pathlib.Path | None = None) mth5.timeseries.ChannelTS[source]

Convert to a ChannelTS object.

Parameters:
  • rxcal_fn (str, Path or None, optional) – Path to receiver calibration file, by default None

  • scal_fn (str, Path or None, optional) – Path to sensor calibration file, by default None

Returns:

Channel time series object with data, metadata, and calibration

Return type:

ChannelTS