GeoscienceAustralia / PyRate

A Python tool for estimating velocity and time-series from Interferometric Synthetic Aperture Radar (InSAR) data.
https://geoscienceaustralia.github.io/PyRate/
Apache License 2.0
200 stars 70 forks source link

limit file open during prepifg #336

Closed basaks closed 3 years ago

basaks commented 3 years ago

To address https://github.com/GeoscienceAustralia/PyRate/issues/323

richardt94 commented 3 years ago

get_analysis_extent is also used in pyrate/core/orbital.py and pyrate/core/refpixel.py; these too will need to be modified

Is this true? Unless steps in orbital and refpixel are relying on side effects of get_analysis_extent by assuming the ifgs are already open then those calls should still work OK

basaks commented 3 years ago

yes, that is fine. Now on that function call we open the rasters as required and once they are used, the rasters are closed. Now all the file open and close opeations are internal to get_analysis_extent childs, and the files are only open one at a time and closed asap. Minimal files are open while using this function now.

mcgarth commented 3 years ago

get_analysis_extent is also used in pyrate/core/orbital.py and pyrate/core/refpixel.py; these too will need to be modified

Is this true? Unless steps in orbital and refpixel are relying on side effects of get_analysis_extent by assuming the ifgs are already open then those calls should still work OK

Ah yes, no need to change the calls to get_analysis_extent in pyrate/core/orbital.py and pyrate/core/refpixel.py