mt_metadata.transfer_functions.io.zonge

Submodules

Classes

ZongeMTAvg

deal with avg files output from mtedit

Package Contents

class mt_metadata.transfer_functions.io.zonge.ZongeMTAvg(fn=None, **kwargs)

deal with avg files output from mtedit

header
info_keys = ['skip', 'frequency', 'e_magnitude', 'b_magnitude', 'z_magnitude', 'z_phase',...
info_fmt = []
z = None
z_err = None
t = None
t_err = None
components = []
freq_index_dict = None
z_positive = 'down'
property fn: pathlib.Path | None
read(fn=None, get_elevation=False)

Read data from a file into the object as a pandas DataFrame

Parameters:
  • fn (str | Path | None, optional) – The file name to read from, by default None

  • get_elevation (bool, optional) – Whether to get elevation data, by default False

to_complex(zmag, zphase)

Convert magnitude and phase to complex representation.

Outputs of mtedit are magnitude and phase of z, convert to real and imaginary parts, phase is in milliradians.

Parameters:
  • zmag (np.typing.NDArray) – The magnitude array.

  • zphase (np.typing.NDArray) – The phase array.

Returns:

The real and imaginary parts of the complex representation.

Return type:

tuple[np.typing.NDArray, np.typing.NDArray]

to_amp_phase(zreal, zimag)

Convert to amplitude and phase from real and imaginary

Parameters:
  • zreal (np.typing.NDArray) – The real part of the complex representation.

  • zimag (np.typing.NDArray) – The imaginary part of the complex representation.

Returns:

The amplitude and phase representation.

Return type:

tuple[np.typing.NDArray, np.typing.NDArray]

property run_metadata: mt_metadata.timeseries.Run
property ex_metadata: mt_metadata.timeseries.Electric
property ey_metadata: mt_metadata.timeseries.Electric
property hx_metadata: mt_metadata.timeseries.Magnetic
property hy_metadata: mt_metadata.timeseries.Magnetic
property hz_metadata: mt_metadata.timeseries.Magnetic
property station_metadata: mt_metadata.transfer_functions.tf.Station
property survey_metadata: mt_metadata.timeseries.Survey
write(fn)

Write an .avg file

Parameters:

fn (str or Path) – Filename to write to