Skip to content

Commit 5aa349a

Browse files
committed
Update: make filtering configurable
1 parent 15a0c7d commit 5aa349a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

kaleidoscope/config/config.collect.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,38 @@
1212
"DOC": {
1313
"attrs": {
1414
"long_name": "standard uncertainty of estimated DOC"
15-
}
15+
},
16+
"filter": true
1617
},
1718
"PIC": {
1819
"attrs": {
1920
"long_name": "standard uncertainty of PIC"
20-
}
21+
},
22+
"filter": true
2123
},
2224
"POC": {
2325
"attrs": {
2426
"long_name": "standard uncertainty of POC"
25-
}
27+
},
28+
"filter": true
2629
},
2730
"pc": {
2831
"attrs": {
2932
"long_name": "standard uncertainty of Phytoplankton Carbon concentration in seawater"
30-
}
33+
},
34+
"filter": true
3135
},
3236
"pp": {
3337
"attrs": {
3438
"long_name": "standard uncertainty of Phytoplankton Primary Production"
35-
}
39+
},
40+
"filter": true
3641
},
3742
"Predicted_DOC": {
3843
"attrs": {
3944
"long_name": "standard uncertainty of Predicted Dissolved Organic Carbon",
4045
"description": "standard uncertainty of Predicted DOC values"
41-
}
46+
},
47+
"filter": true
4248
}
4349
}

kaleidoscope/operators/collectop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def run(self, source: Dataset) -> Dataset: # noqa: D102
110110
if v not in config:
111111
continue
112112
self.add_uncertainty(target, source, v, x)
113-
self.add_uncertainty(target, source, v, x, filtered=True)
113+
if config[v].get("filter", False):
114+
self.add_uncertainty(target, source, v, x, filtered=True)
114115
return target
115116

116117
def add_uncertainty(self, target, source, v, x, filtered: bool = False):

0 commit comments

Comments
 (0)