Skip to content
Snippets Groups Projects
Commit a437e339 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

solved MR

parents 402fc0d6 e6b5c37e
No related branches found
No related tags found
1 merge request!424Cross statistics fixes
Pipeline #72453 passed with stage
in 3 minutes and 4 seconds
......@@ -19,6 +19,7 @@ This changelog starts with version 2.0.0. Basically all parts of the system, inc
### Fixed
- `flagOffset` bug with zero-valued threshold
- `flagCrossStatistics` bug with unaligned input variables
- `plot` fixed data loss when using *dfilter* kwarg
## [2.0.1](https://git.ufz.de/rdm-software/saqc/-/tags/v2.0.1) - 2021-12-20
[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.0.0...v2.0.1)
......
......@@ -6,8 +6,8 @@ Click==8.0.3
dtw==1.4.0
hypothesis==6.34.1
matplotlib==3.5.1
numba==0.54.1
numpy==1.20.3
numba>=0.55.0
numpy>=1.21.5
outlier-utils==0.0.3
pyarrow==6.0.1
pandas==1.3.5
......
......@@ -334,10 +334,10 @@ def plot(
"""
interactive = path is None
level = kwargs.get("flag", BAD)
level = kwargs.get("flag", UNFLAGGED)
if dfilter < np.inf:
data = data.copy()
data_temp = data[field].copy()
data.loc[flags[field] >= dfilter, field] = np.nan
if store_kwargs is None:
......@@ -374,4 +374,7 @@ def plot(
else:
fig.savefig(path, **store_kwargs)
if dfilter < np.inf:
data[field] = data_temp
return data, flags
......@@ -225,7 +225,7 @@ def _plotVarWithFlags(
flags_i[~mask] = np.nan
# Skip plot, if the test did not have no effect on the all over flagging result. This avoids
# legend overflow
if ~(flags_i >= level).any():
if ~(flags_i > level).any():
continue
# Also skip plot, if all flagged values are np.nans (to catch flag missing and masked results mainly)
......@@ -254,7 +254,7 @@ def _plotVarWithFlags(
def _plotFlags(ax, datser, flags, na_mask, level, scatter_kwargs):
is_flagged = flags.astype(float) >= level
is_flagged = flags.astype(float) > level
is_flagged = is_flagged[~na_mask]
is_flagged = datser[is_flagged[is_flagged].index]
ax.scatter(is_flagged.index, is_flagged.values, **scatter_kwargs)
......
......@@ -20,20 +20,20 @@ with open("README.md", "r") as fh:
setup(
name="saqc",
version=version,
author="Bert Palm, David Schaefer, Peter Luenenschloss, Lennard Schmidt",
author="Bert Palm, David Schaefer, Peter Luenenschloss, Lennart Schmidt",
author_email="david.schaefer@ufz.de",
description="Data quality checking and processing tool/framework",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://git.ufz.de/rdm-software/saqc",
packages=find_packages(exclude=("tests",)),
python_requires=">=3.7, <3.10",
python_requires=">=3.7",
install_requires=[
"Click==8.0.*",
"dtw==1.4.*",
"matplotlib>=3.4,<3.6",
"numba==0.54.*",
"numpy==1.20.*",
"numba>=0.54",
"numpy==1.21.5",
"outlier-utils==0.0.3",
"pyarrow==6.0.*",
"pandas==1.3.*",
......
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