Skip to content
Snippets Groups Projects
Commit ec820804 authored by David Schäfer's avatar David Schäfer
Browse files

new SaQC argument to_mask to allow global masking settings

parent 06a2d043
No related branches found
No related tags found
2 merge requests!193Release 1.4,!188Release 1.4
...@@ -105,10 +105,11 @@ _setup() ...@@ -105,10 +105,11 @@ _setup()
class SaQC: class SaQC:
def __init__(self, flagger, data, flags=None, nodata=np.nan, error_policy="raise"): def __init__(self, flagger, data, flags=None, nodata=np.nan, to_mask=None, error_policy="raise"):
data, flags = _prepInput(flagger, data, flags) data, flags = _prepInput(flagger, data, flags)
self._data = data self._data = data
self._nodata = nodata self._nodata = nodata
self._to_mask = to_mask
self._flagger = self._initFlagger(data, flagger, flags) self._flagger = self._initFlagger(data, flagger, flags)
self._error_policy = error_policy self._error_policy = error_policy
# NOTE: will be filled by calls to `_wrap` # NOTE: will be filled by calls to `_wrap`
...@@ -230,7 +231,7 @@ class SaQC: ...@@ -230,7 +231,7 @@ class SaQC:
# to_mask is a control keyword # to_mask is a control keyword
ctrl_kws = { ctrl_kws = {
**(FUNC_MAP[func_name]["ctrl_kws"]), **(FUNC_MAP[func_name]["ctrl_kws"]),
'to_mask': to_mask, 'to_mask': to_mask or self._to_mask,
'plot': plot, 'plot': plot,
'inplace': inplace, 'inplace': inplace,
'lineno': lineno, 'lineno': lineno,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment