Skip to content

Commit

Permalink
swtiched from get_orb to s1_orbits
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Aug 8, 2024
1 parent d7afc31 commit e6473aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hyp3_gamma/insar/ifm_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
from hyp3lib.SLC_copy_S1_fullSW import SLC_copy_S1_fullSW
from hyp3lib.execute import execute
from hyp3lib.getParameter import getParameter
from hyp3lib.get_orb import downloadSentinelOrbitFile
from hyp3lib.makeAsfBrowse import makeAsfBrowse
from hyp3lib.par_s1_slc_single import par_s1_slc_single
from hyp3lib.system import gamma_version
from lxml import etree, objectify
from s1_orbits import fetch_for_scene

import hyp3_gamma
from hyp3_gamma.insar.getDemFileGamma import get_dem_file_gamma
Expand Down Expand Up @@ -363,8 +363,8 @@ def insar_sentinel_gamma(reference_file, secondary_file, rlooks=20, alooks=4, in
orbit_files = []
for granule in (reference_file, secondary_file):
log.info(f'Downloading orbit file for {granule}')
orbit_file, provider = downloadSentinelOrbitFile(granule, esa_credentials=esa_credentials)
log.info(f'Got orbit file {orbit_file} from provider {provider}')
orbit_file = str(fetch_for_scene(granule))
log.info(f'Got orbit file {orbit_file} from s1_orbits')
par_s1_slc_single(granule, pol, os.path.abspath(orbit_file))
orbit_files.append(orbit_file)

Expand Down
8 changes: 4 additions & 4 deletions hyp3_gamma/rtc/rtc_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
from hyp3lib.createAmp import createAmp
from hyp3lib.execute import execute
from hyp3lib.getParameter import getParameter
from hyp3lib.get_orb import downloadSentinelOrbitFile
from hyp3lib.makeAsfBrowse import makeAsfBrowse
from hyp3lib.make_cogs import cogify_dir
from hyp3lib.raster_boundary2shape import raster_boundary2shape
from hyp3lib.rtc2color import rtc2color
from hyp3lib.system import gamma_version
from osgeo import gdal, gdalconst, ogr
from s1_orbits import fetch_for_scene, OrbitNotFoundError

import hyp3_gamma
from hyp3_gamma.dem import get_geometry_from_kml, prepare_dem_geotiff
Expand Down Expand Up @@ -316,9 +316,9 @@ def rtc_sentinel_gamma(safe_dir: str, resolution: float = 30.0, radiometry: str

try:
log.info(f'Downloading orbit file for {granule}')
orbit_file, provider = downloadSentinelOrbitFile(granule, esa_credentials=esa_credentials)
log.info(f'Got orbit file {orbit_file} from provider {provider}')
except OrbitDownloadError as e:
orbit_file = str(fetch_for_scene(granule))
log.info(f'Got orbit file {orbit_file} from s1-orbits.')
except OrbitNotFoundError as e:
log.warning(e)
log.warning(f'Proceeding using original predicted orbit data included with {granule}')
orbit_file = None
Expand Down

0 comments on commit e6473aa

Please sign in to comment.