Skip to content

Commit 99443e4

Browse files
Matt GarthwaiteMatt Garthwaite
Matt Garthwaite
authored and
Matt Garthwaite
committed
minor refactor after checking orbit module conforms with broader unit conversion issue
1 parent 07ce8df commit 99443e4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pyrate/core/orbital.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,13 @@ def independent_orbital_correction(ifg_path, params):
227227
fullres_dm = get_design_matrix(ifg0, degree, intercept=intercept)
228228

229229
ifg = shared.dem_or_ifg(ifg_path) if isinstance(ifg_path, str) else ifg_path
230-
ifg_path = ifg.data_path
230+
multi_path = MultiplePaths(ifg.data_path, params)
231+
orb_on_disc = MultiplePaths.orb_error_path(ifg.data_path, params)
231232

232-
multi_path = MultiplePaths(ifg_path, params)
233-
fullres_ifg = ifg # keep a backup
234-
orb_on_disc = MultiplePaths.orb_error_path(ifg_path, params)
235233
if not ifg.is_open:
236234
ifg.open()
237-
238235
shared.nan_and_mm_convert(ifg, params)
236+
fullres_ifg = ifg # keep a backup
239237
fullres_phase = fullres_ifg.phase_data
240238

241239
if orb_on_disc.exists():
@@ -270,7 +268,6 @@ def independent_orbital_correction(ifg_path, params):
270268

271269
# set orbfit meta tag and save phase to file
272270
_save_orbital_error_corrected_phase(fullres_ifg, params)
273-
fullres_ifg.close()
274271

275272

276273
def __orb_correction(fullres_dm, mlooked_dm, fullres_phase, mlooked_phase, offset=False):

0 commit comments

Comments
 (0)