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
9468f35c
Commit
9468f35c
authored
5 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
renamed registered functions
parent
da10e27d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/funcs/soil_moisture_tests.py
+7
-6
7 additions, 6 deletions
saqc/funcs/soil_moisture_tests.py
with
7 additions
and
6 deletions
saqc/funcs/soil_moisture_tests.py
+
7
−
6
View file @
9468f35c
...
@@ -17,7 +17,7 @@ from saqc.lib.tools import (
...
@@ -17,7 +17,7 @@ from saqc.lib.tools import (
)
)
@register
(
"
S
oilMoisture
S
pikes
"
)
@register
(
"
s
oilMoisture
_s
pikes
"
)
def
flagSoilMoistureSpikes
(
def
flagSoilMoistureSpikes
(
data
,
data
,
field
,
field
,
...
@@ -53,7 +53,7 @@ def flagSoilMoistureSpikes(
...
@@ -53,7 +53,7 @@ def flagSoilMoistureSpikes(
)
)
@register
(
"
S
oilMoisture
B
reaks
"
)
@register
(
"
s
oilMoisture
_b
reaks
"
)
def
flagSoilMoistureBreaks
(
def
flagSoilMoistureBreaks
(
data
,
data
,
field
,
field
,
...
@@ -95,7 +95,7 @@ def flagSoilMoistureBreaks(
...
@@ -95,7 +95,7 @@ def flagSoilMoistureBreaks(
)
)
@register
(
"
S
oilMoisture
ByF
rost
"
)
@register
(
"
s
oilMoisture
_f
rost
"
)
def
flagSoilMoistureBySoilFrost
(
def
flagSoilMoistureBySoilFrost
(
data
,
data
,
field
,
field
,
...
@@ -145,7 +145,7 @@ def flagSoilMoistureBySoilFrost(
...
@@ -145,7 +145,7 @@ def flagSoilMoistureBySoilFrost(
return
data
,
flagger
return
data
,
flagger
# wrap around df.index.get_loc method, to catch key error in case of empty tolerance window:
# wrap around df.index.get_loc method, to catch key error in case of empty tolerance window:
def
check
_n
earest
_for_f
rost
(
ref_date
,
ref_series
,
tolerance
,
check_level
):
def
_
check
N
earest
ForF
rost
(
ref_date
,
ref_series
,
tolerance
,
check_level
):
try
:
try
:
# if there is no reference value within tolerance margin, following line will raise key error and
# if there is no reference value within tolerance margin, following line will raise key error and
...
@@ -164,14 +164,14 @@ def flagSoilMoistureBySoilFrost(
...
@@ -164,14 +164,14 @@ def flagSoilMoistureBySoilFrost(
temp_frame
=
pd
.
Series
(
data
.
index
)
temp_frame
=
pd
.
Series
(
data
.
index
)
# get flagging mask ("True" denotes "bad"="test succesfull")
# get flagging mask ("True" denotes "bad"="test succesfull")
mask
=
temp_frame
.
apply
(
mask
=
temp_frame
.
apply
(
check
_n
earest
_for_f
rost
,
args
=
(
refseries
,
tolerated_deviation
,
frost_level
)
_
check
N
earest
ForF
rost
,
args
=
(
refseries
,
tolerated_deviation
,
frost_level
)
)
)
# apply calculated flags
# apply calculated flags
flagger
=
flagger
.
setFlags
(
field
,
mask
.
values
,
**
kwargs
)
flagger
=
flagger
.
setFlags
(
field
,
mask
.
values
,
**
kwargs
)
return
data
,
flagger
return
data
,
flagger
@register
(
"
S
oilMoisture
ByP
recipitation
"
)
@register
(
"
s
oilMoisture
_p
recipitation
"
)
def
flagSoilMoistureByPrecipitationEvents
(
def
flagSoilMoistureByPrecipitationEvents
(
data
,
data
,
field
,
field
,
...
@@ -305,6 +305,7 @@ def flagSoilMoistureByPrecipitationEvents(
...
@@ -305,6 +305,7 @@ def flagSoilMoistureByPrecipitationEvents(
return
data
,
flagger
return
data
,
flagger
@register
(
"
soilMoisture_constant
"
)
def
flagSoilMoistureByConstantsDetection
(
def
flagSoilMoistureByConstantsDetection
(
data
,
data
,
field
,
field
,
...
...
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