X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04 Apr 2014 07:23 AM by  anon
"ENVI_GET_DATA" not returning the number of bands that i specify
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
04 Apr 2014 07:23 AM
    ;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

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Apr 2014 07:49 AM
    The "ENVI_GET_DATA" routine only returns a single band. http://www.exelisvis.com/...s/ENVI_GET_DATA.html If you want more than one band, then construct a loop over the bands that you want, calling ENVI_GET_DATA in each loop. Cheers Josh

    Deleted User



    New Member


    Posts:
    New Member


    --
    07 Apr 2014 05:35 AM
    oh my gosh!! never knew that it would return only a single band; silly me...Thanks Josh Sixsmith..now i've been using envi spectral slice
    You are not authorized to post a reply.