;Though the POS keyword is input with an array of more than 1 band ; the output "data" array receives only 1 band. Hoping for a few suggestions!
fname = 'E:\puneeth_CONTD\hyperion\subsetdata\iarr & logres subset\lower_vajr_IARR'
envi_open_file, fname,r_fid=fid
if (fid eq -1) then return ; return ifthe file is invalid
envi_file_query, fid,dims=dims, nb=nb
a= CALL_FUNCTION('wavelength_selector', nb); wavelength range "I'm interested in band 124 to 157"
b=a-1
a=indgen(NB)
a=a[b[0]:b[1]]
data = ENVI_GET_DATA(DIMS=dims,FID=fid , INTERP= 0, POS=a) ; here the POS keyword is input with a big array; in spite of it the array named data is receiving just one band .
DELVAR,b
end
FUNCTIONwavelength_selector,NB
base = widget_auto_base(title='SPECTRAL RANGESELECTOR')
list = ['FROM BAND NUMBER: ','TO BANDNUMBER : ']
vals = [1,50]
we = widget_edit(base,ceil=NB,floor=1,/frame, uvalue='user_value', list=list,vals=vals, /auto)
result = auto_wid_mng(base)
return,result.user_value
END
|