Skip to content

Commit

Permalink
resolve #169 and #170
Browse files Browse the repository at this point in the history
  • Loading branch information
cmarshak committed Feb 16, 2024
1 parent 9b64072 commit 39aac80
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ tests/**/*.json
# Use geojson zip file for ARIA s1 frame data
!isce2_topsapp/data/s1_gunw_frame_footprints.geojson.zip
!isce2_topsapp/data/s1_frames_latitude_aligned.geojson.zip

# Include Natural Earth data inside plugin
!isce2_topsapp/data/ne_10m_land.zip
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.2]

### Changed
* We ensured that ASF is checked for orbits before ESA to improve reliability. Aims to resolve orbit download issues seen [here](https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/issues/169) seen in large processing campaigns and possible errors associated with ESA downloading.
* We include natural earth data in the plugin to exclude hitting the natural earth server and aims to resolve such issues identified [here](https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/issues/170) in large processing campaigns.

## [0.3.1]

### Added
Expand Down
Binary file added isce2_topsapp/data/ne_10m_land.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion isce2_topsapp/localize_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def download_orbits(
orbit_dir = Path(orbit_directory)
orbit_dir.mkdir(exist_ok=True)

orbit_fetcher = _spoof_orbit_download if dry_run else get_orb.downloadSentinelOrbitFile
# This importantly looks at ASF first
def downloadSentinelOrbitFile_partial(scene: str, esa_credentials=None) -> tuple:
return get_orb.downloadSentinelOrbitFile(scene, esa_credentials=esa_credentials, providers=('ASF', 'ESA'))
orbit_fetcher = _spoof_orbit_download if dry_run else downloadSentinelOrbitFile_partial

reference_orbits = []
for scene in reference_scenes:
Expand Down
6 changes: 2 additions & 4 deletions isce2_topsapp/localize_slc.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ def check_track_numbers(slc_properties: list):

@lru_cache(maxsize=None)
def get_world_df() -> gpd.GeoDataFrame:
natural_earth_url = ('https://www.naturalearthdata.com/'
'http//www.naturalearthdata.com/download/10m/physical/ne_10m_land.zip')
resp = requests.get(natural_earth_url, headers={"User-Agent": "XY"})
df_world = gpd.read_file(io.BytesIO(resp.content))
data_dir = Path(__file__).parent / 'data'
df_world = gpd.read_file(data_dir / 'ne_10m_land.zip')
return df_world


Expand Down
2 changes: 1 addition & 1 deletion tests/solid_earth_tides.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
],
"source": [
"esa_credentials = (os.environ['ESA_USERNAME'], os.environ['ESA_PASSWORD'])\n",
"orb_file, _ = get_orb.downloadSentinelOrbitFile(slc_id, esa_credentials=esa_credentials)\n",
"orb_file, _ = get_orb.downloadSentinelOrbitFile(slc_id, esa_credentials=esa_credentials, providers=('ASF', 'ESA'))\n",
"orb_file"
]
},
Expand Down

0 comments on commit 39aac80

Please sign in to comment.