avoca 0.16.0__py3-none-any.whl → 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- avoca/bindings/gcwerks.py +5 -3
- avoca/io.py +5 -0
- avoca/testing/utils.py +1 -1
- {avoca-0.16.0.dist-info → avoca-0.17.0.dist-info}/METADATA +1 -1
- {avoca-0.16.0.dist-info → avoca-0.17.0.dist-info}/RECORD +7 -7
- {avoca-0.16.0.dist-info → avoca-0.17.0.dist-info}/WHEEL +0 -0
- {avoca-0.16.0.dist-info → avoca-0.17.0.dist-info}/licenses/LICENCE.txt +0 -0
avoca/bindings/gcwerks.py
CHANGED
|
@@ -90,6 +90,8 @@ flag_values = {
|
|
|
90
90
|
"F": QA_Flag.INVALIDATED_EXT,
|
|
91
91
|
# X: An X flag is an 'un-do' the flag. If there is an automatic flag by GCWerks, but I decide I want that data point still included, I have the option to set an X flag.
|
|
92
92
|
"X": ValidFlag,
|
|
93
|
+
# Nans read from pandas
|
|
94
|
+
pd.NA: QA_Flag.MISSING,
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
# Show the flags and the columns they are applied to
|
|
@@ -229,9 +231,9 @@ def read_gcwerks(
|
|
|
229
231
|
flags: pd.Series = serie_str.str[-1]
|
|
230
232
|
if col[1] in cols_float:
|
|
231
233
|
# Remove the flag value when given
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
mask_flag_allowed = flags.isin(flags_allowed)
|
|
235
|
+
serie_str = serie_str.where(~mask_flag_allowed, serie_str.str[:-1])
|
|
236
|
+
|
|
235
237
|
# Convert the serie to numeric
|
|
236
238
|
df[col] = pd.to_numeric(serie_str, errors="coerce")
|
|
237
239
|
|
avoca/io.py
CHANGED
|
@@ -8,6 +8,11 @@ date_format = "%Y-%m-%d %H:%M:%S"
|
|
|
8
8
|
|
|
9
9
|
def to_csv(df: pd.DataFrame, path: Path, **kwargs) -> None:
|
|
10
10
|
"""Export a dataframe to a csv file."""
|
|
11
|
+
|
|
12
|
+
# Put the columsn with "-" first
|
|
13
|
+
cols = df.columns.tolist()
|
|
14
|
+
cols_sorted = sorted(cols, key=lambda x: (x[0] != "-", x))
|
|
15
|
+
df = df[cols_sorted]
|
|
11
16
|
df.to_csv(path, index=False, date_format=date_format, **kwargs)
|
|
12
17
|
|
|
13
18
|
|
avoca/testing/utils.py
CHANGED
|
@@ -3,7 +3,7 @@ import pandas as pd
|
|
|
3
3
|
|
|
4
4
|
def make_dt_index(df: pd.DataFrame | pd.Index) -> pd.DataFrame | pd.Index:
|
|
5
5
|
"""Create a datetime index for the dataframe."""
|
|
6
|
-
index = pd.date_range(start="2023-01-01", periods=len(df), freq="h")
|
|
6
|
+
index = pd.date_range(start="2023-01-01", periods=len(df), freq="h", unit="s")
|
|
7
7
|
if isinstance(df, pd.Index):
|
|
8
8
|
return index
|
|
9
9
|
return df.set_index(index)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: avoca
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: @voc@: Quality assessement of measurement data
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/empa503/atmospheric-measurements/avoca
|
|
6
6
|
Project-URL: Bug Tracker, https://gitlab.com/empa503/atmospheric-measurements/avoca/-/issues
|
|
@@ -2,7 +2,7 @@ avoca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
avoca/export_nas.py,sha256=B9B2iFSzB3f83nCfe2_vzouRblthK0_dGF8W3o0Kt5Y,155
|
|
3
3
|
avoca/flagging.py,sha256=tg6k_TVHRXiMJCAij_kUS-S2gSshYt7FKvQ0nJdljYs,2328
|
|
4
4
|
avoca/flags.py,sha256=9LF-e8bcUdBQmxtoXU3ysx7KRzZiU6bU6nhDLhZtowU,1599
|
|
5
|
-
avoca/io.py,sha256=
|
|
5
|
+
avoca/io.py,sha256=VMGqSPdtPM5Xu4kugMbr6TaMS9-U6pnObMu2ERKhNxE,891
|
|
6
6
|
avoca/logging.py,sha256=BrxgZQRfnkPSoQ0ZXhOzzhIsmbyjKvaJNG55MdM9jmA,86
|
|
7
7
|
avoca/manager.py,sha256=Faf3UyaCV58TMCZz6tWrLcY-W1WUtuh1aMP85yUVlmQ,5336
|
|
8
8
|
avoca/plots.py,sha256=zzoOJystasrKF2ikJLqcT8mlc-f-tu57vksXs-xRXv8,4424
|
|
@@ -12,7 +12,7 @@ avoca/bindings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
12
12
|
avoca/bindings/ebas.py,sha256=3oWgN3teyEvQ9acpD2767A18IbgxjtbOdmXD79PLVrE,19793
|
|
13
13
|
avoca/bindings/ebas_flags.py,sha256=TEkmOI9Bia0C2KFO5GqLFXNIvcLak5yedlBFCKY5Gqg,2695
|
|
14
14
|
avoca/bindings/gcwerks-report.conf,sha256=jO0I62DfgzrXXS1FuiW8ds-oc1_j8kpFCO61Fk-erBw,230
|
|
15
|
-
avoca/bindings/gcwerks.py,sha256=
|
|
15
|
+
avoca/bindings/gcwerks.py,sha256=2Keff174EUjRwbBRDNKwGFEMr6TxJ2mpsjIN71DjUsQ,15188
|
|
16
16
|
avoca/bindings/gcwerks_gui.py,sha256=Fj3p8obFq3lWrWW0LlA8WBALP8-U70hvps5vZEt4NaM,9458
|
|
17
17
|
avoca/bindings/nabel.py,sha256=6OzaG1imFhOCVDQTO7YXvPQjbTfo4063w74yEuAVCEk,2991
|
|
18
18
|
avoca/bindings/qa_tool.py,sha256=hqsWUU99mYpkKfeULBoox4M2x7Bk0aYO4Q_8WGvt2og,11628
|
|
@@ -28,11 +28,11 @@ avoca/qa_class/test.py,sha256=Xc88_Vwf3hvPiKKl4ILxZ2N985SY8eujUdnAoQu4mbo,591
|
|
|
28
28
|
avoca/qa_class/zscore.py,sha256=jDw2UBmf7KBkskGOD5bgFy3RgNYUjc-9tYjSU-3L1ws,16714
|
|
29
29
|
avoca/testing/__init__.py,sha256=CzkugadVit48-eMoMVtojZLHeSKgnmMMen6sGu6Q42Y,108
|
|
30
30
|
avoca/testing/df.py,sha256=UQm6TdTDVRWvRNM5WnSWh6vdvDR1lqLNg0ti-B1L760,1865
|
|
31
|
-
avoca/testing/utils.py,sha256=
|
|
31
|
+
avoca/testing/utils.py,sha256=w0i-x3xG40JMxhoV_odVV7995VMKpUsHRYVJk2XYJ7I,318
|
|
32
32
|
avoca/utils/__init__.py,sha256=SZc1bHrQyg1DIYnbdUmANtUhnQWlJaMhPrDSWS8oVRY,1408
|
|
33
33
|
avoca/utils/flags_doc.py,sha256=jT1E0GN-B8ws_FyKGE20nlrKrgTHtoyjdo2r8RgYhwU,4294
|
|
34
34
|
avoca/utils/torch_models.py,sha256=53TgOgSPMOOSGYy2cm1EGSK7qQkYMGEOq319KKM_Ir0,1015
|
|
35
|
-
avoca-0.
|
|
36
|
-
avoca-0.
|
|
37
|
-
avoca-0.
|
|
38
|
-
avoca-0.
|
|
35
|
+
avoca-0.17.0.dist-info/METADATA,sha256=1V1osu38cBEsVtCqP4wIbe37PT4LlKv56jqJZk1OI38,1570
|
|
36
|
+
avoca-0.17.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
37
|
+
avoca-0.17.0.dist-info/licenses/LICENCE.txt,sha256=4MY53j3v7tEKwjyuriVz9YjB4Dscm2nDMB2CcG9lOmk,1059
|
|
38
|
+
avoca-0.17.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|