mt_metadata.features.weights.taper_weight_kernel

Module with a compound kernel, mixing multiple monotonic kernels.

Classes

TaperWeightKernel

A composite weight kernel that multiplies a low-cut and a high-cut monotonic taper kernel.

Module Contents

class mt_metadata.features.weights.taper_weight_kernel.TaperWeightKernel(**data)

Bases: mt_metadata.features.weights.base.Base

A composite weight kernel that multiplies a low-cut and a high-cut monotonic taper kernel.

Parameters:
  • low_cut (tuple[float, float]) – (lower_bound, upper_bound) for the low-cut transition region.

  • high_cut (tuple[float, float]) – (lower_bound, upper_bound) for the high-cut transition region.

  • style (str, optional) – The taper style to use (default is ‘hann’).

  • **kwargs – Additional keyword arguments passed to BaseWeightKernel.

low_cut: Annotated[Tuple[float, float], Field(description='Low cut transition bounds', json_schema_extra={'units': None, 'required': True, 'examples': [[0.1, 0.5]]})]
high_cut: Annotated[Tuple[float, float], Field(description='High cut transition bounds', json_schema_extra={'units': None, 'required': True, 'examples': [[0.5, 1.0]]})]
style: Annotated[mt_metadata.processing.window.TypeEnum, Field(description='Taper style', json_schema_extra={'units': None, 'required': True, 'examples': ['hann', 'hamming', 'blackman']})]
property low_kernel: mt_metadata.features.weights.taper_monotonic_weight_kernel.TaperMonotonicWeightKernel

The low-cut taper kernel.

property high_kernel: mt_metadata.features.weights.taper_monotonic_weight_kernel.TaperMonotonicWeightKernel

The high-cut taper kernel.

evaluate(values)

Evaluate the composite taper weight kernel on the input values.

Parameters:

values (np.ndarray) – Input values to evaluate the kernel on.

Returns:

The product of the low-cut and high-cut kernel evaluations.

Return type:

np.ndarray