Skip to content

Conversation

@caitlinadams
Copy link
Collaborator

This update converts the download_slc_from_asf and download_slc_from_cdse to more generic versions of the functions that read the metadata contained in the provided ID and downloads the file.

This includes separating out the query step (which does not require credentials) into its own function so that it can be easily tested.

This allows us to download GRD files as well as SLC files, which is valuable for EW processing.

@abradley60
Copy link
Collaborator

Looks good!

r"(\d{8}T\d{6})_" # Stop datetime
r"(\d{6})_" # Orbit number (000000–999999)
r"((?!000000)[A-F0-9]{6})_" # Data-take ID: non-zero hex
r"([A-F0-9]{4})" # CRC16 and extension
Copy link
Collaborator

@geoscience-aman geoscience-aman Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to do r"([A-F0-9]{4})$" # CRC16 and extension with the dollar sign or a fullmatch in extract_metadata_from_s1_id().

Otherwise "S1A_IW_SLC__1SDV_20201019T191827_20201019T191854_034869_0410AD_29DE.stuff" is treated as a valid ID, for example.

@geoscience-aman
Copy link
Collaborator

Thank you Caitlin 🙏

@caitlinadams caitlinadams merged commit f728608 into main Jun 30, 2025
2 checks passed
@caitlinadams caitlinadams deleted the feature/downloadfromid branch June 30, 2025 05:27
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

Successfully merging this pull request may close these issues.

3 participants