I'm trying to run TMCAL_DOIT to batch process a series of Landsat MSS images. ENVI seems to be able to process the image when the raster is opened using the old style metadata, but fails when using the new style metadata file. In the latest version of ENVI (5.0 SP2) I can use the Radiometric Correction tool and it works with the new style metadata, but I don't know what the ENVI+IDL function is that corresponds to the toolbox routine that works and I don't want to have to run the tool hundreds of times. Can someone help me figure out how to get TMCAL_DOIT to work with a new-style metadata file, or tell me what the updated function / procedure that corresponds with the ENVI Radiometric Correction tool in 5.0SP2?
Here's the code I'm using:
e = ENVI()
raster = e.OpenRaster('LM50810131984174AAA03_MTL.txt')
fid = ENVIRasterToFID(raster)
ENVI_FILE_QUERY, fid, dims=dims
ENVI_DOIT, 'TMCAL_DOIT', FID=fid, OUT_NAME='LM50810131984222AAA03.dat', $
DIMS=dims, POS=[0,1,2,3], CAL_TYPE=1, /USE_METADATA
|