Line | |
---|
1 | #!/usr/bin/python -tti
|
---|
2 | import sys
|
---|
3 | from pyfact import SlowData
|
---|
4 | from pylab import *
|
---|
5 |
|
---|
6 | from datetime import date
|
---|
7 | d0 = date(1970,01,01)
|
---|
8 | d1 = date(2001,01,01)
|
---|
9 | delta = d1-d0
|
---|
10 | days_offset = delta.days
|
---|
11 | del d0,d1,delta
|
---|
12 |
|
---|
13 | plt.ion()
|
---|
14 |
|
---|
15 | if len(sys.argv) < 3:
|
---|
16 | ftm_static = '20120924.FTM_CONTROL_STATIC_DATA.fits'
|
---|
17 | ftm_rates = '20120924.FTM_CONTROL_TRIGGER_RATES.fits'
|
---|
18 |
|
---|
19 | else:
|
---|
20 | ftm_static = sys.argv[1]
|
---|
21 | ftm_rates = sys.argv[2]
|
---|
22 |
|
---|
23 | f1 = SlowData(ftm_static)
|
---|
24 | f2 = SlowData(ftm_rates)
|
---|
25 |
|
---|
26 | f1.register('all')
|
---|
27 | f2.register('all')
|
---|
28 | f1.stack()
|
---|
29 | f2.stack()
|
---|
30 | print "reading", ftm_static
|
---|
31 | for i in f1:
|
---|
32 | pass
|
---|
33 | print "reading", ftm_rates
|
---|
34 | for i in f2:
|
---|
35 | pass
|
---|
36 |
|
---|
37 |
|
---|
38 | c = f1.stacked_cols
|
---|
39 | t = c['Time']-days_offset
|
---|
40 |
|
---|
41 | thr = c['PatchThresh']
|
---|
42 |
|
---|
43 | thrm = thr.mean(axis=1)
|
---|
44 |
|
---|
45 | scale = 50.
|
---|
46 | plt.plot_date( t, thrm/scale, '.:', label='Patch THR mean ('+str(scale)+'DAC counts)')
|
---|
47 |
|
---|
48 | t2 = f2.stacked_cols['Time']-days_offset
|
---|
49 | log_rates = np.log10(f2.stacked_cols['TriggerRate'])
|
---|
50 |
|
---|
51 | plt.plot_date( t2, log_rates, '+', label = 'log(Rate/Hz)')
|
---|
52 | plt.legend()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.