mt_metadata.common.declination ============================== .. py:module:: mt_metadata.common.declination Classes ------- .. autoapisummary:: mt_metadata.common.declination.Declination Module Contents --------------- .. py:class:: Declination(**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:: comments :type: Annotated[mt_metadata.common.Comment, Field(default_factory=lambda: Comment(), description='any comments on declination', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['estimated from WMM 2016']})] .. py:attribute:: model :type: Annotated[mt_metadata.common.GeomagneticModelEnum, Field(default='IGRF', description='geomagnetic reference model used to calculate declination', json_schema_extra={'units': None, 'required': True, 'examples': ['WMM']})] .. py:attribute:: epoch :type: Annotated[str | None, Field(default=None, description='Epoch for which declination was approximated in.', json_schema_extra={'units': None, 'required': False, 'examples': ['2020']})] .. py:attribute:: value :type: Annotated[float, Field(default=0.0, description='declination angle relative to geographic north positive clockwise', json_schema_extra={'units': 'degrees', 'required': True, 'examples': ['12.5']})] .. py:method:: validate_comments(value, info) :classmethod: Validate that the value is a valid comment.