But If you divide by 10000 to obtain reflectance I will obtain reflectnace values like 1.2 or 2.3, not in the 0 to 1 range. This is because pixel values are from 0 to 32674 or more.
Isn’t it
I guess you saved you product as 16 bit integer Geotiff at a previous step. Better leave it in the BEAM DIMAP format, because it preserves the original values.
You can try data conversion to Float, but without histogram stretching.
But I would not save as GeoTiff unless needed. Conversion to GeoTIFF causes loss of all metadata information which is required for many processing steps.
Thanks Marco and Andreas, but I’m interested too in how to transform reflectante scaled TOA values in L1C product in reflectante 0 to 1 TOA values. I mean do it by myself with a raster calulator.
And after this calculate radiance … and then the DN.
I’m trying to get back step by step from reflectance scaled TOA values to DN, and do it all with a raster calculator beginning with the jp2 file downloaded from any band.
reflectance scaled TOA values -> 2. reflectance 0 to 1 TOA values -> 3. radiance values -> 4. digital number
And I don’t know how transform 1. in to 2. (is not as simple as divide by 10000 because the new values will not be 0 to 1 range, isn’t?
The main reason to do all of this “manually” is because we have test calculate NDVI values after using sen2cor corrections and give us very extreme values (-0.999 to 0.999) we don’t think are normal/logic values.
So I prefer to go at the beginning, and review all rasters one by one, aboveall radiance in order to do atmosferic corrections.
Actually the original L1C values are between 0 and 1.0, except some very saturated pixels. These values might go up to 1.2. And if you want to get the DN values you should not convert to radiances. Start directly from the reflectances.