umr-lops / xsar

Synthetic Aperture Radar (SAR) Level-1 GRD python mapper for efficient xarray/dask based processing
https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/
MIT License
29 stars 8 forks source link

RCM problem with LUTs indexes #228

Closed vincelhx closed 1 month ago

vincelhx commented 1 month ago

Use case 1

We encountered an inconsistency in an orbit-descending product, where two Level 2 products, derived from the same Level 0 acquisition, had different NRCS values (here VV is shown) : image

According to the "RCM Image Product Format Definition" (Section 4.2.1), it's crucial to correctly align the indices when reading Look-Up Tables (LUTs). We discovered that the alignment was performed twice for the LUTs, in the assign_index and flip_sample_da functions, respectively.

By modifying the flip_sample_da function as follows:

samples_depending_ds = ['geolocationGrid', 'lut', 'noise_lut']
samples_depending_ds = ['geolocationGrid']

we eliminated the redundant operation and successfully aligned the LUTs with the correct samples, resolving the inconsistency.

image

vincelhx commented 1 month ago

i will present another example soon.

vincelhx commented 1 month ago

https://github.com/umr-lops/xsar/pull/224/commits/1e51f25d70541723d5c7c42b434b95cdb4c656d1 should solve