mth5.io.phoenix package
Subpackages
- mth5.io.phoenix.readers package
- Subpackages
- Submodules
- mth5.io.phoenix.readers.base module
- mth5.io.phoenix.readers.header module
HeaderHeader.attenuator_gainHeader.battery_voltage_vHeader.board_model_mainHeader.board_model_revisionHeader.bytes_per_sampleHeader.ch_board_modelHeader.ch_board_serialHeader.ch_firmwareHeader.channel_idHeader.channel_main_gainHeader.channel_metadata()Header.channel_typeHeader.data_footerHeader.decimation_node_idHeader.detected_channel_typeHeader.file_sequenceHeader.file_typeHeader.file_versionHeader.frag_periodHeader.frame_rollover_countHeader.frame_sizeHeader.frame_size_bytesHeader.future1Header.future2Header.gps_elevationHeader.gps_horizontal_accuracyHeader.gps_latHeader.gps_longHeader.gps_vertical_accuracyHeader.hardware_configurationHeader.header_lengthHeader.instrument_serial_numberHeader.instrument_typeHeader.intrinsic_circuitry_gainHeader.lp_frequencyHeader.max_signalHeader.min_signalHeader.missing_framesHeader.preamp_gainHeader.recording_idHeader.recording_start_timeHeader.run_metadata()Header.sample_rateHeader.sample_rate_baseHeader.sample_rate_expHeader.saturated_framesHeader.station_metadata()Header.timing_flagsHeader.timing_sat_countHeader.timing_stabilityHeader.timing_statusHeader.total_circuitry_gainHeader.total_selectable_gainHeader.unpack_header()
- mth5.io.phoenix.readers.phx_json module
ConfigJSONConfigJSON.auto_power_enabledConfigJSON.configConfigJSON.empower_versionConfigJSON.fnConfigJSON.has_obj()ConfigJSON.mtc150_resetConfigJSON.networkConfigJSON.read()ConfigJSON.receiverConfigJSON.scheduleConfigJSON.station_metadata()ConfigJSON.surveyTechniqueConfigJSON.timezoneConfigJSON.timezone_offsetConfigJSON.version
ReceiverMetadataJSONReceiverMetadataJSON.channel_mapReceiverMetadataJSON.e1_metadataReceiverMetadataJSON.e2_metadataReceiverMetadataJSON.fnReceiverMetadataJSON.get_ch_index()ReceiverMetadataJSON.get_ch_metadata()ReceiverMetadataJSON.get_ch_tag()ReceiverMetadataJSON.h1_metadataReceiverMetadataJSON.h2_metadataReceiverMetadataJSON.h3_metadataReceiverMetadataJSON.h4_metadataReceiverMetadataJSON.h5_metadataReceiverMetadataJSON.h6_metadataReceiverMetadataJSON.has_obj()ReceiverMetadataJSON.read()ReceiverMetadataJSON.run_metadataReceiverMetadataJSON.station_metadataReceiverMetadataJSON.survey_metadata
read_json_to_object()
- Module contents
ConfigJSONConfigJSON.auto_power_enabledConfigJSON.configConfigJSON.empower_versionConfigJSON.fnConfigJSON.has_obj()ConfigJSON.mtc150_resetConfigJSON.networkConfigJSON.read()ConfigJSON.receiverConfigJSON.scheduleConfigJSON.station_metadata()ConfigJSON.surveyTechniqueConfigJSON.timezoneConfigJSON.timezone_offsetConfigJSON.version
DecimatedContinuousReaderDecimatedSegmentedReaderHeaderHeader.attenuator_gainHeader.battery_voltage_vHeader.board_model_mainHeader.board_model_revisionHeader.bytes_per_sampleHeader.ch_board_modelHeader.ch_board_serialHeader.ch_firmwareHeader.channel_idHeader.channel_main_gainHeader.channel_metadata()Header.channel_typeHeader.data_footerHeader.decimation_node_idHeader.detected_channel_typeHeader.file_sequenceHeader.file_typeHeader.file_versionHeader.frag_periodHeader.frame_rollover_countHeader.frame_sizeHeader.frame_size_bytesHeader.future1Header.future2Header.gps_elevationHeader.gps_horizontal_accuracyHeader.gps_latHeader.gps_longHeader.gps_vertical_accuracyHeader.hardware_configurationHeader.header_lengthHeader.instrument_serial_numberHeader.instrument_typeHeader.intrinsic_circuitry_gainHeader.lp_frequencyHeader.max_signalHeader.min_signalHeader.missing_framesHeader.preamp_gainHeader.recording_idHeader.recording_start_timeHeader.run_metadata()Header.sample_rateHeader.sample_rate_baseHeader.sample_rate_expHeader.saturated_framesHeader.station_metadata()Header.timing_flagsHeader.timing_sat_countHeader.timing_stabilityHeader.timing_statusHeader.total_circuitry_gainHeader.total_selectable_gainHeader.unpack_header()
NativeReaderReceiverMetadataJSONReceiverMetadataJSON.channel_mapReceiverMetadataJSON.e1_metadataReceiverMetadataJSON.e2_metadataReceiverMetadataJSON.fnReceiverMetadataJSON.get_ch_index()ReceiverMetadataJSON.get_ch_metadata()ReceiverMetadataJSON.get_ch_tag()ReceiverMetadataJSON.h1_metadataReceiverMetadataJSON.h2_metadataReceiverMetadataJSON.h3_metadataReceiverMetadataJSON.h4_metadataReceiverMetadataJSON.h5_metadataReceiverMetadataJSON.h6_metadataReceiverMetadataJSON.has_obj()ReceiverMetadataJSON.read()ReceiverMetadataJSON.run_metadataReceiverMetadataJSON.station_metadataReceiverMetadataJSON.survey_metadata
TSReaderBase
Submodules
mth5.io.phoenix.phoenix_collection module
Phoenix file collection
Created on Thu Aug 4 16:48:47 2022
@author: jpeacock
- class mth5.io.phoenix.phoenix_collection.PhoenixCollection(file_path=None, **kwargs)[source]
Bases:
CollectionA class to collect the various files in a Phoenix file system and try to organize them into runs.
- assign_run_names(df, zeros=4)[source]
Assign run names by looping through start times.
For continous data a single run is assigned as long as the start and end times of each file align. If there is a break a new run name is assigned.
For segmented data a new run name is assigned to each segment
- Parameters
df (
pandas.DataFrame) – Dataframe returned by to_dataframe methodzeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
Dataframe with run names
- Return type
pandas.DataFrame
- get_runs(sample_rates, run_name_zeros=4, calibration_path=None)[source]
Get a list of runs contained within the given folder. First the dataframe will be developed from which the runs are extracted.
For continous data all you need is the first file in the sequence. The reader will read in the entire sequence.
For segmented data it will only read in the given segment, which is slightly different from the original reader.
- Parameters
sample_rates – list of sample rates to read, defaults to [150, 24000]
run_name_zeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
List of run dataframes with only the first block of files
- Return type
OrderedDict
- Example
>>> from mth5.io.phoenix import PhoenixCollection >>> phx_collection = PhoenixCollection(r"/path/to/station") >>> run_dict = phx_collection.get_runs(sample_rates=[150, 24000])
- to_dataframe(sample_rates=[150, 24000], run_name_zeros=4, calibration_path=None)[source]
Get a dataframe of all the files in a given directory with given columns. Loop over station folders.
- Parameters
sample_rates (list of integers, optional) – list of sample rates to read, defaults to [150, 24000]
run_name_zeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
Dataframe with each row representing a single file
- Return type
pandas.DataFrame
mth5.io.phoenix.read module
Created on Fri May 6 12:39:34 2022
@author: jpeacock
Module contents
- class mth5.io.phoenix.ConfigJSON(fn=None, **kwargs)[source]
Bases:
objectA container for the config.json file used to control the recording
- property auto_power_enabled
- property config
- property empower_version
- property fn
- property mtc150_reset
- property network
- read(fn=None)[source]
read a config.json file that is in the Phoenix format
- Parameters
fn (TYPE, optional) – DESCRIPTION, defaults to None
- Returns
DESCRIPTION
- Return type
TYPE
- property receiver
- property schedule
- property surveyTechnique
- property timezone
- property timezone_offset
- property version
- class mth5.io.phoenix.PhoenixCollection(file_path=None, **kwargs)[source]
Bases:
CollectionA class to collect the various files in a Phoenix file system and try to organize them into runs.
- assign_run_names(df, zeros=4)[source]
Assign run names by looping through start times.
For continous data a single run is assigned as long as the start and end times of each file align. If there is a break a new run name is assigned.
For segmented data a new run name is assigned to each segment
- Parameters
df (
pandas.DataFrame) – Dataframe returned by to_dataframe methodzeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
Dataframe with run names
- Return type
pandas.DataFrame
- get_runs(sample_rates, run_name_zeros=4, calibration_path=None)[source]
Get a list of runs contained within the given folder. First the dataframe will be developed from which the runs are extracted.
For continous data all you need is the first file in the sequence. The reader will read in the entire sequence.
For segmented data it will only read in the given segment, which is slightly different from the original reader.
- Parameters
sample_rates – list of sample rates to read, defaults to [150, 24000]
run_name_zeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
List of run dataframes with only the first block of files
- Return type
OrderedDict
- Example
>>> from mth5.io.phoenix import PhoenixCollection >>> phx_collection = PhoenixCollection(r"/path/to/station") >>> run_dict = phx_collection.get_runs(sample_rates=[150, 24000])
- to_dataframe(sample_rates=[150, 24000], run_name_zeros=4, calibration_path=None)[source]
Get a dataframe of all the files in a given directory with given columns. Loop over station folders.
- Parameters
sample_rates (list of integers, optional) – list of sample rates to read, defaults to [150, 24000]
run_name_zeros (integer, optional) – Number of zeros in the run name, defaults to 4
- Returns
Dataframe with each row representing a single file
- Return type
pandas.DataFrame
- class mth5.io.phoenix.ReceiverMetadataJSON(fn=None, **kwargs)[source]
Bases:
objectA container for the recmeta.json file used to control the recording
- property channel_map
- property e1_metadata
- property e2_metadata
- property fn
- property h1_metadata
- property h2_metadata
- property h3_metadata
- property h4_metadata
- property h5_metadata
- property h6_metadata
- read(fn=None)[source]
read a config.json file that is in the Phoenix format
- Parameters
fn (TYPE, optional) – DESCRIPTION, defaults to None
- Returns
DESCRIPTION
- Return type
TYPE
- property run_metadata
- property station_metadata
- property survey_metadata