mt_metadata.transfer_functions.io.zfiles.metadata ================================================= .. py:module:: mt_metadata.transfer_functions.io.zfiles.metadata Submodules ---------- .. toctree:: :maxdepth: 1 /source/api/mt_metadata/transfer_functions/io/zfiles/metadata/channel/index Classes ------- .. autoapisummary:: mt_metadata.transfer_functions.io.zfiles.metadata.Channel Package Contents ---------------- .. py:class:: Channel(**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:: number :type: Annotated[int | None, Field(default=None, description='Channel number', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['1']})] .. py:attribute:: azimuth :type: Annotated[float, Field(default=0.0, description='channel azimuth', alias=None, json_schema_extra={'units': 'degrees', 'required': True, 'examples': ['90']})] .. py:attribute:: tilt :type: Annotated[float, Field(default=0.0, description='channel tilt relative to horizontal.', alias=None, json_schema_extra={'units': 'degrees', 'required': True, 'examples': ['100.0']})] .. py:attribute:: dl :type: Annotated[float | str, Field(default=0.0, description='dipole length in meters', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['0.0']})] .. py:attribute:: channel :type: Annotated[mt_metadata.common.enumerations.ChannelEnum, Field(default='', description='channel name', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['hx']})] .. py:property:: channel_string :type: str Return the channel name as a string for indexing purposes. .. py:property:: index .. py:method:: from_dict(channel_dict) fill attributes from a dictionary