PRO shglow,year,month,day date=STRING(year MOD 100,month,day,FORMAT='(3I2.2)') ilist=STRARR(2) ilist(0)='/jasper/cnsr3_data1/ilist/'+date+'.0.ilist' ilist(1)='/jasper/cnsr3_data1/ilist/'+date+'.1.ilist' iname=STRARR(300,2) itime=FLTARR(300,2) inum=INTARR(2) s='' t=1.0 PRINT,'Getting image file names...' FOR i=0,1 DO BEGIN OPENR,unit,ilist(i),/GET_LUN nimages=0 REPEAT BEGIN READF,unit,t,s itime(nimages,i)=t iname(nimages,i)=STRTRIM(s,2) nimages=nimages+1 ENDREP UNTIL EOF(unit) inum(i)=nimages ENDFOR n=MAX(inum) iname=iname(0:n-1,*) itime=itime(0:n-1,*) WINDOW,0,XSIZE=1280,YSIZE=600 loadct,13 PRINT,'Getting image files...' FOR j=0,n-1 DO BEGIN FOR i=0,1 DO BEGIN rdkimg,iname(0,j,i),hb,ohim rdkimg,iname(1,j,i),hb,bgim rdkimg,iname(2,j,i),hb,ohdk rdkimg,iname(3,j,i),hb,bgdk ohim=MEDIAN(REBIN(ohim,128,128),3) ohdk=MEDIAN(REBIN(ohdk,128,128),3) ohsets(i*128,0,j)=(ohim-ohdk)>0 bgim=MEDIAN(REBIN(bgim,128,128),3) bgdk=MEDIAN(REBIN(bgdk,128,128),3) bgsets(i*128,0,j)=(bgim-bgdk)>0 ENDFOR PRINT,j,FORMAT='(I3,$)' ENDFOR STOP ;ohsets=BYTE(ohsets<255) PRINT,'Getting ready to show a movie...' !ORDER=1 resp='' REPEAT BEGIN PRINT,'Enter background subtraction factors' READ,f movie2,BYTE(((ohsets(0:127,*,*)-f(0)*bgsets(0:127,*,*))>0)<255) $ ,BYTE(((ohsets(128:255,*,*)-f(1)*bgsets(128:255,*,*))>0)<255),2 PRINT,'Try other factors? (Y/[N])' READ,resp ENDREP UNTIL STRUPCASE(resp) NE 'Y' RETURN END