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
c455fdc0
Commit
c455fdc0
authored
4 years ago
by
Bert Palm
🎇
Browse files
Options
Downloads
Patches
Plain Diff
improved SaQC.getResult()
parent
e02dcbf7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!193
Release 1.4
,
!188
Release 1.4
Pipeline
#4880
passed with stage
in 6 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/core/core.py
+20
-1
20 additions, 1 deletion
saqc/core/core.py
with
20 additions
and
1 deletion
saqc/core/core.py
+
20
−
1
View file @
c455fdc0
...
...
@@ -119,7 +119,21 @@ class SaQC:
out
=
out
.
_wrap
(
func
,
lineno
=
lineno
,
expr
=
expr
)(
**
kwargs
)
return
out
def
getResult
(
self
):
def
getResult
(
self
,
write_back
=
False
):
"""
Do the actual calculations and return the results.
Parameters
----------
write_back: bool, default False
If False, every call will recalculate, eventually plot and return the result anew.
If True the resulting data is written back in the SaQC object itself, like if
the object would have been initialized with it. Further calls will then directly
return the result with no recalculation needed, but a replotting is not possible.
Returns
-------
data, flagger: (DictOfSeries, DictOfSeries)
"""
data
,
flagger
=
self
.
_data
,
self
.
_flagger
for
field
,
func
in
self
.
_to_call
:
...
...
@@ -143,6 +157,11 @@ class SaQC:
if
any
([
func
.
plot
for
_
,
func
in
self
.
_to_call
]):
plotAllHook
(
data
,
flagger
)
if
write_back
:
self
.
_data
=
data
self
.
_flagger
=
flagger
self
.
_to_call
=
[]
return
data
,
flagger
def
_wrap
(
self
,
func
,
lineno
=
None
,
expr
=
None
):
...
...
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