mth5.io.phoenix.readers.contiguous.decimated_continuous_reader

Module to read and parse native Phoenix Geophysics data formats of the MTU-5C Family.

This module implements Streamed readers for decimated continuos time series formats of the MTU-5C family.

author:

Jorge Torres-Solis

Revised 2022 by J. Peacock

Classes

DecimatedContinuousReader

Class to create a streamer for continuous decimated time series.

Module Contents

class mth5.io.phoenix.readers.contiguous.decimated_continuous_reader.DecimatedContinuousReader(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 continuous decimated time series.

This reader handles continuous decimated time series files such as ‘td_150’, ‘td_30’. These files have no sub header information.

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

subheader[source]

Empty dictionary as these files have no sub header information

Type:

dict

data_size[source]

Size of the data sequence when read

Type:

int or None

subheader[source]
data_size: int | None = None[source]
property segment_start_time: mt_metadata.common.mttime.MTime[source]

Estimate the segment start time based on sequence number.

The first sequence starts 1 second later than the set start time due to initiation within the data logger.

Returns:

Start time of the recording segment

Return type:

MTime

property segment_end_time: mt_metadata.common.mttime.MTime[source]

Estimate end time of the segment.

The first sequence starts 1 second later than the set start time due to initiation within the data logger.

Returns:

Estimated end time from number of samples

Return type:

MTime

property sequence_start: mt_metadata.common.mttime.MTime[source]

Get the sequence start time.

Returns:

Start time of the sequence

Return type:

MTime

property sequence_end: mt_metadata.common.mttime.MTime[source]

Get the sequence end time.

Returns:

End time of the sequence based on data size or max samples

Return type:

MTime

read() numpy.ndarray[source]

Read in the full data from the current file.

Returns:

Single channel data array with dtype float32

Return type:

np.ndarray

read_sequence(start: int = 0, end: int | None = None) numpy.ndarray[source]

Read a sequence of files.

Parameters:
  • start (int, optional) – Starting index in the sequence, by default 0

  • end (int or None, optional) – Ending index in the sequence to read, by default None

Returns:

Data within the given sequence range as float32 array

Return type:

np.ndarray

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