-
Notifications
You must be signed in to change notification settings - Fork 12
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
s1_orbit: return S1A/S1B when parsing filename #104
Conversation
This fixes isce-framework#103 to get the right orbit file. Currently we are returning "A" or "B" as a "sensor_id", then searching if the orbit file has that identifier (the single letter, which all orbit files have). This 1. changes the parser to return the full S1A/S1B, 2. calls it the "mission_id" to match the language in the product spec https://sentinels.copernicus.eu/documents/247904/351187/Copernicus_Sentinels_POD_Service_File_Format_Specification 3. does further simplficication and cleanup of logic to make pylance/flake8 errors go away
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.
Just minor comments at this stage.
src/s1reader/s1_orbit.py
Outdated
end_time, 'AUX_POEORB') | ||
# If orbit dict is empty, find restituted orbits | ||
if orbit_dict is None: | ||
orbit_dict = get_orbit_dict(sensor_id, start_time, | ||
orbit_dict = get_orbit_dict(mission_id, start_time, | ||
end_time, 'AUX_RESORB') | ||
# Download orbit file | ||
orbit_file = os.path.join(orbit_dir, orbit_dict["orbit_name"] + '.EOF') |
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 find more compact to use fstring
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.
LGTM
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 @scottstanie, LGTM
This fixes #103 to get the right orbit file.
Currently we are returning "A" or "B" as a "sensor_id", then searching if the orbit file has that identifier (the single letter, which all orbit files have).
This 1. changes the parser to return the full S1A/S1B, 2. calls it the "mission_id" to match the language in the product spec https://sentinels.copernicus.eu/documents/247904/351187/Copernicus_Sentinels_POD_Service_File_Format_Specification
The movement of function locations is to group similar functions together (
parse_safe_filename
andget_file_name_tokens
were >100 lines apart before)