Introduction - If you have any usage issues, please Google them yourself
NDVI=ENVI_GET_DATA(fid=fid,dims=dims,pos=0)
ind = where(NDVI eq -10)
FOR i=1,numTim-1 DO BEGIN
FTest_temp = file_test(infiles[i])
if (FTest_temp ne 0 ) then begin
print,infiles[i]
ENVI_OPEN_FILE,infiles[i],r_fid=tmpfid
ENVI_FILE_QUERY,tmpfid,dims = tmpdims, nb = nb,ns= ns,nl=nl
NDVI_temp=ENVI_GET_DATA(fid=tmpfid,dims = tmpdims,pos=0)