mt_metadata.transfer_functions.io.edi.metadata.emeasurement
Classes
Base class for all metadata objects with Pydantic validation. |
Module Contents
- class mt_metadata.transfer_functions.io.edi.metadata.emeasurement.EMeasurement(**data)
Bases:
mt_metadata.base.MetadataBaseBase 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.
- _skip_equals
Private attribute listing fields to skip in equality comparisons
- Type:
list[str]
- _fields
Private attribute caching field information
- Type:
dict[str, Any]
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
- id: Annotated[float | None, Field(default=0.0, description='Channel number, could be location.channel_number.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['1']})]
- chtype: Annotated[str, Field(default='', description="channel type, should start with an 'e'", alias=None, pattern='^(RR|rr|[eE])[a-zA-Z0-9_]+$', json_schema_extra={'units': None, 'required': True, 'examples': ['ex']})]
- x: Annotated[float, Field(default=0.0, description='location of negative sensor relative center point in north direction', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- x2: Annotated[float, Field(default=0.0, description='location of positive sensor relative center point in north direction', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- y: Annotated[float, Field(default=0.0, description='location of negative sensor relative center point in east direction', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- y2: Annotated[float, Field(default=0.0, description='location of positive sensor relative center point in east direction', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- z: Annotated[float, Field(default=0.0, description='location of negative sensor relative center point in depth', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- z2: Annotated[float, Field(default=0.0, description='location of positive sensor relative center point in depth', alias=None, json_schema_extra={'units': 'meters', 'required': True, 'examples': ['100.0']})]
- azm: Annotated[float, Field(default=0.0, description='orientation of the sensor relative to coordinate system, clockwise positive.', alias=None, json_schema_extra={'units': 'degrees', 'required': True, 'examples': ['100.0']})]
- acqchan: Annotated[str, Field(default='', description='description of acquired channel', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['100.0']})]
- classmethod validate_id(value)
Ensure id is a float or None, convert if necessary
- update_azimuth_from_coords()
Update azm based on coordinates after validation
- property dipole_length: float
dipole length based on x, y, z coordinates
- property azimuth: float
aximuth based on x, y coordinates
- property channel_number: int
Extract channel number from acqchan.
- write_meas_line()
write string :return: DESCRIPTION :rtype: TYPE