pro analresp ; Read in the calibration file data nfile=9 calname=strarr(9) calname(0)='/users/bashar/calibration/data/cb_1223a.cal' calname(1)='/users/bashar/calibration/data/cb_1223b.cal' calname(2)='/users/bashar/calibration/data/cb_1223c.cal' calname(3)='/users/bashar/calibration/data/cb_1223d.cal' calname(4)='/users/bashar/calibration/data/cb_1223e.cal' calname(5)='/users/bashar/calibration/data/cb_1223f.cal' calname(6)='/users/bashar/calibration/data/cb_1223g.cal' calname(7)='/users/bashar/calibration/data/cb_1223h.cal' calname(8)='/users/bashar/calibration/data/cb_1223i.cal' nlines=lonarr(100) header='string' dm37='string' rec=fltarr(nfile,2500) wvl=fltarr(nfile,2500) sisig=fltarr(nfile,2500) gesig=fltarr(nfile,2500) filter=fltarr(nfile,2500) gain=fltarr(nfile,2500) respt=fltarr(nfile,2500) grat=fltarr(nfile,2500) turr=fltarr(nfile,2500) sphsisig=fltarr(nfile,2500) sphfltsisig=fltarr(nfile,2500) sphingaassig=fltarr(nfile,2500) sphdtemp=fltarr(nfile,2500) collsisig=fltarr(nfile,2500) collfltsisig=fltarr(nfile,2500) collingaas=fltarr(nfile,2500) colltemp=fltarr(nfile,2500) beamsisig=fltarr(nfile,2500) sslingaassig=fltarr(nfile,2500) beamtemp=fltarr(nfile,2500) lampcurr=fltarr(nfile,2500) d1sig=fltarr(nfile,2500) d2sig=fltarr(nfile,2500) d3sig=fltarr(nfile,2500) gastemp=fltarr(nfile,2500) ambtemp=fltarr(nfile,2500) sphtemp=fltarr(nfile,2500) boxtemp=fltarr(nfile,2500) chambtemp=fltarr(nfile,2500) cldstrptemp=fltarr(nfile,2500) relhum=fltarr(nfile,2500) t1temp=fltarr(nfile,2500) elev=fltarr(nfile,2500) azi=fltarr(nfile,2500) pol=fltarr(nfile,2500) shtr=fltarr(nfile,2500) timecomm=strarr(nfile,2500) for j=0,8 do begin print,'j = ',j lun=j+1 openr,lun,calname(j) spawn,'wc -l '+calname(j),result reads,result,x nlines(j)=fix(x)-2 print,'Cal file contains ',nlines(j),' lines' readf,lun,header readf,lun,header for i=0,nlines(j)-1 do begin readf,lun,dm1,dm2,dm3,dm4,dm5,dm6,dm7,dm8,dm9,dm10,dm11,dm12,dm13,dm14,dm15,dm16,dm17,dm18,dm19,$ dm20,dm21,dm22,dm23,dm24,dm25,dm26,dm27,dm28,dm29,dm30,dm31,dm32,dm33,dm34,dm35,dm36,dm37 rec(j,i)=dm1 wvl(j,i)=dm2 sisig(j,i)=dm3 gesig(j,i)=dm4 filter(j,i)=dm5 gain(j,i)=dm6 respt(j,i)=dm7 grat(j,i)=dm8 turr(j,i)=dm9 sphsisig(j,i)=dm10 sphfltsisig(j,i)=dm11 sphingaassig(j,i)=dm12 sphdtemp(j,i)=dm13 collsisig(j,i)=dm14 collfltsisig(j,i)=dm15 collingaas(j,i)=dm16 colltemp(j,i)=dm17 beamsisig(j,i)=dm18 sslingaassig(j,i)=dm19 beamtemp(j,i)=dm20 lampcurr(j,i)=dm21 d1sig(j,i)=dm22 d2sig(j,i)=dm23 d3sig(j,i)=dm24 gastemp(j,i)=dm25 ambtemp(j,i)=dm26 sphtemp(j,i)=dm27 boxtemp(j,i)=dm28 chambtemp(j,i)=dm29 cldstrptemp(j,i)=dm30 relhum(j,i)=dm31 t1temp(j,i)=dm32 elev(j,i)=dm33 azi(j,i)=dm34 pol(j,i)=dm35 shtr(j,i)=dm36 timecomm(j,i)=dm37 endfor close,lun endfor lun1=12 lmpstd=fltarr(3,146) openr,lun1,'/users/bashar/calibration/abscal/std/lamp.std' for i=0,145 do begin readf,lun1,a,b,c lmpstd(0,i)=a lmpstd(1,i)=b lmpstd(2,i)=c endfor close,lun1 respname=strarr(9) respname(0)='/users/bashar/calibration/abscal/resp/Si_resp_5_5_3ap_abscal_dry_a.cal' respname(1)='/users/bashar/calibration/abscal/resp/Si_resp_5_5_5ap_abscal_dry_a.cal' respname(2)='/users/bashar/calibration/abscal/resp/Ge_resp_5_5_3ap_abscal_dry_a.cal' respname(3)='/users/bashar/calibration/abscal/resp/Si_resp_5_5_3ap_abscal_dry_b.cal' respname(4)='/users/bashar/calibration/abscal/resp/Si_resp_5_5_5ap_abscal_dry_b.cal' respname(5)='/users/bashar/calibration/abscal/resp/Ge_resp_5_5_3ap_abscal_dry_b.cal' respname(6)='/users/bashar/calibration/abscal/resp/Si_resp_2.5_5_2.5_abscal_dry_b.cal' respname(7)='/users/bashar/calibration/abscal/resp/Si_resp_1.25_5_1.25_abscal_dry_b.cal' respname(8)='/users/bashar/calibration/abscal/resp/Si_resp_2.5_5_2.5_abscal_dry_b.cal' stop ; for i=0,8 do begin ; lun=i+1 ; openw,lun,respname(i) ; for j=0, ; printf,lun,wvl(j) ; endfor return end