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
37a196a1
Commit
37a196a1
authored
1 year ago
by
Bert Palm
🎇
Browse files
Options
Downloads
Plain Diff
Merge branch 'isunflagged' into 'develop'
introduced isunflagged See merge request
!678
parents
45212c5a
7a22660e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!685
Release 2.4
,
!684
Release 2.4
,
!678
introduced isunflagged
Pipeline
#164954
passed with stages
in 10 minutes and 11 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
saqc/funcs/breaks.py
+3
-3
3 additions, 3 deletions
saqc/funcs/breaks.py
saqc/funcs/generic.py
+2
-2
2 additions, 2 deletions
saqc/funcs/generic.py
saqc/funcs/noise.py
+2
-2
2 additions, 2 deletions
saqc/funcs/noise.py
saqc/lib/tools.py
+4
-0
4 additions, 0 deletions
saqc/lib/tools.py
with
11 additions
and
7 deletions
saqc/funcs/breaks.py
+
3
−
3
View file @
37a196a1
...
...
@@ -25,7 +25,7 @@ import pandas as pd
from
saqc
import
BAD
,
FILTER_ALL
from
saqc.core
import
flagging
,
register
from
saqc.funcs.changepoints
import
_getChangePoints
from
saqc.lib.tools
import
isflagged
from
saqc.lib.tools
import
is
un
flagged
if
TYPE_CHECKING
:
from
saqc.core.core
import
SaQC
...
...
@@ -65,7 +65,7 @@ class BreaksMixin:
datacol
=
self
.
_data
[
field
]
mask
=
datacol
.
isna
()
mask
=
~
isflagged
(
self
.
_flags
[
field
],
dfilter
)
&
mask
mask
=
is
un
flagged
(
self
.
_flags
[
field
],
dfilter
)
&
mask
self
.
_flags
[
mask
,
field
]
=
flag
return
self
...
...
@@ -223,6 +223,6 @@ class BreaksMixin:
result
=
"
mask
"
,
)
mask
=
~
isflagged
(
self
.
_flags
[
field
],
dfilter
)
&
mask
mask
=
is
un
flagged
(
self
.
_flags
[
field
],
dfilter
)
&
mask
self
.
_flags
[
mask
,
field
]
=
flag
return
self
This diff is collapsed.
Click to expand it.
saqc/funcs/generic.py
+
2
−
2
View file @
37a196a1
...
...
@@ -14,7 +14,7 @@ import pandas as pd
from
saqc
import
BAD
,
FILTER_ALL
from
saqc.core
import
DictOfSeries
,
Flags
,
register
from
saqc.lib.tools
import
isAllBoolean
,
isflagged
,
toSequence
from
saqc.lib.tools
import
isAllBoolean
,
isflagged
,
isunflagged
,
toSequence
from
saqc.parsing.environ
import
ENVIRONMENT
if
TYPE_CHECKING
:
...
...
@@ -286,7 +286,7 @@ class GenericMixin:
self
.
_flags
[
col
]
=
pd
.
Series
(
np
.
nan
,
index
=
mask
.
index
)
# respect existing flags
mask
=
~
isflagged
(
self
.
_flags
[
col
],
thresh
=
dfilter
)
&
mask
mask
=
is
un
flagged
(
self
.
_flags
[
col
],
thresh
=
dfilter
)
&
mask
# dummy column to ensure consistency between flags and data
if
col
not
in
self
.
_data
:
...
...
This diff is collapsed.
Click to expand it.
saqc/funcs/noise.py
+
2
−
2
View file @
37a196a1
...
...
@@ -15,7 +15,7 @@ import pandas as pd
from
saqc.constants
import
BAD
from
saqc.core.register
import
flagging
from
saqc.lib.tools
import
isflagged
,
statPass
from
saqc.lib.tools
import
is
un
flagged
,
statPass
if
TYPE_CHECKING
:
from
saqc
import
SaQC
...
...
@@ -95,6 +95,6 @@ class NoiseMixin:
sub_thresh
,
min_periods
,
)
mask
=
~
isflagged
(
self
.
_flags
[
field
],
kwargs
[
"
dfilter
"
])
&
to_set
mask
=
is
un
flagged
(
self
.
_flags
[
field
],
kwargs
[
"
dfilter
"
])
&
to_set
self
.
_flags
[
mask
,
field
]
=
flag
return
self
This diff is collapsed.
Click to expand it.
saqc/lib/tools.py
+
4
−
0
View file @
37a196a1
...
...
@@ -526,6 +526,10 @@ def isflagged(flagscol: A, thresh: float) -> A:
return
flagscol
>=
thresh
def
isunflagged
(
flagscol
:
A
,
thresh
:
float
)
->
A
:
return
~
isflagged
(
flagscol
,
thresh
)
def
getUnionIndex
(
obj
,
default
:
pd
.
DatetimeIndex
|
None
=
None
):
assert
hasattr
(
obj
,
"
columns
"
)
if
default
is
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