Skip to content

cannot specify instrument mode #746

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

Open
atinaajeng opened this issue Mar 5, 2025 · 9 comments
Open

cannot specify instrument mode #746

atinaajeng opened this issue Mar 5, 2025 · 9 comments

Comments

@atinaajeng
Copy link

This is a great API, but for for Sentinel-1 GRD, i only want to use imaging mode IW, but cannnot be specified here:(

@soxofaan
Copy link
Member

soxofaan commented Mar 6, 2025

Hi,

can you be a bit more specific? For example: what openEO backend (URL) are you using?
I'm also not sure this is an issue specifically for the openEO Python client, but more a back-end specific question.
E.g. if you are using the openEO backend from the Copernicus Data Space Ecosystem, I would recommend to raise your question at the user forum https://forum.dataspace.copernicus.eu/c/openeo/28

@atinaajeng
Copy link
Author

atinaajeng commented Mar 6, 2025

Hi,

I am using openeo.dataspace.copernicus.eu.
I just realized that actually the imaging mode for Sentinel-1 over the study areas is only IW, so i guess this is no longer the problem. However, still i wish load_collection module can also specify the orbital pass (ascending/descending) and orbit number.

In the metadata, the imaging mode and orbital pass are exist, but i could not use it in load_collection module for filtering the image i am looking for. Or also maybe I did not know how to specify such information....

I hope this answers and thanks for the link!

@soxofaan
Copy link
Member

soxofaan commented Mar 6, 2025

note that load_collection supports filtering on particular properties: see https://open-eo.github.io/openeo-python-client/data_access.html#filter-on-collection-properties

@Pratichhya @VincentVerelst @VictorVerhaert dou you have by any chance an example (community notebook) of using this for filtering on IW mode?

@Pratichhya
Copy link
Contributor

Pratichhya commented Mar 7, 2025

We don't have an example for instrument mode filtering, however the simple example of filtering by properties is: https://github.com/eu-cdse/notebook-samples/blob/main/openeo/Radar_ARD.ipynb

So basically, for filtering based on instrument mode, the following example should work:

s1 = conn.load_collection( "SENTINEL1_GRD",
    spatial_extent=spatial_extent,
    bands=["VV", "VH"],
    temporal_extent=["2021-01-01", "2021-01-08"],
    properties={"sat:instrumentmode": lambda od: od == "IW"},
)

@soxofaan
Copy link
Member

soxofaan commented Mar 7, 2025

since python client 0.26, it looks nicer, I guess, to use this pattern (avoiding the lambda), as mentioned at https://open-eo.github.io/openeo-python-client/data_access.html#filter-on-collection-properties:

import openeo
s1 = conn.load_collection( "SENTINEL1_GRD",
    ...,
    properties=[
        openeo.collection_property("sat:instrumentmode") == "IW",
    ],
)

I think we should promote that in example notebooks @Pratichhya

@atinaajeng
Copy link
Author

@soxofaan @Pratichhya

Thank you very much for answering the question, is it indeed helpful. I tried the code and it works well. I should have explored more of course.
One last question, how do i know the key let say, for example for instrument mode it is "sat:instrumentmode", orbit state it is "sat:orbit_state", and relative orbit number is "relativeOrbitNumber"? Well now i know, but just in case i will need more properties, i know which document I can then look up to...

@soxofaan
Copy link
Member

soxofaan commented Mar 7, 2025

One last question, how do i know the key let say, for example for instrument mode it is "sat:instrumentmode", orbit state it is "sat:orbit_state", and relative orbit number is "relativeOrbitNumber"? Well now i know, but just in case i will need more properties, i know which document I can then look up to...

There is indeed still a usability gap here.

FYI, this ticket is to improve this in the python client:

However, this also need support on the backend-side, which is not there yet (e.g. see Open-EO/openeo-geopyspark-driver#536)

@soxofaan
Copy link
Member

soxofaan commented Mar 7, 2025

Well now i know, but just in case i will need more properties, i know which document I can then look up to...

Unfortunately, at the moment, I'm afraid we don't have some king of listing/documentation on this as far as I know. Or do we @Pratichhya ? If you have a concrete question, the only solution currently to reach out for support, e.g. at https://forum.dataspace.copernicus.eu/c/openeo/28

@Pratichhya
Copy link
Contributor

No, unfortunately, we don't have that documented anywhere yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants