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

clean up

parent 3b4c3d7b
No related branches found
No related tags found
2 merge requests!21Gcef testfuncs,!20Gcef testfuncs
Pipeline #3077 passed with stage
in 6 minutes and 36 seconds
......@@ -25,11 +25,13 @@ def flagSpikes_limitRaise(
data, field, flagger, thresh, raise_window, intended_freq, average_window=None, mean_raise_factor=2, min_slope=None,
min_slope_weight=0.8, numba_boost=True, **kwargs
):
""" flag a value if it deviates from any of its preceeding values within "window" range, in a margin higher than
thresh """
# NOTE1: this implementation accounts for the case of "pseudo" spikes that result from checking against outliers
# NOTE2: the test is designed to work on raw data as well as on regularized
#
# See saqc documentation at:
# https://git.ufz.de/rdm-software/saqc/blob/develop/docs/funcs/SpikeDetection.md
# for more details
# prepare input args
dataseries = data[field].dropna()
......
......@@ -101,10 +101,3 @@ def test_flagSpikesLimitRaise(dat, flagger):
assert not flagger_result.isFlagged(field)[characteristics['return']].any()
assert not flagger_result.isFlagged(field)[characteristics['drop']].any()
if __name__ == "__main__":
import conftest
flagger = TESTFLAGGER[1]
test_flagSpikesLimitRaise(conftest.course_2,flagger)
print('stop')
\ No newline at end of file
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