Pixel Extraction method for SEN3 - different coordinates

Hi there,

I am doing some validation of Sentinel-3 OLCI data (A/B). What I’ve noticed is in each Pixel Extraction output (I extract every parameter possible in a SEN3 folder), the headers are [‘ProdID’, ‘CoordID’, ‘Name’, ‘Latitude’, ‘Longitude’, ‘PixelX’, ‘PixelY’, etc.]. Name referring to the name of my input ‘extraction points’, and the respective Latitude and Longitude of those points. The Latitude and Longitude change with every satellite image file, so I should expect that these coordinates reflect actually, the pixel that is closest to the input coordinates. I also cross checked with original input coordinates and they are indeed not exactly the same, but very similar values.

Curiously, however, as SEN3 files also have coordinates in the geo_coordinates.nc file, these are extracted too, under lowercase ‘latitude’ and ‘longitude’. Although very similar, they are not the exact same values as from ‘Latitude’ and ‘Longitude’ (next to the name of the input ‘extraction points’ so to speak).

My question: Is there a source code somewhere I can find about the pixel extraction tool, or some documentation? And if the Latitude and Longitude parameters indeed reflect the pixel coordinates of the pixel closest to the input coordinates, why is it then different from the extracted pixel coordinates of the geo_coordinates.nc file? Should it not be the same? If not, where is the difference coming from and why?

See PixEx source in github. How large are the differences you see (e.g., compared to the size of pixels)?

I’ve just starting the extraction procedure for comparison of the methods, I will post the results when it is ready. In the mean time, this is the python method I use for getting the pixel values:

euclid_dist = numpy.sqrt( (sen3.longitude - pix_lon)**2 + (sen3.latitude - pix_lat)**2 )
min_dist = euclid_dist.argmin()

x_i, y_i = numpy.unravel_index(min_dist, sen3.longitude.shape)

Where sen3 is a netcdf file and longitude/latitude are the respective coordinate arrays (in 2D). pix_lat/pix_lon are the coordinates I want to extract values from. In earlier analysis, the differences weren’t too big between the SNAP PixEx and python method and were more or less on a 1:1 line, but I am now curious if the difference might be larger in coastal/turbid areas, like the Dutch North Sea, since the variations can often be quite large in such areas. I will post the updated results once I have them!