Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
36
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
a5d409c7
Commit
a5d409c7
authored
4 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
small fix
parent
d52610d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!207
small changes to get rid of #104
Pipeline
#15043
passed with stage
in 6 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/funcs/outliers.py
+9
-2
9 additions, 2 deletions
saqc/funcs/outliers.py
with
9 additions
and
2 deletions
saqc/funcs/outliers.py
+
9
−
2
View file @
a5d409c7
...
...
@@ -717,8 +717,9 @@ def flagOffset(data, field, flagger, thresh, tolerance, window, numba_kickin=200
Minimum difference between to values, to consider the latter one as a spike. See condition (1)
tolerance : float, default 0
Maximum difference between pre-spike and post-spike values. See condition (2)
window : str, default
'
15min
'
Maximum length of
"
spiky
"
value courses. See condition (3)
window : {str, int}, default
'
15min
'
Maximum length of
"
spiky
"
value courses. See condition (3). Integer defined window length are only allowed for
regularly sampled timeseries.
numba_kickin : int, default 200000
When there are detected more than `numba_kickin` incidents of potential spikes,
the pandas.rolling - part of computation gets
"
jitted
"
with numba.
...
...
@@ -743,6 +744,12 @@ def flagOffset(data, field, flagger, thresh, tolerance, window, numba_kickin=200
"""
dataseries
=
data
[
field
].
dropna
()
if
isinstance
(
window
,
int
):
delta
=
getFreqDelta
(
dataseries
.
index
)
if
not
delta
:
raise
TypeError
(
'
Only offset string defined window sizes allowed for irrgegularly sampled timeseries
'
)
window
=
delta
*
window
# get all the entries preceding a significant jump
post_jumps
=
dataseries
.
diff
().
abs
()
>
thresh
post_jumps
=
post_jumps
[
post_jumps
]
...
...
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