关于ENVI/IDL 我写了一段idl的程序,计算msavi,可是运行时总是出错,哪位大侠能帮帮忙看看啊? 10
promsavi;FORWARD_FUNCTIONENVI_GET_DATAenvi,/restore_base_save_fileenvi_batch_init;fil...
pro msavi;FORWARD_FUNCTION ENVI_GET_DATAenvi,/restore_base_save_fileenvi_batch_init;file=dialog_pickfile()envi_open_file,file,r_fid=fidif fid eq -1 then begin void =dialog_message('file error!!',/error) envi_batch_exit returnend
envi_file_query,fid,dims=dims;数据类型 波段(one based, [IR, Red])------计算NDVI的波段;TM Bands= [4,3];MSS Bands = [7, 5];AVHRR Bands = [2, 1];SPOT XS Bands = [3, 2];AVIRIS Bands = [51, 29] pos = [4,3] - 1 out_name = 'testimg' b1=envi_get_data(fid=fid,dims=dims,pos=3)b2=envi_get_data(fid=fid,dims=dims,pos=4)exp=(2*b2+1-sqrt((2*b2+1)^2-8*(2*b2-b1)))/2envi_doit, 'math_doit', $ fid=fid, pos=pos, dims=dims, $ /check, o_min=0, o_max=255, $ out_name=out_name, r_fid=r_fid data=envi_get_data(fid = r_fid,dims=dims,pos=0) tvscl,data,/order;envi_batch_exitend
错误是这样的: 展开
envi_file_query,fid,dims=dims;数据类型 波段(one based, [IR, Red])------计算NDVI的波段;TM Bands= [4,3];MSS Bands = [7, 5];AVHRR Bands = [2, 1];SPOT XS Bands = [3, 2];AVIRIS Bands = [51, 29] pos = [4,3] - 1 out_name = 'testimg' b1=envi_get_data(fid=fid,dims=dims,pos=3)b2=envi_get_data(fid=fid,dims=dims,pos=4)exp=(2*b2+1-sqrt((2*b2+1)^2-8*(2*b2-b1)))/2envi_doit, 'math_doit', $ fid=fid, pos=pos, dims=dims, $ /check, o_min=0, o_max=255, $ out_name=out_name, r_fid=r_fid data=envi_get_data(fid = r_fid,dims=dims,pos=0) tvscl,data,/order;envi_batch_exitend
错误是这样的: 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询