Skip to content

Commit

Permalink
Merge pull request #146 from ACCESS-Cloud-Based-InSAR/set-fix
Browse files Browse the repository at this point in the history
SET Bug related to geo2rdr (duplicate state vectors)
  • Loading branch information
cmarshak authored Jul 26, 2023
2 parents 354991e + baed31a commit 5e9e433
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* Read low resolution Natural Earth land masses from public url due to removal from geopandas package.
* For ionosphere computation over water, includes masking conncomp zero, phase bridging, and modified adaptive gaussian filtering
* Fix for #135, skip iono computation if there are not land (all zero values) and skip using water mask if the area is outside of SWBD coverage
* Fix for #145 and SET - duplicate orbit xmls for computing azimuth time grid with ISCE2 geo2rdr (duplicate state vectors likely culprit). Ensures orbit object is intialized with unique set of orbit xmls passed. Also, localized metadata appropriately.

### Added
* localize_data within __main__.py added option to use/not use water mask for ionosphere processing
Expand Down
3 changes: 3 additions & 0 deletions isce2_topsapp/localize_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def download_orbits(reference_scenes: list,
orbit_file, _ = orbit_fetcher(scene, str(orbit_dir))
secondary_orbits.append(orbit_file)

reference_orbits = list(set(reference_orbits))
secondary_orbits = list(set(secondary_orbits))

return {
'orbit_directory': orbit_directory,
'reference_orbits': reference_orbits,
Expand Down
7 changes: 5 additions & 2 deletions isce2_topsapp/solid_earth_tides.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def get_orbit_obj_from_orbit_xmls(orbit_xmls: list[Path],
get from the slc_id stored in GUNW products.
"""
state_vectors = []
for orbit_xml in orbit_xmls:
# Duplicate XMLs leads to unexpected behavior in geo2rdr see errors in
# https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/issues/145
orbit_xmls_unique = list(set(orbit_xmls))
for orbit_xml in orbit_xmls_unique:
state_vectors.extend(get_state_vector_arrays(orbit_xml))
orb = Orbit()
orb.configure()
Expand Down Expand Up @@ -232,7 +235,7 @@ def get_azimuth_time_array(orbit_xmls: list[Path],
Notes
-----
See get_orbit_obj_from_orbit_xmls as to why slc start time and padding is required.
- See get_orbit_obj_from_orbit_xmls as to why slc start time and padding is required.
"""

orb = get_orbit_obj_from_orbit_xmls(orbit_xmls,
Expand Down

0 comments on commit 5e9e433

Please sign in to comment.