Quality Filters #87
Closed
MabelSSantos
started this conversation in
General
Replies: 1 comment
-
|
@MabelSSantos I am updating the documentation with the correct code. In the meantime, you can apply the filters as follows: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I’m working with the GEDIdb Python API (in MacOS) and running into issues with the quality filter example shown in the official User’s Guide. The documentation shows an example like this:
gedi_data = provider.get_data(
variables=["rh"],
query_type="bounding_box",
geometry=region_of_interest,
start_time="2018-01-01",
end_time="2024-07-25",
quality_filters={
'sensitivity': '>= 0.9 and <= 1.0',
'beam_type': "== 'full'"
},
return_type='xarray'
)
However, when I try to use this exact syntax, I consistently get errors such as:
AttributeError: 'list' object has no attribute 'strip'
or
TileDBError: Unknown attribute or dimension
I’ve also tried passing lists (e.g., "beam_type": ["full"]) and exact values, but those fail as well. It seems like the backend is still trying to parse the filter as a string expression, even when the documentation suggests that lists are supported. I am able to query the data without the quality filters, though.
So, what is the correct way to apply quality filters in GEDIdb? How should we filter string fields like beam_type?
How should we filter numeric fields like quality_flag, surface_flag, degrade_flag, or sensitivity?
Right now, even very simple filters (e.g., "beam_type": "== 'full'") cause errors, and the examples in the User Guide don’t seem to match the behavior of the current package.
Any clarification or updated guidance would be greatly appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions