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
0e459fae
Commit
0e459fae
authored
4 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
added small test for modelling_rollingMean function
parent
af25b889
No related branches found
No related tags found
3 merge requests
!193
Release 1.4
,
!188
Release 1.4
,
!49
Dataprocessing features
Pipeline
#5189
passed with stage
Stage: test
in 6 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
saqc/funcs/data_modelling.py
+0
-5
0 additions, 5 deletions
saqc/funcs/data_modelling.py
test/funcs/test_data_modelling.py
+10
-1
10 additions, 1 deletion
test/funcs/test_data_modelling.py
with
10 additions
and
6 deletions
saqc/funcs/data_modelling.py
+
0
−
5
View file @
0e459fae
...
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
test/funcs/test_data_modelling.py
+
10
−
1
View file @
0e459fae
...
...
@@ -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
)
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