mt_metadata.processing.short_time_fourier_transform

Classes

MethodEnum

str(object='') -> str

PerWindowDetrendTypeEnum

str(object='') -> str

PreFftDetrendTypeEnum

str(object='') -> str

PrewhiteningTypeEnum

str(object='') -> str

ShortTimeFourierTransform

Base class for all metadata objects with Pydantic validation.

Module Contents

class mt_metadata.processing.short_time_fourier_transform.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.short_time_fourier_transform.PerWindowDetrendTypeEnum

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’.

linear = 'linear'
constant = 'constant'
null = ''
class mt_metadata.processing.short_time_fourier_transform.PreFftDetrendTypeEnum

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’.

linear = 'linear'
other = 'other'
null = ''
class mt_metadata.processing.short_time_fourier_transform.PrewhiteningTypeEnum

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’.

first_difference = 'first difference'
other = 'other'
class mt_metadata.processing.short_time_fourier_transform.ShortTimeFourierTransform(**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

harmonic_indices: Annotated[Union[int, list[int], None], Field(default=None, description='List of harmonics indices kept, if all use -1', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [[0, 4, 8]]})]
method: Annotated[MethodEnum, Field(default=MethodEnum.fft, description='Fourier transform method', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['fft']})]
min_num_stft_windows: Annotated[int, Field(default=0, description='How many FFT windows must be available for the time series to valid for STFT.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [4]})]
per_window_detrend_type: Annotated[PerWindowDetrendTypeEnum, Field(default=PerWindowDetrendTypeEnum.null, description='Additional detrending applied per window.  Not available for standard scipy spectrogram -- placholder for ARMA prewhitening.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['linear']})]
pre_fft_detrend_type: Annotated[PreFftDetrendTypeEnum, Field(default=PreFftDetrendTypeEnum.linear, description='Pre FFT detrend method to be applied', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['linear']})]
prewhitening_type: Annotated[PrewhiteningTypeEnum, Field(default=PrewhiteningTypeEnum.first_difference, description='Prewhitening method to be applied', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['first difference']})]
recoloring: Annotated[bool, Field(default=True, description='Whether the data are recolored [True] or not [False].', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': [True]})]
window: Annotated[mt_metadata.processing.window.Window, Field(default_factory=Window, description='Window settings', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['Window()']})]