mt_metadata.transfer_functions.tf ================================= .. py:module:: mt_metadata.transfer_functions.tf .. autoapi-nested-parse:: ================== metadata ================== This module deals with metadata as defined by the MT metadata standards. `metadata documentation `_. There are multiple containers for each type of metadata, named appropriately. Each container will be able to read and write: * dictionary * json * xml * csv? * pandas.Series * anything else? Because a lot of the name words in the metadata are split by '.' there are some issues we need to deal with. I wrote in get and set attribute functions to handle these types of names so the user shouldn't have to work about splitting the names themselves. These containers will be the building blocks for the metadata and how they are interchanged between the HDF5 file and the user. A lot of the metadata you can get directly from the raw time series files, but the user will need to input a decent amount on their own. Dictionaries are the most fundamental type we should be dealing with. Each container has an attribute called _attr_dict which dictates if the attribute is included in output objects, the data type, whether it is a required parameter, and the style of output. This should help down the road with validation and keeping the data types consistent. And if things change you should only have to changes these dictionaries. self._attr_dict = {'nameword':{'type': str, 'required': True, 'style': 'name'}} Created on Sun Apr 24 20:50:41 2020 :copyright: Jared Peacock (jpeacock@usgs.gov) :license: MIT Submodules ---------- .. toctree:: :maxdepth: 1 /source/api/mt_metadata/transfer_functions/tf/station/index /source/api/mt_metadata/transfer_functions/tf/statistical_estimate/index /source/api/mt_metadata/transfer_functions/tf/transfer_function/index Classes ------- .. autoapisummary:: mt_metadata.transfer_functions.tf.TransferFunction mt_metadata.transfer_functions.tf.Station Package Contents ---------------- .. py:class:: TransferFunction(**data) Bases: :py:obj:`mt_metadata.base.MetadataBase` Base class for all metadata objects with Pydantic validation. MetadataBase extends DotNotationBaseModel (which inherits from Pydantic's BaseModel) to provide automatic validation according to metadata standards. It adds functionality beyond dictionaries, supporting JSON, XML, pandas Series, and other formats for metadata interchange. .. attribute:: _skip_equals Private attribute listing fields to skip in equality comparisons :type: list[str] .. attribute:: _fields Private attribute caching field information :type: dict[str, Any] .. rubric:: Notes - All field assignments are validated automatically via Pydantic - None values are converted to appropriate defaults (empty string or 0.0) - Supports nested attribute access via dot notation - Thread-safe for read operations after initialization .. py:attribute:: id :type: Annotated[str, Field(default='', description='transfer function id', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['mt01_256']})] .. py:attribute:: sign_convention :type: Annotated[mt_metadata.common.SignConventionEnum, Field(default='+', description='sign of the transfer function estimates', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['+']})] .. py:attribute:: units :type: Annotated[str, Field(default='milliVolt per kilometer per nanoTesla', description='units of the impedance tensor estimates', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['milliVolt per kilometer per nanoTesla']})] .. py:attribute:: runs_processed :type: Annotated[list[str], Field(default=[], description='list of runs used in the processing', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [['MT001a', 'MT001c']]})] .. py:attribute:: remote_references :type: Annotated[list[str], Field(default_factory=list, description='list of remote references', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [['MT002b', 'MT002c']]})] .. py:attribute:: processed_date :type: Annotated[mt_metadata.common.mttime.MTime | str | float | int | numpy.datetime64 | pandas.Timestamp, Field(default_factory=lambda: MTime(time_stamp=None), description='date the data were processed', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['2020-01-01T12:00:00']})] .. py:attribute:: processing_parameters :type: Annotated[list[str], Field(default_factory=list, description='list of processing parameters with structure name = value', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [['nfft=4096', 'n_windows=16']]})] .. py:attribute:: processed_by :type: Annotated[mt_metadata.common.AuthorPerson, Field(default_factory=AuthorPerson, description='person who processed the data', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ["Person(name='John Doe', email='john.doe@example.com')"]})] .. py:attribute:: processing_type :type: Annotated[str, Field(default='', description='Type of processing', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['robust remote reference']})] .. py:attribute:: software :type: Annotated[mt_metadata.common.Software, Field(default_factory=Software, description='software used to process the data', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ["Software(name='Aurora', version='1.0.0')"]})] .. py:attribute:: data_quality :type: Annotated[mt_metadata.common.DataQuality, Field(default_factory=DataQuality, description='data quality information', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['DataQuality()']})] .. py:attribute:: coordinate_system :type: Annotated[mt_metadata.common.GeographicReferenceFrameEnum, Field(default=GeographicReferenceFrameEnum.geographic, description='coordinate system that the transfer function is in. It is strongly recommended that the transfer functions be rotated to align with geographic coordinates with geographic north as 0 and east as 90.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['geographic']})] .. py:attribute:: processing_config :type: Annotated[str | None, Field(default=None, description='processing configuration', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['aurora.processing']})] .. py:method:: validate_processed_date(field_value) :classmethod: .. py:method:: validate_units(value) :classmethod: .. py:method:: validate_coordinate_system(value) :classmethod: .. py:class:: Station(**data) Bases: :py:obj:`mt_metadata.timeseries.Station` Base class for all metadata objects with Pydantic validation. MetadataBase extends DotNotationBaseModel (which inherits from Pydantic's BaseModel) to provide automatic validation according to metadata standards. It adds functionality beyond dictionaries, supporting JSON, XML, pandas Series, and other formats for metadata interchange. .. attribute:: _skip_equals Private attribute listing fields to skip in equality comparisons :type: list[str] .. attribute:: _fields Private attribute caching field information :type: dict[str, Any] .. rubric:: Notes - All field assignments are validated automatically via Pydantic - None values are converted to appropriate defaults (empty string or 0.0) - Supports nested attribute access via dot notation - Thread-safe for read operations after initialization .. py:attribute:: transfer_function :type: Annotated[mt_metadata.transfer_functions.tf.transfer_function.TransferFunction, Field(default=TransferFunction(), description='Transfer function for the station', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['TransferFunction()']})]