Skip to content

Commit

Permalink
Fix for the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Sep 21, 2024
1 parent f9b7407 commit c5a9fac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygmtsar/pygmtsar/Stack_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def block_phase_dask(block_topo, y_chunk, x_chunk, prm1, prm2):
# clock_stop=prm.get('clock_start') + maxy / prm.get('PRF') / 86400)\
# .to_file(prm_filename)

def prepare_prms(pair, maxy, maxx, dt1, dt2):
def prepare_prms(pair, dt1, dt2):
date1, date2 = pair
prm1 = self.PRM(date1)
prm2 = self.PRM(date2)
Expand All @@ -236,7 +236,7 @@ def prepare_prms(pair, maxy, maxx, dt1, dt2):
.set(prm1.SAT_baseline(prm1).sel('SC_height','SC_height_start','SC_height_end')).fix_aligned()
return (prm1, prm2)

prms = joblib.Parallel(n_jobs=-1)(joblib.delayed(prepare_prms)(pair, maxy, maxx, dt1, dt2) for pair in pairs)
prms = joblib.Parallel(n_jobs=-1)(joblib.delayed(prepare_prms)(pair, dt1, dt2) for pair in pairs)

# fill NaNs by 0 and expand to 3d
topo2d = da.where(da.isnan(topo.data), 0, topo.data)
Expand Down

0 comments on commit c5a9fac

Please sign in to comment.