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

changed value of the default parameter overwrite for concatFlags to False

parent 86fa51ae
No related branches found
No related tags found
3 merge requests!685Release 2.4,!684Release 2.4,!604changed value of the default parameter overwrite for concatFlags to False
Pipeline #143623 passed with stages
in 7 minutes and 39 seconds
...@@ -15,7 +15,8 @@ SPDX-License-Identifier: GPL-3.0-or-later ...@@ -15,7 +15,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
- Remove all flag value restrictions from the default flagging scheme `FloatTranslator` - Remove all flag value restrictions from the default flagging scheme `FloatTranslator`
- Renamed `TranslationScheme.forward` to `TranslationScheme.toInternal` - Renamed `TranslationScheme.forward` to `TranslationScheme.toInternal`
- Renamed `TranslationScheme.backward` to `TranslationScheme.toExternal` - Renamed `TranslationScheme.backward` to `TranslationScheme.toExternal`
- Changed Default value of the parameter `limit` for `SaQC.interpolateIndex` and `SaQC.interpolateInvalid` to ``None` - Changed default value of the parameter `limit` for `SaQC.interpolateIndex` and `SaQC.interpolateInvalid` to ``None``
- Changed default value of the parameter ``overwrite`` for ``concatFlags`` to ``False``
### Removed ### Removed
### Fixed ### Fixed
......
...@@ -337,7 +337,7 @@ class ResamplingMixin: ...@@ -337,7 +337,7 @@ class ResamplingMixin:
freq: str | None = None, freq: str | None = None,
drop: bool = False, drop: bool = False,
squeeze: bool = False, squeeze: bool = False,
overwrite: bool = True, overwrite: bool = False,
**kwargs, **kwargs,
) -> "SaQC": ) -> "SaQC":
""" """
...@@ -395,7 +395,7 @@ class ResamplingMixin: ...@@ -395,7 +395,7 @@ class ResamplingMixin:
If set to `True`, the appended flags frame will be squeezed - resulting in function specific flags informations If set to `True`, the appended flags frame will be squeezed - resulting in function specific flags informations
getting lost. getting lost.
overwrite: bool, default True overwrite: bool, default False
If set to True, the newly appended flags will overwrite exsiting flags. This might result in a loss of previous If set to True, the newly appended flags will overwrite exsiting flags. This might result in a loss of previous
flagging information. flagging information.
...@@ -471,6 +471,7 @@ class ResamplingMixin: ...@@ -471,6 +471,7 @@ class ResamplingMixin:
"freq": freq, "freq": freq,
"drop": drop, "drop": drop,
"squeeze": squeeze, "squeeze": squeeze,
"overwrite": overwrite,
**kwargs, **kwargs,
}, },
} }
......
...@@ -101,7 +101,9 @@ def test_flagSesonalRange(data, field): ...@@ -101,7 +101,9 @@ def test_flagSesonalRange(data, field):
flag=BAD, flag=BAD,
) )
qc = qc.flagRange(newfield, min=test["min"], max=test["max"], flag=BAD) qc = qc.flagRange(newfield, min=test["min"], max=test["max"], flag=BAD)
qc = qc.concatFlags(newfield, method="match", target=field, flag=BAD) qc = qc.concatFlags(
newfield, method="match", target=field, flag=BAD, overwrite=True
)
qc = qc.dropField(newfield) qc = qc.dropField(newfield)
flagged = qc._flags[field] > UNFLAGGED flagged = qc._flags[field] > UNFLAGGED
assert flagged.sum() == expected assert flagged.sum() == expected
......
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