mt_metadata.processing.fourier_coefficients.fc

Classes

MethodEnum

str(object='') -> str

FC

Base class for all metadata objects with Pydantic validation.

Module Contents

class mt_metadata.processing.fourier_coefficients.fc.MethodEnum

Bases: mt_metadata.common.enumerations.StrEnumerationBase

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.

fft = 'fft'
wavelet = 'wavelet'
other = 'other'
class mt_metadata.processing.fourier_coefficients.fc.FC(**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

decimation_levels: Annotated[list[str], Field(default_factory=list, description='List of decimation levels', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['[1, 2, 3]']})]
id: Annotated[str, Field(default='', description='ID given to the FC group', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['aurora_01']})]
channels_estimated: Annotated[list[str], Field(default_factory=list, description='list of channels estimated', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [['ex', 'hy']]})]
starting_sample_rate: Annotated[float, Field(default=1.0, description='Starting sample rate of the time series used to estimate FCs.', alias=None, json_schema_extra={'units': 'samples per second', 'required': True, 'examples': [60]})]
method: Annotated[MethodEnum, Field(default=MethodEnum.fft, description='Fourier transform method', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['fft']})]
time_period: Annotated[mt_metadata.common.TimePeriod, Field(default_factory=TimePeriod, description='Time period of the FCs', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [TimePeriod(start='2020-01-01', end='2020-01-02')]})]
levels: Annotated[mt_metadata.common.ListDict, Field(default_factory=ListDict, description='ListDict of decimation levels and their parameters', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['ListDict containing Decimation objects']})]
classmethod validate_channels_estimated(value, info)
classmethod validate_levels(value, info)
synchronize_levels()

Ensure that decimation_levels and levels are synchronized. - Creates Decimation objects for any levels in decimation_levels that don’t exist in levels - Adds level names to decimation_levels for any existing levels not in the list

has_decimation_level(level)

Check to see if the decimation_level already exists

Parameters:

level (string) – decimation_level level to look for

Returns:

True if found, False if not

Return type:

boolean

decimation_level_index(level)

get index of the decimation_level in the decimation_level list

get_decimation_level(level)

Get a decimation_level

Parameters:

level (string) – decimation_level level to look for

Returns:

decimation_level object based on decimation_level type

Return type:

mt_metadata.timeseries.decimation_level

add_decimation_level(fc_decimation)

Add a decimation_level to the list, check if one exists if it does overwrite it

Parameters:

fc_decimation (mt_metadata.processing.fourier_coefficients.decimation_basemodel.Decimation) – decimation level object to add

remove_decimation_level(decimation_level_id)

remove a ch from the survey

Parameters:

level (string) – decimation_level level to look for

property n_decimation_levels
update_time_period()

update time period from ch information