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
25 stars 8 forks source link

WV_SLC high noise problem on ipf 2.9 #61

Closed oarcher closed 2 years ago

oarcher commented 2 years ago

Time serie show negative denoised sigma0 for ipf 2.9: image

Expected to see sigma0 positive and close to zero, and plot show values around -10

oarcher commented 2 years ago
xds = xsar.Sentinel1Dataset(
  'SENTINEL1_DS:S1B_WV_SLC__1SSV_20180323T035038_20180323T042239_010153_012716_226F.SAFE:WV_093',  
)

image

The nesz is very high (around 10). its should be less than sigma0, ie in the (0,0.4) range.

oarcher commented 2 years ago

opening the safe with luts=True give the noise_lut_range and sigma0_lut variables:

xds = xsar.Sentinel1Dataset(
  'SENTINEL1_DS:S1B_WV_SLC__1SSV_20180323T035038_20180323T042239_010153_012716_226F.SAFE:WV_093',  
  luts=True
)

the nesz is computed as following:

nesz = ds['noise_lut_range'] / ds['sigma0_lut'] ** 2

image

sigma0_lut have the same scale as digital_number, so the problem doesn't seems related to this variable.

but noise_lut_range seems to be very high (~2.5e7).
By checking the xpath (/noise/noiseRangeVectorList/noiseRangeVector/noiseRangeLut) and the xml file, those high values are correctly read from the xml file:

<noiseRangeLut count="138">2.718655e+07 2.702579e+07 2.686711e+07 2.671050e+07 2.655590e+07 2.640882e+07 
...
2.530819e+07 2.542972e+07 2.555228e+07 2.564490e+07</noiseRangeLut>

by opening a different SAFE with ipf != 2.9 (here S1B_WV_SLC__1SSV_20210620T154907_20210620T162503_027442_0346FE_262C.SAFE with ipf=3.31, we can check that the values are not of the same order (~3.5e3):

<noiseRangeLut count="143">3.338909e+03 3.318059e+03 3.298250e+03 3.278777e+03 3.259556e+03 3.240583e+03 
...
3.166130e+03</noiseRangeLut>

So, before going further, we have to check with MPC that there is no problems with noiseRangeLut in the xml file. Can you try to get some infos about that @agrouaze ?

agrouaze commented 2 years ago

MPC Sentinel-1 group proposed this patch in 2020: nesz_corrected = nesz / noise_calibration_cst_pp1

noise_calibration_cst_pp1 = {'S1A':
                                 {'wv1':{'EAPold':38.13,'EAPnew':38.13},
                                  'wv2':{'EAPold':36.84,'EAPnew':36.84} 
                                },
                             'S1B':
                                 {'wv1' : {'EAPold' : 39.30,'EAPnew' : 39.30},
                                  'wv2' : {'EAPold' : 37.44,'EAPnew' :37.44} 
                             } 
                             } 

see ticket https://jira-projects.cls.fr/browse/MPCS-2007

oarcher commented 2 years ago

closed by #64 . Noise is patched by default, and can be disabled with patch_variable=False from Sentinel1Dataset.