Coverage for C: \ Users \ peaco \ OneDrive \ Documents \ GitHub \ mt_metadata \ mt_metadata \ features \ weight_kernel.py: 0%
17 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
1# =====================================================
2# Imports
3# =====================================================
4from typing import Annotated
6import numpy as np
7from pydantic import Field
9from mt_metadata.base import MetadataBase
10from mt_metadata.common.enumerations import StrEnumerationBase
13# =====================================================
14class ThresholdEnum(StrEnumerationBase):
15 low_cut = "low cut"
16 high_cut = "high cut"
19class HalfWindowStyleEnum(StrEnumerationBase):
20 hamming = "hamming"
21 hann = "hann"
22 rectangle = "rectangle"
25class FeatureWeightingWindow(MetadataBase):
26 threshold: Annotated[
27 ThresholdEnum,
28 Field(
29 default="low cut",
30 description="Specify which side of a threshold should downweighted.",
31 alias=None,
32 json_schema_extra={
33 "units": None,
34 "required": True,
35 "examples": ["low cut"],
36 },
37 ),
38 ]
40 half_window_style: Annotated[
41 HalfWindowStyleEnum,
42 Field(
43 default="hann",
44 description="What taper to use between the 0 (rejected) and 1 (accepted) values.",
45 alias=None,
46 json_schema_extra={
47 "units": None,
48 "required": True,
49 "examples": ["hann"],
50 },
51 ),
52 ]
54 transition_lower_bound: Annotated[
55 float,
56 Field(
57 default=-np.inf,
58 description="a refernece point for where the function begins to change from 0 to 1 or from 1 to zero",
59 alias=None,
60 json_schema_extra={
61 "units": None,
62 "required": True,
63 "examples": ["0.3"],
64 },
65 ),
66 ]
68 transition_upper_bound: Annotated[
69 float,
70 Field(
71 default=np.inf,
72 description="a refernece point for where the function finishes changing from 0 to 1 or from 1 to zero",
73 alias=None,
74 json_schema_extra={
75 "units": None,
76 "required": True,
77 "examples": ["0.999"],
78 },
79 ),
80 ]