pro rdsacpeak,wls,wlf,wf,inten,ierr ierr=0 wmin=3800 wmax=6999 w1=fix(wls*10) w2=fix(wlf*10) if(w1 lt wmin or w1 gt wmax) then goto,ERRSTAT if(w2 lt wmin or w2 gt wmax) then goto,ERRSTAT openr,1,'atlas_sacpeak' del=double(.0005) itmp=intarr(203) nskip=long(w1-wmin) if(nskip eq 0) then goto, SKIP for i=1,nskip do begin readu,1,itmp endfor SKIP: nrd=long(w2-w1) wf=dblarr(200*nrd) inten=fltarr(200*nrd) ns=0 for i=1,nrd do begin readu,1,itmp wtmp=double(itmp(0)*.1) for j=0,199 do begin wf(ns)=wtmp inten(ns)=float(itmp(3+j))*.001 ; print,wf(ns),inten(ns) wtmp=wtmp+del ns=ns+1 endfor endfor close,1 return ERRSTAT: print,'**WAVELENGTH ERROR**' print,'--------------------' print,' AVAILABLE WAVELENGTHS= 380.0 - 699.9' print,' INPUT WAVELENGTHS=',wls,' - ',wlf ierr=-1 end