How to run IDL procedure to perform Band Math on all band?

130 views Asked by At

I tried to work with images using IDL Band Math. The images have 90 bands and set variable pos=[0,1...90,],but only get one band(band1) into last.tiff

PRO bandmath
  compile_opt IDL2
  e = envi() 
  
  Path = FILE_DIRNAME(ROUTINE_FILEPATH())+PATH_SEP()
  print, Path
  radiance_file = FILEPATH('QUAC.dat', $
    root_dir=Path)
  raster = e.OpenRaster(radiance_file)
  print, raster
  fid = ENVIRasterToFID(raster)
  exp = '(b1 le 0)*0+(b1 gt 0)*(b1*0.0001)'
  ENVI_File_Query, fid, DIMS=dims, NB=nb
  pos = lindgen(nb)
  print, pos
  out_name = "last.tiff"
  ENVI_DOIT, 'MATH_DOIT', DIMS = dims, FID = fid, $
                          POS = pos, EXP = exp, OUT_NAME = out_name, R_FID = r_fid
END
1

There are 1 answers

0
timer On

you can find api named 'CF_DOIT' from envi claasic help