mt_metadata.transfer_functions.io.zfiles
Submodules
Classes
Container for Egberts zrr format. |
Package Contents
- class mt_metadata.transfer_functions.io.zfiles.ZMM(fn=None, **kwargs)
Bases:
ZMMHeaderContainer for Egberts zrr format.
- fn = None
- transfer_functions = None
- sigma_e = None
- sigma_s = None
- periods = None
- dataset = None
- decimation_dict
- property channel_nomenclature: dict[str, str]
- property frequencies: numpy.typing.NDArray[numpy.float64] | None
- initialize_arrays()
make initial arrays based on number of frequencies and channels
- read(fn=None, get_elevation=False, rotate_to_measurement_coordinates=True, use_declination=False)
Read in Egbert zrr/zmm file
- Parameters:
fn (str | Path | None, optional) – The file name to read, by default None
get_elevation (bool, optional) – If True, fetch elevation from the National Map, by default False
rotate_to_measurement_coordinates (bool, optional) – If True, rotate impedance to the provided reference frame of the channel metadata, by default True
use_declination (bool, optional) – If True, rotate impedance to true north using declination value in metadata, by default False
- Raises:
ZMMError – If the file cannot be read or is not in the expected format.
- write(fn=None, decimation_levels=None)
write a zmm file
decimation_levels should be a dictionary with keys
decimation_level
values will be a dictionary with keys
frequency_band, value = (min, max)
n_points, value = int
sampling_freq, value = float
- Parameters:
fn (str | Path | None, optional) – The file name to write, by default None
decimation_levels (dict, optional) – A dictionary containing decimation levels and their properties, by default None.
- Raises:
ZMMError – If the file cannot be written or is not in the expected format.
- calculate_impedance(angle=0.0)
calculate the impedances from the transfer functions
- Parameters:
angle (float, optional) – The angle to rotate the impedance tensor.
- Returns:
z (np.ndarray | None) – The impedance tensor.
error (np.ndarray | None) – The impedance tensor error.
- Return type:
tuple[numpy.typing.NDArray[numpy.complex64] | None, numpy.typing.NDArray[numpy.float64] | None]
- calculate_tippers(angle=0.0)
calculate induction vectors
- Parameters:
angle (float, optional) – The angle to rotate the tipper tensor.
- Returns:
tipper – The tipper tensor.
- Return type:
np.ndarray
- property survey_metadata
- 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