PRO calsplot,calsfile,camnum,med,mn,sd ; Program to read, process, and plot 94-95 calibration summary data. ; Be nice. IF N_Params() LT 2 THEN BEGIN Print,"Usage: CalsPlot, calsfile, camnum, median, mean, stdev" Return ENDIF @isitdos syms=[1,2,4,5,6] ; avoid PSym=3 => dot lines=IndGen(5)+1 data=QGetFile(calsfile) n=N_Elements(data) jdate=LonArr(n) onedate='' cals=FltArr(5,n) onecal=FltArr(5) gap=StrPos(data(0),' ') form='(A6,'+StrTrim(gap-5,2)+'X,5F6.1)' FOR i=0,n-1 DO BEGIN ReadS,data(i),onedate,onecal,Format=form ChopDate,onedate,yy,mm,dd jdate(i)=JulDay(mm,dd,yy) IF i EQ 0 THEN yr=yy IF i EQ n-1 THEN yr=[yr,yy] cals(*,i)=onecal ENDFOR jstart=JulDay(10,1,yr(0)) jend=JulDay(3,31,yr(1)) jnorm=JulDay(1,1,yr(0))-1 Plot,jdate-jnorm,cals(0,*),PSym=syms(0) $ ,XRange=[jstart,jend]-jnorm,XStyle=1,XTitle='Day of Year' $ ,YRange=[0,200],YTitle='Sensitivity!e-1!n (R-s/DN)' $ ,Title='Camera '+StrTrim(camnum,2)+' Calibrations, ' $ +jd2date(jdate(0),Form='d$ n$ y$')+' - ' $ +jd2date(jdate(n-1),Form='d$ n$ y$') FOR i=1,4 DO OPlot,jdate-jnorm,cals(i,*),PSym=syms(i) FOR j=0,n-1 DO XYOutS,jdate(j)-jnorm,5 $ ,jd2date(jdate(j),Form='d$-n$-y$') $ ,Alignment=0,Orientation=90 mn=FltArr(5) sd=mn med=mn label=StrArr(5) FOR i=0,4 DO BEGIN sd(i)=StDev(cals(i,*),m) mn(i)=m med(i)=Median(cals(i,*)) Plots,[jstart,jend]-jnorm,[med(i),med(i)],LineStyle=i+1 label(i)=String(i,med(i),filters(5*camnum+i) $ ,Format='(I3,F6.1," R-s/DN ",A)') ENDFOR xdvpos=!P.CLIP(0) ydvpos=!P.CLIP(3) npos=CONVERT_COORD([xdvpos,ydvpos],/DEVICE,/TO_NORMAL) npos=npos(0:1) legend,label,linestyle=lines,psym=syms,position=npos timestmp Return END