Skip to content

Conversation

@caitlinadams
Copy link
Collaborator

  • Add functions for finding and downloading ETAD files from CDSE
  • Update CLI to work with --etad-dir option (ETAD is not used if this option is not provided)
  • Update to CLI to take all options through

@caitlinadams caitlinadams requested a review from abradley60 April 3, 2025 01:14
@caitlinadams caitlinadams marked this pull request as ready for review April 3, 2025 01:14
corrected_scene_dir = uncorrected_scene.parent / "etad_corrected"

if not (etad.is_dir() and etad.suffix == ".SAFE"):
logging.info("Atte")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checking "Atte"means something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Haha, nope, clearly left my keyboard halfway through. Will work out a sensible message!

Copy link
Collaborator

@abradley60 abradley60 Apr 3, 2025

Choose a reason for hiding this comment

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

lol nah I like Atte!!

raise ValueError(f"No ETAD products found. Scene start date: {scene_start}")
elif len(search_results) > 1:
raise ValueError(
f"{len(search_results)} ETAD products found, which is too many. Review files: {[result['Name'] for result in search_results]}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor, but could explicitly state that 1 is expected rather than too many

"""

# Validate that input scene and etad are .SAFE directiories
if not (scene.is_dir() and scene.suffix == ".SAFE"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there reason for not doing this on the users behalf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was trying to keep the function simple and limited in scope. I handle the unzipping as part of the application (i.e. pyrosar_geocode).

@abradley60
Copy link
Collaborator

Looks good as is! Address comments if you think needed otherwise go ahead for merge

@caitlinadams caitlinadams merged commit c4edb36 into main Apr 3, 2025
1 check passed
@caitlinadams caitlinadams deleted the feature/etad branch April 3, 2025 21:44
abradley60 pushed a commit that referenced this pull request Apr 10, 2025
Add ETAD processing to NCI Pipeline
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.

2 participants