; MAKFFIMG.PRO ; FOR c=0,1 DO BEGIN cc=STRTRIM(c,2) darkpath='\images\dark\cam'+cc+'\d19*.*' PRINT,'Doing statistics on '+darkpath meanvar,darkpath,nd,md,vd FOR f=0,4 DO BEGIN fc=STRTRIM(f,2) ffpath='\images\flat\cam'+cc+'\filt'+fc+'\f19*.*' PRINT,'Doing statistics on '+ffpath meanvar,ffpath,n,m,v,/norm,dark=md ffimg=(REPLICATE(FLOAT(MAX(m)),256,256)/m)<2.55 bffimg=BYTE(100*ffimg) outpath='\IMAGES\FLAT\FFIMG_'+cc+fc+'.DAT' OPENW,out,outpath,/GET_LUN WRITEU,out,bffimg CLOSE,out & FREE_LUN,out PRINT,'Saved '+outpath ENDFOR ENDFOR END