Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rdm-software
SaQC
Commits
d3bc4258
Commit
d3bc4258
authored
5 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
clean up
parent
3b4c3d7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!21
Gcef testfuncs
,
!20
Gcef testfuncs
Pipeline
#3077
passed with stage
in 6 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
saqc/funcs/spike_detection.py
+4
-2
4 additions, 2 deletions
saqc/funcs/spike_detection.py
test/funcs/test_spike_detection.py
+0
-7
0 additions, 7 deletions
test/funcs/test_spike_detection.py
with
4 additions
and
9 deletions
saqc/funcs/spike_detection.py
+
4
−
2
View file @
d3bc4258
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
test/funcs/test_spike_detection.py
+
0
−
7
View file @
d3bc4258
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment