Skip to content

Commit

Permalink
Enhance ASF.download() wrapper function
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Aug 8, 2024
1 parent 53d4509 commit 6eae0bb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pygmtsar/pygmtsar/ASF.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ def download(self, basedir, scenes_or_bursts, subswaths=None, polarization='VV',
result = self.download_bursts(basedir, bursts,
session=session,
n_jobs=n_jobs, joblib_backend=joblib_backend, skip_exist=skip_exist, debug=debug)
results.append(result.rename({'burst': 'burst_or_scene'}, axis=1))
if result is not None:
results.append(result.rename({'burst': 'burst_or_scene'}, axis=1))
if len(scenes):
result = self.download_scenes(basedir, scenes, subswaths=subswaths, polarization=polarization,
session=session,
n_jobs=n_jobs, joblib_backend=joblib_backend, skip_exist=skip_exist, debug=debug)
results.append(result.rename({'scene': 'burst_or_scene'}, axis=1))
return pd.concat(results)
if result is not None:
results.append(result.rename({'scene': 'burst_or_scene'}, axis=1))
if len(results):
return pd.concat(results)

def download_scenes(self, basedir, scenes, subswaths, polarization='VV', session=None,
n_jobs=4, joblib_backend='loky', skip_exist=True, debug=False):
Expand Down

0 comments on commit 6eae0bb

Please sign in to comment.