pro plot_dp_clock, index
;
;
;
if (!d.name eq 'X') then window,0,ysiz=850
;
;laser, /portrait
laser	;, /portrait
;
!p.charsize = 2
!p.multi = [0,1,6]
!psym = 10
;
y = index.dp_time(0)	& plot, y, title='TIMER1', yrange = [min(y), max(y)+1]
y = index.dp_time(1)	& plot, y, title='TIMER2', yrange = [min(y), max(y)]
y = index.dp_time(2)	& plot, y, title='TIMER3', yrange = [min(y), max(y)]
y = index.dp_time(3)	& plot, y, title='FI',     yrange = [min(y), max(y)]
dd=index.dp_time(0)*long(256*256.)+index.dp_time(1)*long(256)+index.dp_time(2)
;
sfb = btest0(index.dp_time(2),7)
sfe = btest0(index.dp_time(1),2)
sfg = btest0(index.dp_time(1),4)
;y = sfb or sfe or sfg	& plot, sfb, yrange=[0,6], title='SF2' & oplot,sfe+2 & oplot,sfg+4
y = index.dp_rate	& plot, y, title='DP_RATE'
;
timarr = (index.day - index(0).day)*86400 + (index.time-index(0).time)/1000
plot, timarr, title = 'Seconds from ' + fmt_tim(index(0))
;
pause
plot, index.dp_rate
plot, mask(dd,7-2,3)
plot, mask(dd,10-2,3)
plot, mask(dd,12-2,3)
plot, index.dp_time(3)
plot, index.dp_rate

;
end
