mth5.clients.lemi ================= .. py:module:: mth5.clients.lemi .. autoapi-nested-parse:: LEMI Client =========== Client for creating MTH5 files from LEMI instrument data. Supports both LEMI-424 (long period, .txt) and LEMI-423 (broadband, .B423) files. Created on Fri Oct 11 10:57:54 2024 @author: jpeacock Attributes ---------- .. autoapisummary:: mth5.clients.lemi.LEMI424Client Classes ------- .. autoapisummary:: mth5.clients.lemi.LEMIClient Module Contents --------------- .. py:class:: LEMIClient(data_path, save_path=None, sample_rates=[1], mth5_filename='from_lemi.h5', **kwargs) Bases: :py:obj:`mth5.clients.base.ClientBase` Client for creating MTH5 files from LEMI instrument data. Supports both LEMI-424 and LEMI-423 instruments: - **LEMI-424**: Long period data (.txt files, 1 Hz) - **LEMI-423**: Broadband data (.B423 files, 4000/2000/1000/500/250 Hz) :param data_path: Path to directory containing LEMI files :type data_path: str or pathlib.Path :param save_path: Path to save MTH5 file, defaults to data_path :type save_path: str or pathlib.Path, optional :param sample_rates: Sample rates to include, defaults to [1] Valid rates: - LEMI-424: [1] (long period only) - LEMI-423: [4000, 2000, 1000, 500, 250] (broadband, auto-detected from tick counter) To include all LEMI-423 rates: [4000, 2000, 1000, 500, 250] :type sample_rates: list, optional :param mth5_filename: Name of output MTH5 file, defaults to "from_lemi.h5" :type mth5_filename: str, optional :Example: >>> from mth5.clients import LEMIClient >>> # LEMI-424 data >>> lc = LEMIClient("/path/to/lemi424/data", sample_rates=[1]) >>> mth5_path = lc.make_mth5_from_lemi("Survey01", "MT001") >>> >>> # LEMI-423 data at 1000 Hz >>> lc = LEMIClient("/path/to/lemi423/data", sample_rates=[1000]) >>> mth5_path = lc.make_mth5_from_lemi("Survey01", "MT002") >>> >>> # LEMI-423 data, unknown sample rate (include all possible) >>> lc = LEMIClient("/path/to/lemi423/data", ... sample_rates=[4000, 2000, 1000, 500, 250]) >>> mth5_path = lc.make_mth5_from_lemi("Survey01", "MT003") .. py:attribute:: collection .. py:method:: make_mth5_from_lemi(survey_id, station_id, **kwargs) Create an MTH5 file from LEMI instrument data. Works with both LEMI-424 (.txt) and LEMI-423 (.B423) files. :param survey_id: Survey identifier :type survey_id: str :param station_id: Station identifier :type station_id: str :param kwargs: Additional keyword arguments passed to collection :type kwargs: dict :return: Path to created MTH5 file :rtype: pathlib.Path :Example: >>> from mth5.clients import LEMIClient >>> lc = LEMIClient("/data/lemi423", sample_rates=[1000]) >>> mth5_file = lc.make_mth5_from_lemi("MySurvey", "MT001") >>> print(f"Created: {mth5_file}") .. py:method:: make_mth5_from_lemi424(survey_id, station_id, **kwargs) Backward compatibility alias for make_mth5_from_lemi(). .. deprecated:: 0.4.0 Use :meth:`make_mth5_from_lemi` instead. This method will be removed in version 1.0.0. .. py:data:: LEMI424Client