Read Landsat8 product in radiance

Hi,
I downloaded Landsat 8, collection-2, level-2, tier-1 images from USGS. I need to work with radiance values but when I open landsat-8 product in snap the values are autoamtically converted to reflectance. Is there any way to read Landsat 8 product in radiance?
Thx

As far as I know Level-2 is only provided as surface reflectances. If you want to use radiances, you must use the Level-1 data. Here you can select between TOA radiance and TOA reflectance by a certain setting.

1 Like

Sorry, my mistake. It is not about radiance/reflectance. It is about the scale factor which is applied on Landsat-8 images by SNAP.
If I open Landsat-8 image in SNAP as a product, pixel values are recalculated using scale factor (px * 0.0000275 + (-0.2)). If I open just one band (*.tif file) from landsat 8, scale factor is not applicated. My question is, if it is possible to open Landsat-8 product in SNAP without scale factor applied.
The second question is, why there is spatial shift between images when I open Landsat-8 as a product and as a separate band. See image below.

Thank you

The shift results from inconsistent information in the Landsat product.
In the MTL files the coordinate of the upper left centre pixel is given.
For my example the UTM coordinates are: x= 230700.0 y=915600.0
This is shown in SNAP when you open the product with the MTL file.
So. I would considere this as correct.

In the GeoTiff files different values are provided: x=230685.0; y=915615.0;
This should also reference the centre according to the metadata in the GeoTiff.
But it is the value for the actual upper-left corner. The difference is half a pixel.
We can’t correct this as this is an error in the data.

Regarding the reflectance values. You can disable the conversion. But you can access the raw values. via the Band Maths.
To get the raw value you can use the expression: sr_b1.raw
This can be used to create copies of the bands which contain the digital numbers.
But I wonder why you want to use the raw values. What’s your use case?

Thank you for explanation. We are using external classification algorithm. We implemented it to snap as a plugin. From our project partner we received trained class files for this algorithm for different clasification scenarious. These class files was trained using images without scale factor implemented.

1 Like

From the API you have other means.
You can use RasterDataNode.scaleInverse(value) to convert a geophysical value back to the raw value.
You can use Band.getRasterData().getElemInt(index) - this is can be memory demanding.
Alternatively, you can retrieve the source image, by Band.
Or if you have implemented an Operator, you can call in the computeTile(…) implementation the
getSourceTile(…) method and on the returned tile call getSourceTile().getRawSamples(). This will return the raw values for this tile as ProductData.

1 Like

Thank you, i will try it.