mt_metadata.transfer_functions.io.emtfxml.metadata.processing_info

Classes

ProcessingInfo

Base class for all metadata objects with Pydantic validation.

Module Contents

class mt_metadata.transfer_functions.io.emtfxml.metadata.processing_info.ProcessingInfo(**data)

Bases: 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.

_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

sign_convention: Annotated[mt_metadata.common.enumerations.SignConventionEnum, Field(default='exp(+ i\\omega t)', description='Sign convention of the processing software output', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['exp(+ i\\omega t)']})]
processed_by: Annotated[str | None, Field(default=None, description='Names of people who processed the data', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['MT Guru']})]
process_date: Annotated[mt_metadata.common.mttime.MTime | str | float | int | numpy.datetime64 | pandas.Timestamp | None, Field(default_factory=lambda: MTime(time_stamp=None), description='Date the data were processed', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['2020-01-01']})]
processing_tag: Annotated[str | None, Field(default=None, description='List of remote references', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['mt001-mt002']})]
processing_software: Annotated[mt_metadata.transfer_functions.io.emtfxml.metadata.ProcessingSoftware, Field(default_factory=lambda: ProcessingSoftware(), description='Information about the processing software used', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ["ProcessingSoftware(name='MT Processing Software', version='1.0')"]})]
remote_info: Annotated[mt_metadata.transfer_functions.io.emtfxml.metadata.RemoteInfo, Field(default_factory=RemoteInfo, description='Information about remote data sources', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ["RemoteInfo(name='MT Remote')"]})]
remote_ref: Annotated[mt_metadata.transfer_functions.io.emtfxml.metadata.RemoteRef, Field(default_factory=RemoteRef, description='List of remote references', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': [['MT001a', 'MT001b']]})]
classmethod validate_process_date(field_value)
read_dict(input_dict)

Read processing information from a dictionary.

Parameters:

input_dict (dict) – A dictionary containing processing information.

to_xml(string=False, required=True)

Convert the processing information to XML format.

Parameters:
  • string (bool, optional) – Whether to return the XML as a string, by default False

  • required (bool, optional) – Whether the XML is required, by default True

Returns:

The XML representation of the processing information

Return type:

str | et.Element