-
Notifications
You must be signed in to change notification settings - Fork 15
ESA BIOMASS Simulated data access notebook #543
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
base: develop
Are you sure you want to change the base?
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
rephrase run this notebook to To access and run this tutorial within MAAP's Algorithm Development Environment (ADE), please refer to the "Getting started with the MAAP" section of our documentation.
Disclaimer: it is highly recommended to run a tutorial within MAAP's ADE, which already includes packages specific to MAAP, such as maap-py. Running the tutorial outside of the MAAP ADE may lead to errors.
Ferrante, Francesco (SERCO) (comma)
maybe tag ESA_CCI_V5_Token_Access page link as additional resource.
Reply via ReviewNB
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.
Done.
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
in the ESA_CCI_V5_Token_Access the Token paste is hidden so it won’t show in outputs/screenshots.
Token is saved in a user config folder
Saved token file is locked down so only you can read it
Reply via ReviewNB
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.
Deleted the print statement.
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
Line #10. # Quick sanity check: list a few collections (should include BiomassSimulated variants)
maybe call this part "Testing Data Access"
Reply via ReviewNB
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
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.
I think it's better to keep as "Testing data Access" following other notebooks.
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
Line #4. print("Total items:", items)
maybe just print len(items) to make output less noisy.
Reply via ReviewNB
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.
Done
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
open via rasterio with auth headers passed through GDAL, then read insted of full download even when the file is a COG.
Reply via ReviewNB
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.
Done.
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
Line #14. import os, numpy as np, requests, matplotlib.pyplot as plt, rasterio
move to top under imports.
Reply via ReviewNB
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.
Done
| @@ -0,0 +1,524 @@ | |||
| { | |||
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.
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.
updated.
|
I made a few minor suggestions, but overall everything looks good. Thank you! @omshinde |
|
Thanks @HarshiniGirish .. I requested re-review after addressing all your comments. Also, pushed another notebook for ESA BIOMASS Level1A data product. |
|
Should we change to focus on the L1b or L2a which are more likely to be COGs? List from Cristiano
|
| @@ -0,0 +1,556 @@ | |||
| { | |||
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.
The ESA STAC API is not protected by any auth scheme so we don't need to provide the token header here!
Reply via ReviewNB
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.
Good catch. Thanks.
| @@ -0,0 +1,556 @@ | |||
| { | |||
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.
The ESA STAC API has the filter extension enabled which means we can apply the product type filter here instead of sorting through the item ids later. Unfortunately they only enabled it for the GET request model so we need to set method="GET". The ESA STAC API docs provide a similar example.
search = stac.search( collections=["BiomassLevel1a"], datetime=time_day, limit=1000, filter="productType='S2_SCS__1S'", method="GET", )
Reply via ReviewNB
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.
Thanks! Updated it to filter it using the filter extension.
| @@ -0,0 +1,556 @@ | |||
| { | |||
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.
Line #30. r = requests.get(asset_href, headers=headers, stream=True, timeout=180)
code that downloads the actual assets should be the only place where we need the authorization header
Reply via ReviewNB
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.
thanks
| @@ -0,0 +1,556 @@ | |||
| { | |||
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.
It would be helpful to provide suggestions for how to get authenticated here. I tried following the link and logging in with my EDL credentials but got bounced with this message "The ID token issued by the identity provider does not match the configured essential claim. Please contact your administrator."
Reply via ReviewNB
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.
This seems to be an issue under discussion with ESA team for NASA EDL authentication.
Thanks for your comment @wildintellect. I was using L1a which is also COG but I updated it to L1b which seems to be ARD. |
https://github.com/NASA-IMPACT/active-maap-sprint/issues/1308
Illustrates ESA BIOMASS simulated data access using ESA MAAP long-lasting (offline token) and short-lived (data access token) tokens.