Skip to content

Commit

Permalink
refactor arg name
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Jan 28, 2025
1 parent 8fbae27 commit d9fc4cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 4 additions & 7 deletions src/hyp3_autorift/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,11 @@ def process(
platform = get_platform(reference)

if platform == 'S1':
from hyp3_autorift.s1_isce3 import process_sentinel1_with_isce3_slc, process_sentinel1_burst_isce3
if reference.endswith('-BURST'):
netcdf_file = process_sentinel1_burst_isce3(reference, secondary)
else:
netcdf_file = process_sentinel1_with_isce3_slc(reference, secondary)
from hyp3_autorift.s1_isce3 import process_sentinel1_with_isce3_slc
netcdf_file = process_sentinel1_with_isce3_slc(reference, secondary)
elif platform == 'GS1':
from hyp3_autorift.s1_isce3 import process_burst_sentinel1_with_isce3_radar
netcdf_file = process_burst_sentinel1_with_isce3_radar(reference, secondary)
from hyp3_autorift.s1_isce3 import process_sentinel1_burst_isce3
netcdf_file = process_sentinel1_burst_isce3(reference, secondary)
else:
# Set config and env for new CXX threads in Geogrid/autoRIFT
gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'EMPTY_DIR')
Expand Down
8 changes: 5 additions & 3 deletions src/hyp3_autorift/s1_isce3.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def process_burst_radar(
return netcdf_file


def process_sentinel1_burst_isce3(burst_granule_ref, burst_granule_sec, do_radar=True):
def process_sentinel1_burst_isce3(burst_granule_ref, burst_granule_sec, do_geocode=False):
esa_username, esa_password = get_esa_credentials()
esa_credentials = (esa_username, esa_password)

Expand All @@ -135,8 +135,9 @@ def process_sentinel1_burst_isce3(burst_granule_ref, burst_granule_sec, do_radar
burst_ids_ref = get_burst_ids(safe_ref, burst_granule_ref, orbit_ref)
burst_ids_sec = get_burst_ids(safe_sec, burst_granule_sec, orbit_sec)

if do_radar:
process_burst_radar(
if do_geocode:
# Use geographic CRS
process_burst_geo(
safe_ref,
safe_sec,
orbit_ref,
Expand All @@ -147,6 +148,7 @@ def process_sentinel1_burst_isce3(burst_granule_ref, burst_granule_sec, do_radar
burst_ids_sec
)
else:
# Use radar geometry
process_burst_radar(
safe_ref,
safe_sec,
Expand Down

0 comments on commit d9fc4cb

Please sign in to comment.