Hi Mari. Thank you for your answer. I was able to do replace the values in question using pygdal. However, now I am running into a related issue. If I set the value for a specific band in a specific spatial pixel to either 'Nan' or to the data ignore value specified in the header, ENVI will then ignore that spatial pixel completely when I compute a mean spectrum over an ROI. How would I get around this? The idea is to be able to get useful mean spectra of a spatial region, not letting spurious values in a specific band of a specific spatial pixel affect the mean. However, the way it currently seems to be working, it throws out that entire pixel in the ROI calculations, which would essentially be the same as just removing that whole pixel using a mask.
|