-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
118 improve filtering #135
Conversation
…mpatibility ok : can still put as parameter a list of filters (the filters will then be applied to all sites), or a string (also apply to all sites then).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an example on how to use this new option?
- `isinstance(x, y)` is preferred to `type(x) is y` - don't need to manage memory or use temp variables to reuse variable name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using
filters = {"CMN": None, "JFJ": None, "MHD": ["pblh_inlet_diff", "pblh_min"], "TAC": ["pblh_inlet_diff", "pblh_min"]}
I get the error
File "/user/home/qq24644/openghg_inversions/openghg_inversions/utils.py", line 471, in filtering
datasets[site] = filtering_functions[filt](datasets[site], site, keep_missing=keep_missing)
~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: None
Summary of changes
Allow to put filters as dictionnary in .ini (with the sites as keys).
Please check if the PR fulfills these requirements
CHANGELOG.md
filerequirements.txt