I have stumbled upon a bug where the tile size affects the computation results of S-1 TOPS Coregistration.
The data sets used are named:
S1B_IW_SLC__1SDV_20200730T034254_20200730T034321_022695_02B131_E8DD.SAFE
S1A_IW_SLC__1SDV_20200805T034334_20200805T034401_033766_03E9F9_52F6.SAFE
From the coregistration options we are using subswath IW1 with a polarisation VV. Also we are masking areas with 0 elevation and using bilinear interpolation.
elevation model is srtm3.
if snap uses default tiles which should be about 500x500 then the pixel (6251;6186) is valued as 0 or NaN as it is masked out.
If I am forcing larger tiles such as a 2666x1500 tile, then some coastal areas start to differ. It seems that elevation mask is not applied at some areas. Particularly pixel (6251;6186) and its surrounding area.
The exact tile that troubles me is x:5332 y:6000 w:2666 h:1500.
When I remove masking, then the pixel is valued very close to what it is valued on tile x:5332 y:6000 w:2666 h:1500 with the first difference occurring on the 3rd decimal place.
Previously when working I have noticed that coastal areas have differing results also with small tiles such as 100x100.
Is this a known issue? Is this functionality intended? How do I define what is the correct result in this case?
I tried testing the same issue and so far it seems I can recreate it on any dataset pair with coastal areas.
steps I did to reproduce:
set tile size to 128 via configuration
start SNAP and run coregistration, save the result
set tile size to 512 via configuration
start SNAP and run coregistration, save the result
compare slave bands on 128 and 512 tile size variants.
If the dataset contains areas without dem coverage(e.g coastal area) I have so far always seen the errors on the coast line if substracting tile=128 and tile=512 images.
Here is a visualization of the bug, I created three images of a dataset with coastal are being masked out after coregistration. Images 1&2 are from I band, but with different tile sizes.
Visually the difference can be seen that some areas are masked out, however upon closer inspection by the band math image, it can be seen that it is just not a question of masking out, as some coastal areas also have different pixel values. I have not seen a dataset with coastal areas where this does not apply, but these particular images were done with: