Skip to content

Commit 813a35b

Browse files
committed
Squashed commit of the following:
commit 0e0c7816a9b22b057a769519d302cd62e0a4e346 Author: Seongsu Jeong <[email protected]> Date: Fri Mar 3 15:39:13 2023 -0800 Two layered az fm mismatch rate (#101) * Replacing the loaders in Burst* class into class methods, with further implementation for thermal and EAP correction * fix on determining beta_naught; addressing PEP8 issues * Bug fix and feature addition to BurstEAP; restructuring LUT exportation * Readibility improvement; removing unnecessary imports * Format change on `burst_id`; keeping the absolute orbit number inside `Sentinel1BurstSlc` * updates on test_bursts.py * keeping the basename of the CADS and NADS for populating RTC metadata * Update src/s1reader/s1_annotation.py Readability improvement on equation Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Removing commented out code Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Reverting the docstring to be split into two lines for PEP8 compliance Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Improving docstring of the code copied from isce2 Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Removing the commented out codes Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on code brevity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable for better clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable name for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable name revised for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable renamed for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on docstring Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Readability improvement of equation Co-authored-by: Liang Yu <[email protected]> * addressing comments bt @LiangJYu * docstring fix; variables renamed for clarity * implemented s1_annotation.AucCal.load_from_zip_file() * readability improvement * s1_annotation.py - code cleanup; excention handling for AUX_CAL; PEP8 compliance * docstring for `s1_burst_slc.eap_compensation_lut()` * class import scheme changed * PEP8 compliance * initial structure of modification * less mod compared to the branch fork * extended coeffs for FM rate and Doppler centroid to be used for azimuth FM mismatch rate mitigation * Working version of azimuth FM rate mismatch mitigation * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * addressing comments from @gshiroma * trailing white spaces are removed * docstring updated * Code cleanup and docstrings * code cleanup * trailing white space removed * docsrting added; variable renaming for less verbosity; * code cleanup and simplification * variable name simplification * clde cleanup * Output as isce3.core.LUT2d * threshold and num_iter for rdr2geo * Addressing codacy issue * Trailing whitespace removed * codacy issue * docstring clarification on `BurstExtendedCoeffs` * whitespace removed * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * comment added for clarity * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * mod on the suggested commit to reuse the topo output filenames * fix on variable * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * typo fix * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Re-using the parsed polynomials; mitigation results as ISCE3 LUT2d * revision on import format * TODO removed * Option to turn on / off the functionalities for az fm rate mismatch mitigation * removing alias for `Rdr2Geo` * whitespace removed after resolving conflict * addressing codacy issue * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_reader.py Co-authored-by: Liang Yu <[email protected]> * variable name changed * bug fixed; variable name updated * addressing codacy issues * codacy issue * variable name changed * pulling out functions that does not need to be methods * whitespace removed * updates after linting * Docstring for `_burst_from_safe_dir` revised * Docstring for `_burst_from_zip` revised * Docstring for `load_bursts` revised * Docstring for `burst_from_xml` revised * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Docstring for `az_fm_rate_mismatch_mitigation` revised * Use temporary directory when `path_scratch` was not provided; take in az/rg steps as options to define radargrid * codacy issue * docstring updated; variable name changed * unnecessary members removed; docstring revised * temporary filename format changed * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * unit_degree -> in_degree * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Apply suggestions from code review Co-authored-by: Scott Staniewicz <[email protected]> * variable name format revised * `mitigate_az_fmrate_mismatch` removed * PEP8 issues * add s1-etad prep module for testing S1-ETAD products (#73) + add s1_etad.py as a wrapper around the `s1etad` module from ESA to read / prepare ETA correction, given a `s1reader` burst object Co-authored-by: Seongsu Jeong <[email protected]> * bugfix in Sentinel1BurstSlc.swath_name() (#89) * s1_reader: fix safe_path for directories (#91) * s1_reader: fix safe_path for directories _burst_from_safe_dir used os.listdir, which does not have "measurement" in the returned names like the zip file list does this fixes #90 * return a string instead of list * Handle the case that the burst's sensing period exceeds the range of `polynomial_list` * azimith to azimuth spelling fix(#93) * Beta release compass (#94) * Replacing the loaders in Burst* class into class methods, with further implementation for thermal and EAP correction * fix on determining beta_naught; addressing PEP8 issues * Bug fix and feature addition to BurstEAP; restructuring LUT exportation * Readibility improvement; removing unnecessary imports * Format change on `burst_id`; keeping the absolute orbit number inside `Sentinel1BurstSlc` * updates on test_bursts.py * keeping the basename of the CADS and NADS for populating RTC metadata * Update src/s1reader/s1_annotation.py Readability improvement on equation Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Removing commented out code Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Reverting the docstring to be split into two lines for PEP8 compliance Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Improving docstring of the code copied from isce2 Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Removing the commented out codes Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on code brevity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable for better clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable name for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable name revised for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable renamed for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on docstring Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Readability improvement of equation Co-authored-by: Liang Yu <[email protected]> * addressing comments bt @LiangJYu * docstring fix; variables renamed for clarity * implemented s1_annotation.AucCal.load_from_zip_file() * readability improvement * s1_annotation.py - code cleanup; excention handling for AUX_CAL; PEP8 compliance * docstring for `s1_burst_slc.eap_compensation_lut()` * class import scheme changed * PEP8 compliance * initial structure of modification * less mod compared to the branch fork * extended coeffs for FM rate and Doppler centroid to be used for azimuth FM mismatch rate mitigation * Working version of azimuth FM rate mismatch mitigation * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * addressing comments from @gshiroma * trailing white spaces are removed * docstring updated * Code cleanup and docstrings * code cleanup * trailing white space removed * docsrting added; variable renaming for less verbosity; * code cleanup and simplification * variable name simplification * clde cleanup * Output as isce3.core.LUT2d * threshold and num_iter for rdr2geo * Addressing codacy issue * Trailing whitespace removed * codacy issue * docstring clarification on `BurstExtendedCoeffs` * whitespace removed * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * comment added for clarity * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * mod on the suggested commit to reuse the topo output filenames * fix on variable * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * typo fix * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Re-using the parsed polynomials; mitigation results as ISCE3 LUT2d * revision on import format * TODO removed * Option to turn on / off the functionalities for az fm rate mismatch mitigation * removing alias for `Rdr2Geo` * whitespace removed after resolving conflict * addressing codacy issue * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_reader.py Co-authored-by: Liang Yu <[email protected]> * variable name changed * bug fixed; variable name updated * addressing codacy issues * codacy issue * variable name changed * pulling out functions that does not need to be methods * whitespace removed * updates after linting * Docstring for `_burst_from_safe_dir` revised * Docstring for `_burst_from_zip` revised * Docstring for `load_bursts` revised * Docstring for `burst_from_xml` revised * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Docstring for `az_fm_rate_mismatch_mitigation` revised * Use temporary directory when `path_scratch` was not provided; take in az/rg steps as options to define radargrid * codacy issue * docstring updated; variable name changed * unnecessary members removed; docstring revised * temporary filename format changed * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * unit_degree -> in_degree * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Apply suggestions from code review Co-authored-by: Scott Staniewicz <[email protected]> * variable name format revised * `mitigate_az_fmrate_mismatch` removed * PEP8 issues * Handle the case that the burst's sensing period exceeds the range of `polynomial_list` * version.py updated Co-authored-by: Seongsu Jeong <[email protected]> Co-authored-by: Liang Yu <[email protected]> Co-authored-by: Gustavo H. X. Shiroma <[email protected]> Co-authored-by: vbrancat <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> * add a --bbox option to s1_info for frame bounds (#88) * add a --bbox option to s1_info for frame bounds * add method to get bounds from the preview, if available * get preview kml bounds working * update usage for bbox and correct entry point * add __init__.py to utils subpackage * try loading any polarization for the bounds, accounting for hh/hv * reorder kml parsing logic * separate options in frame-bbox and burst-bbox * remove unused imports * two-layered calculation of az fm rate mismatch computation * removed trailing whtespaces * whitwspace removed * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * dicstring revised * fix on error string * whitespace removed * docstring revised --------- Co-authored-by: Seongsu Jeong <[email protected]> Co-authored-by: Liang Yu <[email protected]> Co-authored-by: Gustavo H. X. Shiroma <[email protected]> Co-authored-by: vbrancat <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> Co-authored-by: Zhang Yunjun <[email protected]> commit 53f0c4373fac371e55d7baa09f95bcc0ea186fbd Author: Scott Staniewicz <[email protected]> Date: Tue Feb 21 16:46:28 2023 -0500 allow az_step/rg_step arguments to `as_isce3_radargrid` (#102) * allow az_step/rg_step arguments to `as_isce3_radargrid` This allows a more coarse radar grid, as needed by some lookup tables such as the SET correction * Apply PRF suggestions from code review Co-authored-by: Heresh Fattahi <[email protected]> * adjust length/width based on az_step/rg_step * fix the logic for width/length calculation with rg/az_step * reversed order of length/width * add two tests for as_isce3_radar_grid fixed the division to make the tests pass * add clarification to docstring about sensing start --------- Co-authored-by: Heresh Fattahi <[email protected]> commit 2b43f2fb593658175e6e5a4bf8d3ee548c4770e9 Author: Scott Staniewicz <[email protected]> Date: Mon Feb 13 14:56:58 2023 -0500 s1_orbit.py: if autodownloading, create the directory (#100) * s1_orbit.py: if autodownloading, create the directory There shouldnt be a need to have the user `mkdir -p orbits/` if they have already specified they do not have the orbits and want to download them. * add print to log directory creation commit 428328de5011968da91174cdf14db6eb3e8264c7 Author: Scott Staniewicz <[email protected]> Date: Thu Dec 22 15:10:07 2022 -0500 add a --bbox option to s1_info for frame bounds (#88) * add a --bbox option to s1_info for frame bounds * add method to get bounds from the preview, if available * get preview kml bounds working * update usage for bbox and correct entry point * add __init__.py to utils subpackage * try loading any polarization for the bounds, accounting for hh/hv * reorder kml parsing logic * separate options in frame-bbox and burst-bbox * remove unused imports commit a29a422b60bc02341d85a1a78b42657d5bea5576 Author: Seongsu Jeong <[email protected]> Date: Wed Dec 21 14:14:04 2022 -0800 Beta release compass (#94) * Replacing the loaders in Burst* class into class methods, with further implementation for thermal and EAP correction * fix on determining beta_naught; addressing PEP8 issues * Bug fix and feature addition to BurstEAP; restructuring LUT exportation * Readibility improvement; removing unnecessary imports * Format change on `burst_id`; keeping the absolute orbit number inside `Sentinel1BurstSlc` * updates on test_bursts.py * keeping the basename of the CADS and NADS for populating RTC metadata * Update src/s1reader/s1_annotation.py Readability improvement on equation Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Removing commented out code Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Reverting the docstring to be split into two lines for PEP8 compliance Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Improving docstring of the code copied from isce2 Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Removing the commented out codes Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on code brevity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable for better clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable name for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable name revised for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable renamed for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on docstring Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Readability improvement of equation Co-authored-by: Liang Yu <[email protected]> * addressing comments bt @LiangJYu * docstring fix; variables renamed for clarity * implemented s1_annotation.AucCal.load_from_zip_file() * readability improvement * s1_annotation.py - code cleanup; excention handling for AUX_CAL; PEP8 compliance * docstring for `s1_burst_slc.eap_compensation_lut()` * class import scheme changed * PEP8 compliance * initial structure of modification * less mod compared to the branch fork * extended coeffs for FM rate and Doppler centroid to be used for azimuth FM mismatch rate mitigation * Working version of azimuth FM rate mismatch mitigation * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * addressing comments from @gshiroma * trailing white spaces are removed * docstring updated * Code cleanup and docstrings * code cleanup * trailing white space removed * docsrting added; variable renaming for less verbosity; * code cleanup and simplification * variable name simplification * clde cleanup * Output as isce3.core.LUT2d * threshold and num_iter for rdr2geo * Addressing codacy issue * Trailing whitespace removed * codacy issue * docstring clarification on `BurstExtendedCoeffs` * whitespace removed * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * comment added for clarity * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * mod on the suggested commit to reuse the topo output filenames * fix on variable * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * typo fix * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Re-using the parsed polynomials; mitigation results as ISCE3 LUT2d * revision on import format * TODO removed * Option to turn on / off the functionalities for az fm rate mismatch mitigation * removing alias for `Rdr2Geo` * whitespace removed after resolving conflict * addressing codacy issue * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_reader.py Co-authored-by: Liang Yu <[email protected]> * variable name changed * bug fixed; variable name updated * addressing codacy issues * codacy issue * variable name changed * pulling out functions that does not need to be methods * whitespace removed * updates after linting * Docstring for `_burst_from_safe_dir` revised * Docstring for `_burst_from_zip` revised * Docstring for `load_bursts` revised * Docstring for `burst_from_xml` revised * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Docstring for `az_fm_rate_mismatch_mitigation` revised * Use temporary directory when `path_scratch` was not provided; take in az/rg steps as options to define radargrid * codacy issue * docstring updated; variable name changed * unnecessary members removed; docstring revised * temporary filename format changed * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * unit_degree -> in_degree * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Apply suggestions from code review Co-authored-by: Scott Staniewicz <[email protected]> * variable name format revised * `mitigate_az_fmrate_mismatch` removed * PEP8 issues * Handle the case that the burst's sensing period exceeds the range of `polynomial_list` * version.py updated Co-authored-by: Seongsu Jeong <[email protected]> Co-authored-by: Liang Yu <[email protected]> Co-authored-by: Gustavo H. X. Shiroma <[email protected]> Co-authored-by: vbrancat <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> commit 10fe381efec12fe4660da7edcc0bf14fbfd3982a Author: Liang Yu <[email protected]> Date: Tue Dec 20 16:31:55 2022 -0800 azimith to azimuth spelling fix(#93) commit eb5e53e8a530dd1e2bc4b9acc82f5a3932ec92cf Author: Seongsu Jeong <[email protected]> Date: Thu Dec 15 15:23:05 2022 -0800 FM rate mismatch - follow-up bug fix (#92) * Replacing the loaders in Burst* class into class methods, with further implementation for thermal and EAP correction * fix on determining beta_naught; addressing PEP8 issues * Bug fix and feature addition to BurstEAP; restructuring LUT exportation * Readibility improvement; removing unnecessary imports * Format change on `burst_id`; keeping the absolute orbit number inside `Sentinel1BurstSlc` * updates on test_bursts.py * keeping the basename of the CADS and NADS for populating RTC metadata * Update src/s1reader/s1_annotation.py Readability improvement on equation Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Removing commented out code Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Reverting the docstring to be split into two lines for PEP8 compliance Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Improving docstring of the code copied from isce2 Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Removing the commented out codes Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on code brevity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable for better clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable name for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable name revised for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable renamed for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on docstring Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Readability improvement of equation Co-authored-by: Liang Yu <[email protected]> * addressing comments bt @LiangJYu * docstring fix; variables renamed for clarity * implemented s1_annotation.AucCal.load_from_zip_file() * readability improvement * s1_annotation.py - code cleanup; excention handling for AUX_CAL; PEP8 compliance * docstring for `s1_burst_slc.eap_compensation_lut()` * class import scheme changed * PEP8 compliance * initial structure of modification * less mod compared to the branch fork * extended coeffs for FM rate and Doppler centroid to be used for azimuth FM mismatch rate mitigation * Working version of azimuth FM rate mismatch mitigation * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * addressing comments from @gshiroma * trailing white spaces are removed * docstring updated * Code cleanup and docstrings * code cleanup * trailing white space removed * docsrting added; variable renaming for less verbosity; * code cleanup and simplification * variable name simplification * clde cleanup * Output as isce3.core.LUT2d * threshold and num_iter for rdr2geo * Addressing codacy issue * Trailing whitespace removed * codacy issue * docstring clarification on `BurstExtendedCoeffs` * whitespace removed * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * comment added for clarity * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * mod on the suggested commit to reuse the topo output filenames * fix on variable * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * typo fix * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Re-using the parsed polynomials; mitigation results as ISCE3 LUT2d * revision on import format * TODO removed * Option to turn on / off the functionalities for az fm rate mismatch mitigation * removing alias for `Rdr2Geo` * whitespace removed after resolving conflict * addressing codacy issue * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_reader.py Co-authored-by: Liang Yu <[email protected]> * variable name changed * bug fixed; variable name updated * addressing codacy issues * codacy issue * variable name changed * pulling out functions that does not need to be methods * whitespace removed * updates after linting * Docstring for `_burst_from_safe_dir` revised * Docstring for `_burst_from_zip` revised * Docstring for `load_bursts` revised * Docstring for `burst_from_xml` revised * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Docstring for `az_fm_rate_mismatch_mitigation` revised * Use temporary directory when `path_scratch` was not provided; take in az/rg steps as options to define radargrid * codacy issue * docstring updated; variable name changed * unnecessary members removed; docstring revised * temporary filename format changed * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * unit_degree -> in_degree * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Apply suggestions from code review Co-authored-by: Scott Staniewicz <[email protected]> * variable name format revised * `mitigate_az_fmrate_mismatch` removed * PEP8 issues * Handle the case that the burst's sensing period exceeds the range of `polynomial_list` Co-authored-by: Seongsu Jeong <[email protected]> Co-authored-by: Liang Yu <[email protected]> Co-authored-by: Gustavo H. X. Shiroma <[email protected]> Co-authored-by: vbrancat <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> commit e1cbc573c89df647f8c5831fcfa3c70b55c087cf Author: Seongsu Jeong <[email protected]> Date: Tue Dec 13 13:13:29 2022 -0800 Azimuth FM rate mismatch mitigation (#80) * Replacing the loaders in Burst* class into class methods, with further implementation for thermal and EAP correction * fix on determining beta_naught; addressing PEP8 issues * Bug fix and feature addition to BurstEAP; restructuring LUT exportation * Readibility improvement; removing unnecessary imports * Format change on `burst_id`; keeping the absolute orbit number inside `Sentinel1BurstSlc` * updates on test_bursts.py * keeping the basename of the CADS and NADS for populating RTC metadata * Update src/s1reader/s1_annotation.py Readability improvement on equation Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Removing commented out code Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Reverting the docstring to be split into two lines for PEP8 compliance Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Improving docstring of the code copied from isce2 Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Removing the commented out codes Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on code brevity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable for better clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py renaming variable name for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable name revised for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py variable renamed for clarity Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py improvement on docstring Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Readability improvement of equation Co-authored-by: Liang Yu <[email protected]> * addressing comments bt @LiangJYu * docstring fix; variables renamed for clarity * implemented s1_annotation.AucCal.load_from_zip_file() * readability improvement * s1_annotation.py - code cleanup; excention handling for AUX_CAL; PEP8 compliance * docstring for `s1_burst_slc.eap_compensation_lut()` * class import scheme changed * PEP8 compliance * initial structure of modification * less mod compared to the branch fork * extended coeffs for FM rate and Doppler centroid to be used for azimuth FM mismatch rate mitigation * Working version of azimuth FM rate mismatch mitigation * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: Gustavo H. X. Shiroma <[email protected]> * addressing comments from @gshiroma * trailing white spaces are removed * docstring updated * Code cleanup and docstrings * code cleanup * trailing white space removed * docsrting added; variable renaming for less verbosity; * code cleanup and simplification * variable name simplification * clde cleanup * Output as isce3.core.LUT2d * threshold and num_iter for rdr2geo * Addressing codacy issue * Trailing whitespace removed * codacy issue * docstring clarification on `BurstExtendedCoeffs` * whitespace removed * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_orbit.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * comment added for clarity * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * mod on the suggested commit to reuse the topo output filenames * fix on variable * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * typo fix * Update src/s1reader/s1_burst_slc.py Co-authored-by: vbrancat <[email protected]> * Re-using the parsed polynomials; mitigation results as ISCE3 LUT2d * revision on import format * TODO removed * Option to turn on / off the functionalities for az fm rate mismatch mitigation * removing alias for `Rdr2Geo` * whitespace removed after resolving conflict * addressing codacy issue * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Update src/s1reader/s1_reader.py Co-authored-by: Liang Yu <[email protected]> * variable name changed * bug fixed; variable name updated * addressing codacy issues * codacy issue * variable name changed * pulling out functions that does not need to be methods * whitespace removed * updates after linting * Docstring for `_burst_from_safe_dir` revised * Docstring for `_burst_from_zip` revised * Docstring for `load_bursts` revised * Docstring for `burst_from_xml` revised * Update src/s1reader/s1_burst_slc.py Co-authored-by: Liang Yu <[email protected]> * Docstring for `az_fm_rate_mismatch_mitigation` revised * Use temporary directory when `path_scratch` was not provided; take in az/rg steps as options to define radargrid * codacy issue * docstring updated; variable name changed * unnecessary members removed; docstring revised * temporary filename format changed * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_annotation.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * unit_degree -> in_degree * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Update src/s1reader/s1_burst_slc.py Co-authored-by: Scott Staniewicz <[email protected]> * Apply suggestions from code review Co-authored-by: Scott Staniewicz <[email protected]> * variable name format revised * `mitigate_az_fmrate_mismatch` removed * PEP8 issues Co-authored-by: Seongsu Jeong <[email protected]> Co-authored-by: Liang Yu <[email protected]> Co-authored-by: Gustavo H. X. Shiroma <[email protected]> Co-authored-by: vbrancat <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> commit ae88a1d56df19b8e1cd5f8be9bc73e195e256c31 Author: Scott Staniewicz <[email protected]> Date: Wed Dec 7 11:35:15 2022 -0500 s1_reader: fix safe_path for directories (#91) * s1_reader: fix safe_path for directories _burst_from_safe_dir used os.listdir, which does not have "measurement" in the returned names like the zip file list does this fixes #90 * return a string instead of list commit a9c20a42f038e2f8b65ea7c1cf2f4719a1ce49c7 Author: Zhang Yunjun <[email protected]> Date: Thu Dec 1 20:45:08 2022 -0800 bugfix in Sentinel1BurstSlc.swath_name() (#89) commit dfc028a2d6848c693c74aca95351c798cd4e6686 Author: Zhang Yunjun <[email protected]> Date: Thu Dec 1 17:00:13 2022 -0800 add s1-etad prep module for testing S1-ETAD products (#73) + add s1_etad.py as a wrapper around the `s1etad` module from ESA to read / prepare ETA correction, given a `s1reader` burst object Co-authored-by: Seongsu Jeong <[email protected]>
1 parent ba3efcb commit 813a35b

File tree

9 files changed

+761
-29
lines changed

9 files changed

+761
-29
lines changed

src/s1reader/s1_annotation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def closest_block_to_azimuth_time(vector_azimuth_time: np.ndarray,
542542
class BurstNoise:
543543
'''Noise correction information for Sentinel-1 burst'''
544544
basename_nads: str
545-
range_azimith_time: datetime.datetime
545+
range_azimuth_time: datetime.datetime
546546
range_line: float
547547
range_pixel: np.ndarray
548548
range_lut: np.ndarray
@@ -590,7 +590,7 @@ def from_noise_annotation(cls, noise_annotation: NoiseAnnotation,
590590
id_closest = closest_block_to_azimuth_time(noise_annotation.rg_list_azimuth_time,
591591
azimuth_time)
592592

593-
range_azimith_time = noise_annotation.rg_list_azimuth_time[id_closest]
593+
range_azimuth_time = noise_annotation.rg_list_azimuth_time[id_closest]
594594
range_line = noise_annotation.rg_list_line[id_closest]
595595
range_pixel = noise_annotation.rg_list_pixel[id_closest]
596596
range_lut = noise_annotation.rg_list_noise_range_lut[id_closest]
@@ -617,7 +617,7 @@ def from_noise_annotation(cls, noise_annotation: NoiseAnnotation,
617617
azimuth_line = None
618618
azimuth_lut = None
619619

620-
return cls(basename_nads, range_azimith_time, range_line, range_pixel, range_lut,
620+
return cls(basename_nads, range_azimuth_time, range_line, range_pixel, range_lut,
621621
azimuth_first_azimuth_line, azimuth_first_range_sample,
622622
azimuth_last_azimuth_line, azimuth_last_range_sample,
623623
azimuth_line, azimuth_lut,

src/s1reader/s1_burst_slc.py

Lines changed: 374 additions & 7 deletions
Large diffs are not rendered by default.

src/s1reader/s1_etad.py

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
"""Wrapper of s1etad module to read S1-ETAD products."""
2+
import datetime
3+
import glob
4+
import os
5+
6+
import numpy as np
7+
from matplotlib import pyplot as plt
8+
from scipy.interpolate import RectBivariateSpline
9+
10+
try:
11+
import s1etad
12+
except ImportError:
13+
raise ImportError('Can NOT import s1etad (https://gitlab.com/s1-etad/s1-etad)!')
14+
15+
16+
17+
def get_eta_correction_from_slc_burst(slc_burst, eta_dir, corr_type='sum', include_tropo=True,
18+
resample=True, plot=False, verbose=True, unit='second'):
19+
"""Get the ETAD correction for one S1 burst.
20+
21+
Parameters
22+
----------
23+
slc_burst: Sentinel1BurstSlc
24+
Sentinel-1 burst object from sentinel1_reader
25+
eta_dir: str
26+
Sentinel-1 ETAD product directory
27+
corr_type: (list of) str
28+
Sentinel-1 ETAD correction type:
29+
sar, atm, sum, bistatic, doppler, fmrate, geodetic, ionospheric, tropospheric
30+
where sar = bistatic + doppler + fmrate
31+
atm = ionospheric + tropospheric
32+
sum = sar + atm + geodetic
33+
resample: bool
34+
resample the low resolution ETA to the full resample SLC size
35+
unit: str
36+
output ETA correction unit:
37+
pixel, second (meter is not recommended, as time info is more consistent and universal in SAR)
38+
39+
Returns:
40+
----------
41+
slc_rg_corr: np.ndarray in float32 in size of (lines, samples)
42+
S1 ETAD correction in range direction in the unit of meter or second
43+
slc_az_corr: np.ndarray in float32 in size of (lines, samples)
44+
S1 ETAD correction in azimuth direction in the unit of meter or second
45+
"""
46+
vprint = print if verbose else lambda *args, **kwargs: None
47+
if unit not in ['second', 'meter', 'pixel']:
48+
raise ValueError(f'Un-recognized input unit={unit}!')
49+
meter = (unit == 'meter')
50+
# When True, read s1etad product in meters
51+
# When False, read s1etad product in seconds [recommended]
52+
53+
# locate / read ETA burst
54+
eta_burst, eta = get_eta_burst_from_slc_burst(slc_burst, eta_dir, verbose=verbose)
55+
56+
# read ETA correction data
57+
corr_type = corr_type.lower()
58+
if isinstance(corr_type, list):
59+
corr_types = list(corr_type)
60+
elif corr_type == 'sar':
61+
corr_types = ['bistatic', 'doppler', 'fmrate']
62+
elif corr_type == 'atm':
63+
corr_types = ['ionospheric', 'tropospheric']
64+
else:
65+
corr_types = [corr_type]
66+
vprint(f'read correction data with type: {corr_type}')
67+
68+
eta_rg_corr = np.zeros((eta_burst.lines, eta_burst.samples), dtype=np.float32)
69+
eta_az_corr = np.zeros((eta_burst.lines, eta_burst.samples), dtype=np.float32)
70+
for corr_type in corr_types:
71+
correction = eta_burst.get_correction(corr_type, meter=meter)
72+
73+
if 'x' in correction.keys():
74+
scale = slc_burst.range_sampling_rate if unit == 'pixel' else 1.0
75+
eta_rg_corr += correction['x'] * scale
76+
77+
if 'y' in correction.keys():
78+
scale = 1.0 / slc_burst.azimuth_time_interval if unit == 'pixel' else 1.0
79+
eta_az_corr += correction['y'] * scale
80+
81+
if not include_tropo and any(x in corr_types for x in ['tropospheric', 'sum']):
82+
print('excluding tropospheric component from ETAD products in X direction')
83+
correction = eta_burst.get_correction('tropospheric')
84+
scale = slc_burst.range_sampling_rate if unit == 'pixel' else 1.0
85+
eta_rg_corr -= correction['x'] * scale
86+
87+
if resample or plot:
88+
# calculate ETA grid
89+
eta_az_start = (eta.min_azimuth_time - slc_burst.sensing_mid).total_seconds() + eta_burst.sampling_start['y']
90+
eta_rg_start = eta.min_range_time + eta_burst.sampling_start['x']
91+
eta_az_ax = eta_az_start + np.arange(eta_burst.lines) * eta_burst.sampling['y']
92+
eta_rg_ax = eta_rg_start + np.arange(eta_burst.samples) * eta_burst.sampling['x']
93+
94+
# calculate SLC grid
95+
slc_az_ax = np.arange(slc_burst.length) * slc_burst.azimuth_time_interval \
96+
+ (slc_burst.sensing_start - slc_burst.sensing_mid).total_seconds()
97+
slc_rg_ax = np.arange(slc_burst.width) / slc_burst.range_sampling_rate \
98+
+ slc_burst.slant_range_time
99+
100+
if resample:
101+
# resample ETA correction data to the SLC grid
102+
vprint('resampling the ETA correction data from ETA grid to SLC grid ...')
103+
rg_interp = RectBivariateSpline(eta_az_ax, eta_rg_ax, eta_rg_corr, kx=1, ky=1) # bi-linear
104+
az_interp = RectBivariateSpline(eta_az_ax, eta_rg_ax, eta_az_corr, kx=1, ky=1) # bi-linear
105+
slc_rg_corr = rg_interp(slc_az_ax, slc_rg_ax)
106+
slc_az_corr = az_interp(slc_az_ax, slc_rg_ax)
107+
108+
if plot:
109+
vprint('plot ETA correction data and grid')
110+
111+
# figure 1 - ETA corrections
112+
fig, axs = plt.subplots(nrows=2, ncols=1, figsize=[12, 6], sharex=True, sharey=True)
113+
for ax, corr, title in zip(axs, [eta_rg_corr, eta_az_corr], ['x', 'y']):
114+
im = ax.imshow(corr, aspect='auto', interpolation='nearest')
115+
fig.colorbar(im, ax=ax, shrink=0.8, location='right').set_label('pixel')
116+
ax.set_title(f'correction [{title}]')
117+
ax.set_ylabel('Azimuth [pixel]')
118+
axs[1].set_xlabel('Range [pixel]')
119+
fig.tight_layout()
120+
121+
# figure 2 - ETA & SLC grids [for comparison/checking]
122+
eta_box = np.asarray([
123+
(eta_rg_ax[0], eta_az_ax[0]),
124+
(eta_rg_ax[0], eta_az_ax[-1]),
125+
(eta_rg_ax[-1], eta_az_ax[-1]),
126+
(eta_rg_ax[-1], eta_az_ax[0]),
127+
(eta_rg_ax[0], eta_az_ax[0]),
128+
])
129+
slc_box = np.asarray([
130+
(slc_rg_ax[0], slc_az_ax[0]),
131+
(slc_rg_ax[0], slc_az_ax[-1]),
132+
(slc_rg_ax[-1], slc_az_ax[-1]),
133+
(slc_rg_ax[-1], slc_az_ax[0]),
134+
(slc_rg_ax[0], slc_az_ax[0]),
135+
])
136+
137+
fig, ax = plt.subplots(figsize=[12, 3])
138+
ax.plot(eta_box[:, 0] * 1e3, eta_box[:, 1], 'C0', label='ETA')
139+
ax.plot(slc_box[:, 0] * 1e3, slc_box[:, 1], 'C1', label='SLC')
140+
ax.set_xlabel('Range [ms]')
141+
ax.set_ylabel('Azimuth [s]')
142+
ax.set_title('grid')
143+
ax.legend()
144+
ax.grid()
145+
146+
plt.show()
147+
148+
if not resample:
149+
return eta_rg_corr, eta_az_corr
150+
151+
return slc_rg_corr, slc_az_corr
152+
153+
154+
155+
def get_eta_burst_from_slc_burst(slc_burst, eta_dir, verbose=True):
156+
"""Read ETA burst corresponding to the input SLC burst."""
157+
158+
# locate ETAD file
159+
eta_file = get_eta_file_from_slc_burst(slc_burst, eta_dir, verbose=verbose)
160+
161+
# read ETA file using s1-etad
162+
eta = s1etad.Sentinel1Etad(eta_file)
163+
164+
# locate the ETA burst
165+
t0_query = slc_burst.sensing_start - datetime.timedelta(seconds=0.25)
166+
t1_query = slc_burst.sensing_stop + datetime.timedelta(seconds=0.25)
167+
if verbose:
168+
print(f'search ETA burst in {slc_burst.swath_name} with the following time range:')
169+
print(f'start time: {t0_query}')
170+
print(f'end time: {t1_query}')
171+
172+
selection = eta.query_burst(
173+
swath=slc_burst.swath_name.upper(),
174+
first_time=t0_query,
175+
last_time=t1_query,
176+
)
177+
178+
if len(selection) == 0:
179+
raise ValueError('No ETA burst found!')
180+
elif len(selection) > 1:
181+
raise ValueError('More than 1 ETA burst found, please adjust your search/query criteria!')
182+
183+
eta_burst = eta[slc_burst.swath_name.upper()][selection.bIndex.values[0]]
184+
185+
return eta_burst, eta
186+
187+
188+
def get_eta_file_from_slc_burst(slc_burst, eta_dir, verbose=True):
189+
"""Get/locate ETAD file path based on SLC burst."""
190+
191+
# safe filename --> ETA filename pattern
192+
fparts = os.path.basename(slc_burst.safe_filename).split('_')
193+
eta_fbase = f'{fparts[0]}_IW_ETA__*_{fparts[5]}_{fparts[6]}_{fparts[7]}_{fparts[8]}_*.SAFE'
194+
195+
# search the ETA filename pattern
196+
eta_file = glob.glob(os.path.join(eta_dir, eta_fbase))[0]
197+
if verbose:
198+
print(f'search ETA file with pattern: {eta_fbase}')
199+
print(f'locate ETA file: {eta_file}')
200+
201+
return eta_file
202+

0 commit comments

Comments
 (0)