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

added small test for modelling_rollingMean function

parent af25b889
No related branches found
No related tags found
3 merge requests!193Release 1.4,!188Release 1.4,!49Dataprocessing features
Pipeline #5189 passed with stage
in 6 minutes and 35 seconds
......@@ -182,11 +182,6 @@ def modelling_rollingMean(data, field, flagger, winsz, eval_flags=True, min_peri
center : boolean, default True
Wheather or not to center the window the mean is calculated of around the reference value. If False,
the reference value is placed to the right of the window (classic rolling mean with lag.)
kwargs
Returns
-------
"""
data = data.copy()
to_fit = data[field]
......
......@@ -9,7 +9,8 @@ from dios import dios
from test.common import TESTFLAGGER
from saqc.funcs.data_modelling import (
modelling_polyFit
modelling_polyFit,
modelling_rollingMean
)
TF = TESTFLAGGER[:1]
......@@ -32,3 +33,11 @@ def test_modelling_polyFit_forRegular(dat, flagger):
result5, _ = modelling_polyFit(data, 'data', flagger, 11, 2, numba=True, min_periods=9)
assert result5['data'].iloc[10:19].isna().all()
@pytest.mark.parametrize("flagger", TF)
@pytest.mark.parametrize("dat", [pytest.lazy_fixture("course_2")])
def test_modelling_rollingMean_forRegular(dat, flagger):
data, _ = dat(freq='10min', periods=30, initial_level=0, final_level=100, out_val=-100)
data = dios.DictOfSeries(data)
flagger = flagger.initFlags(data)
modelling_rollingMean(data, 'data', flagger, 5, eval_flags=True, min_periods=0, center=True)
modelling_rollingMean(data, 'data', flagger, 5, eval_flags=True, min_periods=0, center=False)
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