Reading and analysing SLSTR L1 data using snappy

I’m trying to read some of the SLSTR data produced by the test processor using snappy and I wondered whether anyone could help with the following questions:

I know there are several available product readers (in the SNAP GUI, I can choose 1km resolution or 500m resolution) but how do I know what the names of the available readers are in snappy? i.e. I don’t know how to find the legal values for readerString in the following:

product = snappy.ProductIO.readProduct(filename, readerString)

Once I’ve read in the L1 dataset, I would like to use the Analysis tools to (e.g.) make a profile plot across the image of one of the bands, make histograms etc. Are there any examples to show how to do this? Maybe I’ve missed them, but I can’t see anything in the examples directory. I might be able to work it out if someone can point me to the names of some relevant classes in the API?


The two format names are:

  • Sen3_SLSTRL1B_1km
  • Sen3_SLSTRL1B_500m
    There is one way to find the format name. Open the product in SNAP Desktop. Then go the Analysis/Information in the menu. There you find the row Product format:. This is the format name you can use in your code.

For doing such plots and charts, as you describe, we don’t have an API. It is only implemented in the GUI.


This works:
file = snappy.File(fileNameString)
product = snappy.ProductIO.readProduct(file, ‘Sen3_SLSTRL1B_1km’)

But then I’m trying to verify afterwards that it used the correct reader:

print product.getName()
print product.getProductReader().getReaderPlugIn()

Both of those seem to indicate that the 500m reader was used and not the 1km one:


Is there something wrong in my syntax, or in the way I’m trying to check what reader was used?

OK, for the analysis plots and charts, thats good to know - I need to write my own methods in Python then.


I notice the same. It seems that ProductIO.readProduct always prefers the 500m resolution reader. Don’t know why but I found a work.
First retrieving the reader:
reader1000 = snappy.ProductIO.getProductReader('Sen3_SLSTRL1B_1km')
And afterwards read the file
product1000 = reader1000.readProductNodes(file, None)

I’ve created an issue for this.

Thanks for your report