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
b04be6ca
Commit
b04be6ca
authored
2 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
track interpolation routines in history
parent
59e5c183
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!685
Release 2.4
,
!684
Release 2.4
,
!567
Release 2.2.1
,
!566
Release 2.2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
saqc/funcs/interpolation.py
+32
-6
32 additions, 6 deletions
saqc/funcs/interpolation.py
with
33 additions
and
6 deletions
CHANGELOG.md
+
1
−
0
View file @
b04be6ca
...
...
@@ -15,6 +15,7 @@ This changelog starts with version 2.0.0. Basically all parts of the system, inc
-
translation of
`dfilter`
-
new generic function
`clip`
-
parameter
`min_periods`
to
`SaQC.flagConstants`
-
tracking interpolation routines in
`History`
### Changed
-
test function interface changed to
`func(saqc: SaQC, field: str | Sequence[str], *args, **kwargs)`
-
lib function
`butterFilter`
returns
`NaN`
for too-short series
...
...
This diff is collapsed.
Click to expand it.
saqc/funcs/interpolation.py
+
32
−
6
View file @
b04be6ca
...
...
@@ -113,13 +113,23 @@ class InterpolationMixin:
datcol
[
na_mask
]
=
rolled
[
na_mask
]
self
.
_data
[
field
]
=
datcol
new_
col
=
pd
.
Series
(
np
.
nan
,
index
=
self
.
_flags
[
field
].
index
)
new_
col
.
loc
[
interpolated
]
=
np
.
nan
if
flag
is
None
else
flag
flag
col
=
pd
.
Series
(
np
.
nan
,
index
=
self
.
_flags
[
field
].
index
)
flag
col
.
loc
[
interpolated
]
=
np
.
nan
if
flag
is
None
else
flag
# todo kwargs must have all passed args except data,field,flags
self
.
_flags
.
history
[
field
].
append
(
new_col
,
{
"
func
"
:
"
interpolateByRolling
"
,
"
args
"
:
(),
"
kwargs
"
:
kwargs
}
)
meta
=
{
"
func
"
:
"
interpolateByRolling
"
,
"
args
"
:
(
field
,),
"
kwargs
"
:
{
"
window
"
:
window
,
"
func
"
:
func
,
"
center
"
:
center
,
"
min_periods
"
:
min_periods
,
"
flag
"
:
flag
,
**
kwargs
,
},
}
self
.
_flags
.
history
[
field
].
append
(
flagcol
,
meta
)
return
self
...
...
@@ -286,8 +296,24 @@ class InterpolationMixin:
history
=
self
.
_flags
.
history
[
field
].
apply
(
index
=
self
.
_data
[
field
].
index
,
func
=
_resampleOverlapping
,
func_kws
=
dict
(
freq
=
freq
,
fill_value
=
UNFLAGGED
),
func_kws
=
dict
(
freq
=
freq
,
fill_value
=
np
.
nan
),
)
meta
=
{
"
func
"
:
"
interpolateIndex
"
,
"
args
"
:
(
field
,),
"
kwargs
"
:
{
"
freq
"
:
freq
,
"
method
"
:
method
,
"
order
"
:
order
,
"
limit
"
:
limit
,
"
downgrade
"
:
downgrade
,
**
kwargs
,
},
}
flagcol
=
pd
.
Series
(
UNFLAGGED
,
index
=
inter_data
.
index
)
history
.
append
(
flagcol
,
meta
)
self
.
_flags
.
history
[
field
]
=
history
return
self
This diff is collapsed.
Click to expand it.
David Schäfer
@schaefed
mentioned in commit
63b55c6d
·
2 years ago
mentioned in commit
63b55c6d
mentioned in commit 63b55c6d7dadb0e612b23a897f292d5ffc14cb52
Toggle commit list
David Schäfer
@schaefed
mentioned in commit
684dc8a0
·
2 years ago
mentioned in commit
684dc8a0
mentioned in commit 684dc8a0515470d644fc85fee95d07661c8dd572
Toggle commit list
David Schäfer
@schaefed
mentioned in commit
8f7a90e4
·
1 year ago
mentioned in commit
8f7a90e4
mentioned in commit 8f7a90e4aed61c79a9dc8d67541a46beba0907e8
Toggle commit list
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