NasjonaltBakkeSegment / safe_to_netcdf

Python scripts for converting specific Copernicus Sentinel products in Standard Archive Format for Europe (SAFE) to NetCDF/CF
GNU General Public License v3.0
6 stars 5 forks source link

Issue5 fix s1 resample #7

Closed ElodieFZ closed 3 years ago

ElodieFZ commented 3 years ago

Fix for #5

The issue is that sometimes the lines and pixels are not monotonous. This case is not handled by the Scipy function interpolate.RectBivariateSpline. So for these cases (caught with a ValueError exception), a more robust Scipy function is used: interpolate.interp2d.

The more robust function is only used for those cases as it is much more costly than the one already in use.

I have checked on the two S1 reference products (IW and EW) that the results from both functions are very close. I have not checked why sometimes the input data is not monotonous.