mt_metadata.transfer_functions.io.zfiles ======================================== .. py:module:: mt_metadata.transfer_functions.io.zfiles Submodules ---------- .. toctree:: :maxdepth: 1 /source/api/mt_metadata/transfer_functions/io/zfiles/metadata/index /source/api/mt_metadata/transfer_functions/io/zfiles/zmm/index Classes ------- .. autoapisummary:: mt_metadata.transfer_functions.io.zfiles.ZMM Package Contents ---------------- .. py:class:: ZMM(fn = None, **kwargs) Bases: :py:obj:`ZMMHeader` Container for Egberts zrr format. .. py:attribute:: fn :value: None .. py:attribute:: transfer_functions :value: None .. py:attribute:: sigma_e :value: None .. py:attribute:: sigma_s :value: None .. py:attribute:: periods :value: None .. py:attribute:: dataset :value: None .. py:attribute:: decimation_dict .. py:property:: channel_nomenclature :type: dict[str, str] .. py:property:: frequencies :type: numpy.typing.NDArray[numpy.float64] | None .. py:method:: initialize_arrays() make initial arrays based on number of frequencies and channels .. py:method:: read(fn = None, get_elevation = False, rotate_to_measurement_coordinates = True, use_declination = False) Read in Egbert zrr/zmm file :param fn: The file name to read, by default None :type fn: str | Path | None, optional :param get_elevation: If True, fetch elevation from the National Map, by default False :type get_elevation: bool, optional :param rotate_to_measurement_coordinates: If True, rotate impedance to the provided reference frame of the channel metadata, by default True :type rotate_to_measurement_coordinates: bool, optional :param use_declination: If True, rotate impedance to true north using declination value in metadata, by default False :type use_declination: bool, optional :raises ZMMError: If the file cannot be read or is not in the expected format. .. py:method:: 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 :param fn: The file name to write, by default None :type fn: str | Path | None, optional :param decimation_levels: A dictionary containing decimation levels and their properties, by default None. :type decimation_levels: dict, optional :raises ZMMError: If the file cannot be written or is not in the expected format. .. py:method:: calculate_impedance(angle = 0.0) calculate the impedances from the transfer functions :param angle: The angle to rotate the impedance tensor. :type angle: float, optional :returns: * **z** (*np.ndarray | None*) -- The impedance tensor. * **error** (*np.ndarray | None*) -- The impedance tensor error. .. py:method:: calculate_tippers(angle = 0.0) calculate induction vectors :param angle: The angle to rotate the tipper tensor. :type angle: float, optional :returns: **tipper** -- The tipper tensor. :rtype: np.ndarray .. py:property:: survey_metadata .. py:property:: ex_metadata :type: mt_metadata.timeseries.Electric .. py:property:: ey_metadata :type: mt_metadata.timeseries.Electric .. py:property:: hx_metadata :type: mt_metadata.timeseries.Magnetic .. py:property:: hy_metadata :type: mt_metadata.timeseries.Magnetic .. py:property:: hz_metadata :type: mt_metadata.timeseries.Magnetic