Skip to content

Commit

Permalink
Updated orbit download for faster performance
Browse files Browse the repository at this point in the history
~5x faster performance. Repeated dates using same orbit where slow to verify. This skips verification and applies downloaded orbit to all products of the same date (different subswaths or frames).
  • Loading branch information
SteffanDavies committed Aug 1, 2023
1 parent bb14cc4 commit 9a84954
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pygmtsar/pygmtsar/SBAS_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def download_orbits(self):
"""
from eof.download import download_eofs

df = self.df[self.df['orbitpath'].isna()]

# download all the misssed orbit files
for record in df.itertuples():
#print (date, mission)
# For each date get a single product with missing orbit
sbas_df_missingorb = self.df.where(self.df.orbitpath.isna())
sbas_df_missingorb = sbas_df_missingorb[~sbas_df_missingorb.index.duplicated(keep="first")]

# Apply orbit to products of same date
for record in sbas_df_missingorb.itertuples():
orbitpath = download_eofs([record.datetime], [record.mission], save_dir=self.basedir)[0]
#print ('orbitpath', orbitpath)
self.df.loc[self.df.datetime == record.datetime,'orbitpath'] = orbitpath
self.df.at[record.Index, "orbitpath"] = orbitpath

0 comments on commit 9a84954

Please sign in to comment.