- edited description
Read "reflectance scale factor" field in hdr files
It would be very convenient that the Spectral Library would automatically apply the "reflectance scale factor" field in hdr file, if present. In this way, we could collect spectra from images with different scaling between DN and reflectance.
see https://www.l3harrisgeospatial.com/docs/ENVIHeaderFiles.html
Comments (12)
-
reporter -
I also thought about that. How would that play together with:
data gain values
,data offset values
,data reflectance gain values
, anddata reflectance offset values
? -
reporter I have never seen those actually used, instead the reflectance scale factor is very common. Perhaps you might implement
as they are requested? I can also do a bit of googling on these terms and see what I find. Somehow I recall something like that for Hyperion imagery.
-
For me it is the opposite. I wasn’t aware of the reflectance scale factor, while having seen the data gain/offset values from time to time.
-
But I’m not so sure about using the reflectance scale factor, because ENVI isn’t using it either it looks like:
Any idea why that is? Am I doing something wrong in ENVI?
-
reporter Maybe you have to re-read the file? Note this field would get written to the hdr as Reflectance Scale Factor = 10000.000
I have no envi to test…
-
I set the value outside and opened the file afterwards in ENVI. I’m quite sure ENVI isn’t using the scale factor.
With that in mind: it’s quite correct behaviour that GDAL/QGIS also isn’t applying the scale factor right away, i guess.
Having said that. There is an easy way to scale your data via the new Band Properties widget:
-
Sorry, in QGIS/GDAL the scale factor would be 1/10000 = 1e-4 and not 10000.
-
directly found an error
https://bitbucket.org/hu-geomatics/enmap-box/issues/940/wrong-offset-after-setting-band-scale -
- changed milestone to 3.10 (Feature)
- removed component
-
assigned issue to
-
When selecting an ENVI source, the “reflectance scale factor” from the ENVI header can be set as band scale.
Note that GDAL Band Scale = 1 / ENVI Reflectance Scale Factor.
-
- changed status to resolved
resolves
#938→ <<cset e65184589911>>
- Log in to comment