mt_metadata.transfer_functions.io.emtfxml.metadata.estimate
Classes
Base class for all metadata objects with Pydantic validation. |
Module Contents
- class mt_metadata.transfer_functions.io.emtfxml.metadata.estimate.Estimate(**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
- name: Annotated[str, Field(default='', description='Name of the statistical estimate', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['var']})]
- type: Annotated[mt_metadata.common.enumerations.ArrayDTypeEnum, Field(default='', description='Type of number contained in the estimate', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['real']})]
- description: Annotated[str, Field(default='', description='Description of the statistical estimate', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['this is an estimate']})]
- external_url: Annotated[pydantic.HttpUrl, Field(default='', description='Full path to external link that has additional information', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['http://www.iris.edu/dms/products/emtf/variance.html']})]
- intention: Annotated[mt_metadata.common.enumerations.EstimateIntentionEnum, Field(default='', description='The intension of the statistical estimate', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['error estimate']})]
- tag: Annotated[str, Field(default='', description='A useful tag for the estimate', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['tipper']})]
- read_dict(input_dict)
- Parameters:
input_dict (dict) – input dictionary containing estimate data
- Returns:
None
- Return type:
None
- to_xml(string=False, required=True)
- Parameters:
string (bool, optional) – return string representation, defaults to False
required (bool, optional) – include only required fields, defaults to True
- Returns:
XML representation of the estimate
- Return type:
str | Element