I want to do a simple ratio of image(*, cols, rows) over spectral (*) using ENVI. I have a IDL code as below, but it does not work through band math function. Any help will be appreciated it.
function atmc, b1, s1
; do the ratio of image to atmos correction spectra
imgdim=size(b1,/dimensions)
cols=imgdim[1]
rows=imgdim[2]
for i = 0, rows -1 do begin
for m = 0, cols - 1 do begin
result = b1(*, m, i) / s1(*)
endfor
endfor
return, result
end
|