PRINT,'Enter camera and filter numbers' READ,cam,filt mea=FLTARR(256,256,25) & var=mea if cam EQ 0 then day=7 ELSE day=9 file=STRING(day,cam,filt,FORM='("/jasper/cnsr3_data1/linearity/l",I2.2,2I1)') fl=findfile(file+'*.varc',count=nfl) FOR i=0,nfl-1 DO var(*,*,i)=imin(fl(i),256,/longs) fl=findfile(file+'*.mean',count=nfl) FOR i=0,nfl-1 DO mea(*,*,i)=imin(fl(i),256,/longs) mm=FLTARR(nfl) & vm=mm FOR i=0,nfl-1 DO mm(i)=TOTAL(mea(120:130,25:35,i))/N_ELEMENTS(mea(120:130,25:35,i)) FOR i=0,nfl-1 DO vm(i)=TOTAL(var(120:130,25:35,i))/N_ELEMENTS(var(120:130,25:35,i)) IF cam EQ 0 THEN BEGIN svm=[vm(0:20),vm(22:23)] smm=[mm(0:20),mm(22:23)] yf=1 m=2 fit=svdfit(smm(10:22),svm(10:22),m,yfit=yf) yf2=1 fit2=svdfit(smm(0:8),svm(0:8),m,yfit=yf2) plot,smm,svm oplot,smm(10:22),yf,linestyle=1 oplot,smm(0:8),yf2,linestyle=1 ENDIF END