You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Problem
PyRate gives configuration options for the user to determine where the reference pixel will be refx and refy in longitude and latitude. There is also the option to crop the dataset with user defined coordinates so that PyRate only processes a smaller extent with ifgcropopt: 3. It is common for a user to use both of these options. The reference pixel selection is done during the correct step, whilst the cropping is conducted prior, in the prepifg step.
PyRate has a function inside refpix.py called __validate_supplied_lat_lon(). It is designed to confirm that the user supplied coordinates for the reference pixel are within the interferogram extent.
To obtain the spatial extent, the above function calls another function get_analysis_extent() which sits inside of prepifg_helper.py.
This sets off a sequence of other unrelated checks because this function was designed to operate during the prepifg step. One of these functions is to validate that user supplied cropping coordinates are within the original interferogram extent. But by this stage of the processing (correct step), the interferogram has already been cropped.
So the comparison is comparing user supplied cropping extents which are to 3 decimal places to the newly cropped interferogram datasets which are to 7 decimal places.
It results in this error:
Traceback (most recent call last):
File "/home/547/ad6200/PyRateVenv/bin/pyrate", line 11, in <module>
load_entry_point('Py-Rate==0.6.0', 'console_scripts', 'pyrate')()
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/main.py", line 116, in main
correct.main(config)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/correct.py", line 142, in main
return correct_ifgs(config)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/correct.py", line 226, in correct_ifgs
params[C.REFX_FOUND], params[C.REFY_FOUND] = ref_pixel_calc_wrapper(params)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/core/refpixel.py", line 423, in ref_pixel_calc_wrapper
__validate_supplied_lat_lon(params)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/core/refpixel.py", line 401, in __validate_supplied_lat_lon
C.IFG_XLAST], params[C.IFG_YLAST])
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/core/prepifg_helper.py", line 81, in get_analysis_extent
return _get_extents(rasters, crop_opt, user_exts)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/core/prepifg_helper.py", line 146, in _get_extents
extents = _custom_bounds(ifgs, *user_exts)
File "/home/547/ad6200/PyRateVenv/lib/python3.7/site-packages/pyrate/core/prepifg_helper.py", line 332, in _custom_bounds
raise PreprocessError(msg)
pyrate.core.prepifg_helper.PreprocessError: Cropped image bounds are outside the original image bounds
The text was updated successfully, but these errors were encountered:
adeane-ga
changed the title
Bug: Use of user supplied cropping extent coordinates in combination with reference pixel coordinates causes PyRate to crash
Bug: Use of user supplied cropping extent coordinates in combination with reference pixel coordinates causes PyRate to stop processing.
Oct 18, 2021
The Problem
PyRate gives configuration options for the user to determine where the reference pixel will be
refx
andrefy
in longitude and latitude. There is also the option to crop the dataset with user defined coordinates so that PyRate only processes a smaller extent withifgcropopt: 3
. It is common for a user to use both of these options. The reference pixel selection is done during the correct step, whilst the cropping is conducted prior, in the prepifg step.__validate_supplied_lat_lon()
. It is designed to confirm that the user supplied coordinates for the reference pixel are within the interferogram extent.get_analysis_extent()
which sits inside ofprepifg_helper.py
.It results in this error:
The text was updated successfully, but these errors were encountered: