mth5.io.phoenix.read

Created on Fri May 6 12:39:34 2022

@author: jpeacock

Attributes

READERS

Functions

get_file_extenstion(→ str)

Get the file extension from a file name.

open_phoenix(...)

Open a Phoenix Geophysics data file in the appropriate container.

read_phoenix(...)

Read a Phoenix Geophysics data file into a ChannelTS or RunTS object

Module Contents

mth5.io.phoenix.read.READERS: dict[str, type][source]
mth5.io.phoenix.read.get_file_extenstion(file_name: str | pathlib.Path) str[source]

Get the file extension from a file name.

Parameters:

file_name (str or pathlib.Path) – The file name to extract the extension from.

Returns:

The file extension without the leading dot.

Return type:

str

mth5.io.phoenix.read.open_phoenix(file_name: str | pathlib.Path, **kwargs: Any) mth5.io.phoenix.readers.DecimatedContinuousReader | mth5.io.phoenix.readers.DecimatedSegmentedReader | mth5.io.phoenix.readers.NativeReader | mth5.io.phoenix.readers.MTUTSN | mth5.io.phoenix.readers.MTUTable[source]

Open a Phoenix Geophysics data file in the appropriate container.

Parameters:
  • file_name (str or pathlib.Path) – Full path to the Phoenix data file to open.

  • **kwargs (Any) – Additional keyword arguments to pass to the reader constructor.

Returns:

reader – The appropriate Phoenix reader container based on file extension: - .bin files: NativeReader - .td_24k files: DecimatedSegmentedReader - .td_150/.td_30 files: DecimatedContinuousReader

Return type:

DecimatedContinuousReader | DecimatedSegmentedReader | NativeReader

Raises:

KeyError – If the file extension is not supported by any Phoenix reader.

mth5.io.phoenix.read.read_phoenix(file_name: str | pathlib.Path, **kwargs: Any) mth5.timeseries.ChannelTS | mth5.timeseries.RunTS | mth5.io.phoenix.readers.MTUTable[source]

Read a Phoenix Geophysics data file into a ChannelTS or RunTS object depending on the file type. Newer files that end in .td_XX or .bin will be read into ChannelTS objects. Older MTU files that end in .TS3, .TS4, .TS5, .TSL, or .TSH will be read into RunTS objects.

Parameters:
  • file_name (str or pathlib.Path) – Path to the Phoenix data file to read.

  • **kwargs (Any) –

    Additional keyword arguments. May include:

    • rxcal_fnstr or pathlib.Path, optional

      Path to receiver calibration file.

    • scal_fnstr or pathlib.Path, optional

      Path to sensor calibration file.

    • table_filepathstr or pathlib.Path, optional

      Path to the MTU TBL file for use with MTUTSN files.

    • Other arguments passed to the Phoenix reader constructor.

Returns:

  • channel_ts (ChannelTS) – Time series data object containing the Phoenix file data with calibration applied if calibration files were provided.

  • run_ts (RunTS) – Time series data object containing the MTU data from the Phoenix MTU files with calibration applied if specified.

  • mtu_table (MTUTable) – Metadata table object containing the MTU table data.

Raises:
  • KeyError – If the file extension is not supported by any Phoenix reader.

  • ValueError – If the file cannot be read or converted to ChannelTS or RunTS format.