Hi Martin,
By DOS, I assume you are referring to dark object subtraction? If so, then you would definitely have to build a batch program in order to process a large number of scenes. Doing so is not trivial, though--especially if you want to end up with bands 1-7 in the same file and you want the background value to be constant across all bands. The program would likely involve the following steps:
- Perform DOS on all bands
- Retrieve calibration parameters for each band (from the web using ENVI_L7_CPF, if necessary)
- Call TMCAL_DOIT to calibrate each band individually
- Build a mask for each band that highlights valid pixels and supresses background pixels
- Apply the masks to each band, setting the masked values to something constant ('NaN' or maybe 0.0)
- Call ENVI_LAYER_STACKING_DOIT to bring all bands back together into a single file
- Call ENVI_FILE_MNG to remove and delete all intermediary files (single band calibration and masking results).
I've built programs like this before, but it takes time to set them up. Depending on how many scenes you have to process, the manual route might be faster. I usually build in an additional step that multiplies the floating point TOA reflectance output by 255 and then converts the result back to byte prior to storage in a new layer stacked output file, via a custom tiled processing routine. Since the dynamic range of Landsat is 0-255, it makes sense to stuff the reflectance back into that range since the shape of the spectral curve for each pixel is more important than the absolute DN values associated with it. A side benefit is an output file that is one quarter the size of what it would otherwise. I don't have a sample program that I can post here, unfortunately.
|