mth5.io.phoenix.readers.contiguous package
Submodules
mth5.io.phoenix.readers.contiguous.decimated_continuous_reader module
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
- class mth5.io.phoenix.readers.contiguous.decimated_continuous_reader.DecimatedContinuousReader(path: str | Path, num_files: int = 1, report_hw_sat: bool = False, **kwargs)[source]
Bases:
TSReaderBaseClass 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
- read() 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) 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
- property segment_end_time: 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 segment_start_time: 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 sequence_end: MTime[source]
Get the sequence end time.
- Returns:
End time of the sequence based on data size or max samples
- Return type:
MTime
- property sequence_start: MTime[source]
Get the sequence start time.
- Returns:
Start time of the sequence
- Return type:
MTime
- to_channel_ts(rxcal_fn: str | Path | None = None, scal_fn: str | Path | None = None) 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:
Module contents
- class mth5.io.phoenix.readers.contiguous.DecimatedContinuousReader(path: str | Path, num_files: int = 1, report_hw_sat: bool = False, **kwargs)[source]
Bases:
TSReaderBaseClass 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
Empty dictionary as these files have no sub header information
- Type:
dict
- data_size
Size of the data sequence when read
- Type:
int or None
- read() 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) 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
- property segment_end_time: MTime
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 segment_start_time: MTime
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 sequence_end: MTime
Get the sequence end time.
- Returns:
End time of the sequence based on data size or max samples
- Return type:
MTime
- property sequence_start: MTime
Get the sequence start time.
- Returns:
Start time of the sequence
- Return type:
MTime
- to_channel_ts(rxcal_fn: str | Path | None = None, scal_fn: str | Path | None = None) 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: