Closed tfuhrmann closed 3 years ago
Let's defer this until the coregistration related changes from @mwheeler have been added.
All occurrences of 'rlks' in function adjust_dem_parameter should therefore be replaced by the 'multi_look' parameter as defined in function calc_multilook_values.py
Just to clarify, calc_multilook_values.py
is a module, with some functions having a multi_look
param.
@tfuhrmann does the multi_look value in the proc file provide the required value for adjust_dem_parameter()
?
https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/project.py#L52
Yes, the 'multi_look' value given in the .proc file is the required value to be used in adjust_dem_parameter()
instead of 'rlks'.
Sorry for the confusion. I didn't know where the 'multi_look' param is defined in the py-gamma workflow and could only find it in the calc_multilook_values.py
module. Note that 'multi_look' is named '$looks' in the bash workflow.
Yes, the 'multi_look' value given in the .proc file is the required value to be used in
adjust_dem_parameter()
instead of 'rlks'.
Ok, thanks. Following from that, the processing DEM adjustment is only performed if rlks > 1
:
https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/coregister_dem.py#L160-L162
Should the if
check be removed and the DEM adjustment method be run every time?
Sorry for the confusion. I didn't know where the 'multi_look' param is defined in the py-gamma workflow and could only find it in the
calc_multilook_values.py
module. Note that 'multi_look' is named '$looks' in the bash workflow.
All good, I'm asking questions for anything I'm unsure of, mainly to get the Python code right :-)
Should the
if
check be removed and the DEM adjustment method be run every time?
The if
check can remain, but you need to replace rlks
by mulit_look
here as well (as I've done in the bash workflow, see https://github.com/GeoscienceAustralia/gamma_insar/blob/cbcf16b8084dea42f9125d276cd84c803a294564/coregister_DEM.bash#L73)
Ok, there's a magic number 1
in the bash:
So I can improve the Python code, what is the context/meaning of 1
here?
if the number of looks is set to '1' in the .proc file (parameter MULTI-LOOK=1), the SLC data is processed in full resolution (but using square pixels). For example, Sentinel-1 raw SLC data comes at a ground resolution of 3.7m x 14.1m (in range x azimuth direction). MULTI_LOOK=1 will apply spatial averaging in the range direction to match the full ground resolution of the azimuth direction. In this example RANGE_LOOKS=4 would be applied resoluting in a multi-looked resolution of 14.8m x 14.1m (so, range is multi-looked by a factor 4, azimuth uses full resolution). If general multi-looking is applied (i.e. MULTI-LOOK>1), the window sizes for the DEM coregistration process need to be adapted according to the general multi-look factor 'MULTI-LOOK' given in the .proc file. Usually we apply general multi-looking by setting MULTI-LOOK=2 (to reduce noise and also to reduce the size of the final products). In this case, RANGE_LOOKS would be set to 8 and AZIMUTH_LOOKS to 2 resulting in a multi-looked ground resolution of 29.6m x 28,2m.
Fixed with #171
Currently the parameter 'rlks' is used to calculate window sizes for the DEM coregistration. However the division by the range multi-look factor (i.e. rlks) was implemented for SAR sensors other than Sentinel-1, originally, where the multi-looking factor in range is smaller than the one is azimuth direction (the opposite is the case for Sentinel-1).
All occurrences of 'rlks' in function adjust_dem_parameter (see https://github.com/GeoscienceAustralia/gamma_insar/blob/97e7dfd99a66315aa441f011f2d9f8a4f05676f8/insar/coregister_dem.py#L304-L343) should therefore be replaced by the 'multi_look' parameter as defined in function calc_multilook_values.py (see https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/calc_multilook_values.py).
I will apply the same change to the bash workflow (develop branch).