Changeset 18301


Ignore:
Timestamp:
08/26/15 07:50:55 (9 years ago)
Author:
dneise
Message:
debugging
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/trigger_burst_research/plot_basic_ratescan_info.py

    r18300 r18301  
    11import sys
    22import numpy as np
     3import matplotlib as mpl
     4mpl.use('Agg')
    35import matplotlib.pyplot as plt
    46import pandas as pd
     
    1214
    1315runs = pd.DataFrame.from_csv(
    14     'foo.bar',
     16    '../foo.bar',
    1517    infer_datetime_format=True,
    1618    parse_dates=['fRunStart', 'fRunStop']
     
    1921runs = runs.loc[runs.fNight==night_int]
    2022
    21 trigger_rates = get_trigger_rates(night_int)
     23trigger_rates = get_trigger_rates(night_int,
     24    base_path='../other_aux_data/')
    2225
    23 fig, ax1 = plt.subplots(figsize=(16, 12))
     26fig, ax1 = plt.subplots(figsize=(16, 9))
    2427ax1.set_xlabel("Time")
    2528ax1.set_yscale('log')
     
    3235    trigger_rates['Time']+OFFSET,
    3336    np.median(trigger_rates['BoardRate'], axis=1),
    34     'r.',
     37    'r.', ms=4.,
    3538    label="median BoardRate"
    3639    )
     
    3942    trigger_rates['Time']+OFFSET,
    4043    trigger_rates['TriggerRate'],
    41     'g.',
     44    'g.', ms=4.,
    4245    label="Camera TriggerRate"
    4346    )
     
    5659        horizontalalignment='center',
    5760        verticalalignment='center',
     61        fontsize=7,
    5862        )
    5963
     
    7276    fjd(runs.iloc[-1]['fRunStop'])+OFFSET
    7377    ))
     78plt.ylim(1e-1, 1e6)
    7479
    7580plt.legend(
    7681    handles=[plot_0[0], plot_1[0]],
    7782    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
     84plt.tight_layout()
     85plt.savefig("board_rate_overview_"+night_string+'.png',
     86    dpi=300)
     87
     88plt.figure()
     89plt.title("fHighBoardTriggerRateRatio distribution from {0}".format(night_int))
     90plt.hist(runs.fBoardTriggerRateRatioAboveThreshold.values,
     91    bins=np.arange(0,0.6,1./60.),
     92    log=True )
     93plt.grid()
     94plt.xlabel("fHighBoardTriggerRateRatio")
     95plt.savefig("ratio_dist_"+night_string+'.png')
Note: See TracChangeset for help on using the changeset viewer.