Skip to content
Snippets Groups Projects
Commit bb9ba9b2 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

everything up and running again

parent 1cc97f49
No related branches found
No related tags found
Loading
Pipeline #22811 failed with stage
in 2 minutes and 6 seconds
......@@ -130,7 +130,6 @@ def flagByVariance(
Flags values may have changed, relatively to the flags input.
"""
dataseries = data[field]
delta = getFreqDelta(dataseries.index)
if not delta:
raise IndexError("Timeseries irregularly sampled!")
......@@ -142,6 +141,7 @@ def flagByVariance(
max_consec_missing = np.inf
min_periods = int(np.ceil(pd.Timedelta(window) / pd.Timedelta(delta)))
window = pd.Timedelta(window)
to_set = statPass(dataseries, lambda x: varQC(x, max_missing, max_consec_missing),
window, thresh, min_periods=min_periods, comparator='<')
......
......@@ -587,9 +587,9 @@ def getAttrOrApply(in_obj, apply_obj, attr_access='__name__', attr_or='apply'):
def statPass(datcol: pd.Series,
stat: Callable[[np.array, pd.Series], float],
wnsz: FreqString,
wnsz: pd.Timedelta,
thresh: PositiveFloat,
sub_wnsz: FreqString = None,
sub_wnsz: pd.Timedelta = None,
sub_thresh: PositiveFloat = None,
min_periods: PositiveInt = None,
comparator: Literal['>', '>=', '==', '<=', '<'] = '<'):
......@@ -618,7 +618,6 @@ def statPass(datcol: pd.Series,
exceeds = exceeding_sub & exceeds
to_set = pd.Series(False, index=exceeds.index)
for g in exceeds.groupby(by=exceeds.values):
if g[0]:
to_set[g[1].index[0] - wnsz:g[1].index[-1]] = True
......
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