- Timestamp:
- 08/26/15 07:50:55 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/trigger_burst_research/plot_basic_ratescan_info.py
r18300 r18301 1 1 import sys 2 2 import numpy as np 3 import matplotlib as mpl 4 mpl.use('Agg') 3 5 import matplotlib.pyplot as plt 4 6 import pandas as pd … … 12 14 13 15 runs = pd.DataFrame.from_csv( 14 ' foo.bar',16 '../foo.bar', 15 17 infer_datetime_format=True, 16 18 parse_dates=['fRunStart', 'fRunStop'] … … 19 21 runs = runs.loc[runs.fNight==night_int] 20 22 21 trigger_rates = get_trigger_rates(night_int) 23 trigger_rates = get_trigger_rates(night_int, 24 base_path='../other_aux_data/') 22 25 23 fig, ax1 = plt.subplots(figsize=(16, 12))26 fig, ax1 = plt.subplots(figsize=(16, 9)) 24 27 ax1.set_xlabel("Time") 25 28 ax1.set_yscale('log') … … 32 35 trigger_rates['Time']+OFFSET, 33 36 np.median(trigger_rates['BoardRate'], axis=1), 34 'r.', 37 'r.', ms=4., 35 38 label="median BoardRate" 36 39 ) … … 39 42 trigger_rates['Time']+OFFSET, 40 43 trigger_rates['TriggerRate'], 41 'g.', 44 'g.', ms=4., 42 45 label="Camera TriggerRate" 43 46 ) … … 56 59 horizontalalignment='center', 57 60 verticalalignment='center', 61 fontsize=7, 58 62 ) 59 63 … … 72 76 fjd(runs.iloc[-1]['fRunStop'])+OFFSET 73 77 )) 78 plt.ylim(1e-1, 1e6) 74 79 75 80 plt.legend( 76 81 handles=[plot_0[0], plot_1[0]], 77 82 loc='lower left') 78 plt.savefig("board_rate_overview_"+night_string+'.png', dpi=300) 79 #plt.figure() 80 #plt.title("fHighBoardTriggerRateRatio distribution from {0}".format(night_int)) 81 #plt.hist(ratio, bins=np.linspace(0,0.3,16), log=True ) 82 #plt.grid() 83 #plt.xlabel("fHighBoardTriggerRateRatio") 83 84 plt.tight_layout() 85 plt.savefig("board_rate_overview_"+night_string+'.png', 86 dpi=300) 87 88 plt.figure() 89 plt.title("fHighBoardTriggerRateRatio distribution from {0}".format(night_int)) 90 plt.hist(runs.fBoardTriggerRateRatioAboveThreshold.values, 91 bins=np.arange(0,0.6,1./60.), 92 log=True ) 93 plt.grid() 94 plt.xlabel("fHighBoardTriggerRateRatio") 95 plt.savefig("ratio_dist_"+night_string+'.png')
Note:
See TracChangeset
for help on using the changeset viewer.