Skip to content
Snippets Groups Projects
Commit b7297e41 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

fixed core signatures again

parent 7a257b97
No related branches found
No related tags found
No related merge requests found
Pipeline #36816 passed with stage
in 2 minutes and 28 seconds
......@@ -9,8 +9,8 @@ from saqc.core import (
flagging,
initFlagsLike,
Flags,
SaQC,
FloatTranslator,
DmpTranslator,
PositionalTranslator,
SaQC,
)
......@@ -28,7 +28,7 @@ class ChangePoints(ModuleBase):
reduce_window: FreqString = None,
reduce_func: Callable[[np.ndarray, np.ndarray], int] = lambda x, _: x.argmax(),
flag: float = BAD,
**kwargs
**kwargs,
) -> saqc.SaQC:
return self.defer("flagChangePoints", locals())
......@@ -51,6 +51,6 @@ class ChangePoints(ModuleBase):
flag_changepoints: bool = False,
assign_cluster: bool = True,
flag: float = BAD,
**kwargs
**kwargs,
) -> saqc.SaQC:
return self.defer("assignChangePointCluster", locals())
......@@ -36,6 +36,6 @@ class FlagTools(ModuleBase):
mflag: Any = 1,
method: Literal["plain", "ontime", "left-open", "right-open"] = "plain",
flag: float = BAD,
**kwargs
**kwargs,
) -> saqc.SaQC:
return self.defer("flagManual", locals())
......@@ -7,7 +7,7 @@ from typing import Callable
import numpy as np
import pandas as pd
from saqc.constants import BAD
from saqc.constants import UNFLAGGED, BAD
from saqc.core.modules.base import ModuleBase
import saqc
......@@ -18,7 +18,8 @@ class Generic(ModuleBase):
field: str,
func: Callable[[pd.Series], pd.Series],
nodata: float = np.nan,
**kwargs
to_mask: float = UNFLAGGED,
**kwargs,
) -> saqc.SaQC:
return self.defer("process", locals())
......@@ -28,6 +29,7 @@ class Generic(ModuleBase):
func: Callable[[pd.Series], pd.Series],
nodata: float = np.nan,
flag: float = BAD,
**kwargs
to_mask: float = UNFLAGGED,
**kwargs,
) -> saqc.SaQC:
return self.defer("flag", locals())
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
from __future__ import annotations
import numpy
import numpy as np
import pandas as pd
from typing import Callable
......@@ -17,12 +17,13 @@ class Noise(ModuleBase):
def flagByStatLowPass(
self,
field: ColumnName,
stat: Callable[[numpy.array, pd.Series], float],
stat: Callable[[np.array, pd.Series], float],
winsz: FreqString,
thresh: PositiveFloat,
sub_winsz: FreqString = None,
sub_thresh: PositiveFloat = None,
min_periods: PositiveInt = None,
flag: float = BAD,
**kwargs
) -> saqc.SaQC:
return self.defer("flagByStatLowPass", locals())
......@@ -11,23 +11,11 @@ import saqc
class Pattern(ModuleBase):
def flagPatternByDTW(
self,
field: str,
ref_field: str,
max_distance: float = 0.0,
normalize=True,
flag: float = BAD,
**kwargs
self, field, ref_field, max_distance=0.0, normalize=True, flag=BAD, **kwargs
) -> saqc.SaQC:
return self.defer("flagPatternByDTW", locals())
def flagPatternByWavelet(
self,
field: str,
ref_field: str,
widths: Sequence[int] = (1, 2, 4, 8),
waveform: str = "mexh",
flag: float = BAD,
**kwargs
self, field, ref_field, widths=(1, 2, 4, 8), waveform="mexh", flag=BAD, **kwargs
) -> saqc.SaQC:
return self.defer("flagPatternByWavelet", locals())
......@@ -33,9 +33,7 @@ class Resampling(ModuleBase):
field: str,
freq: str,
method: Literal["fshift", "bshift", "nshift"] = "nshift",
freq_check: Optional[
Literal["check", "auto"]
] = None, # TODO: not a user decision
freq_check: Optional[Literal["check", "auto"]] = None,
**kwargs,
) -> saqc.SaQC:
return self.defer("shift", locals())
......@@ -66,6 +64,7 @@ class Resampling(ModuleBase):
"inverse_fshift",
"inverse_bshift",
"inverse_nshift",
"inverse_interpolation",
],
source: str,
freq: Optional[str] = None,
......
......@@ -6,7 +6,7 @@ from typing import Union, Callable
import numpy as np
import pandas as pd
from saqc.constants import *
from saqc.constants import BAD
from saqc.core.modules.base import ModuleBase
import saqc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment