Esempio n. 1
0
        scope_fall_vs_ipw.SetPoint(i,ipw[i],fall_time)
        scope_width_vs_photon.SetPoint(i,photon,width_time)
        scope_width_vs_ipw.SetPoint(i,ipw[i],width_time)

        #now, the values from the graphs directly
        waveform_name = os.path.join(dirname,"Chan%02d_Width%05d"%(logical_channel,ipw[i]))
        if not os.path.exists("%s.pkl"%waveform_name):
            print "SKIPPING",waveform_name
            continue
        waveform = utils.PickleFile(waveform_name,1)
        waveform.load()
        wave_times = waveform.get_meta_data("timeform_1")
        wave_volts = waveform.get_data(1)[0]
        w_area = waveform_tools.integrate(wave_times,wave_volts)
        w_photon = get_photons(w_area,voltage)
        w_rise = waveform_tools.get_rise(wave_times,wave_volts,voltage)
        w_fall = waveform_tools.get_fall(wave_times,wave_volts,voltage)
        w_width = waveform_tools.get_width(wave_times,wave_volts,voltage)

        calc_photon_vs_pin.SetPoint(ctr,pin[i],w_photon)
        calc_photon_vs_ipw.SetPoint(ctr,ipw[i],w_photon)
        calc_rise_vs_photon.SetPoint(ctr,w_photon,w_rise)
        calc_rise_vs_ipw.SetPoint(ctr,ipw[i],w_rise)
        calc_fall_vs_photon.SetPoint(ctr,w_photon,w_fall)
        calc_fall_vs_ipw.SetPoint(ctr,ipw[i],w_fall)
        calc_width_vs_photon.SetPoint(ctr,w_photon,w_width)
        calc_width_vs_ipw.SetPoint(ctr,ipw[i],w_width)

        ctr+=1

    #Remove any bad scope values
Esempio n. 2
0
        raw_input("wait:")

        baseline = waveform_tools.get_baseline(wave_times, wave_volts,
                                               baseline_low, baseline_high)

        # Compute the area, rise, fall and width *using the baseline that has already been found from the pre-signal region (scope specific)*
        w_area = waveform_tools.integrate(wave_times,
                                          wave_volts,
                                          x_low=x_low,
                                          x_high=x_high,
                                          baseline=baseline)
        w_photon = get_photons(w_area, voltage)
        w_rise = waveform_tools.get_rise(wave_times,
                                         wave_volts,
                                         voltage,
                                         x_low=x_low,
                                         x_high=x_high,
                                         baseline=baseline)
        w_fall = waveform_tools.get_fall(wave_times,
                                         wave_volts,
                                         voltage,
                                         x_low=x_low,
                                         x_high=x_high,
                                         baseline=baseline)
        w_width = waveform_tools.get_width(wave_times,
                                           wave_volts,
                                           voltage,
                                           x_low=x_low,
                                           x_high=x_high,
                                           baseline=baseline)
Esempio n. 3
0
            scope_fall_vs_ipw[ngr].SetPoint(i,ipw[i],fall_time)
            scope_width_vs_photon[ngr].SetPoint(i,photon,width_time)
            scope_width_vs_ipw[ngr].SetPoint(i,ipw[i],width_time)

            #now, the values from the graphs directly
            waveform_name = os.path.join(dirname,"Chan%02d_Width%05d"%(logical_channel,ipw[i]))
            if not os.path.exists("%s.pkl"%waveform_name):
                print "SKIPPING",waveform_name
                continue
            waveform = utils.PickleFile(waveform_name,1)
            waveform.load()
            wave_times = waveform.get_meta_data("timeform_1")
            wave_volts = waveform.get_data(1)[0]
            w_area = waveform_tools.integrate(wave_times,wave_volts)
            w_photon = get_photons(w_area,pmt_volt)
            w_rise = waveform_tools.get_rise(wave_times,wave_volts,pmt_volt)
            w_fall = waveform_tools.get_fall(wave_times,wave_volts,pmt_volt)
            w_width = waveform_tools.get_width(wave_times,wave_volts,pmt_volt)
            
            calc_photon_vs_pin[ngr].SetPoint(ctr,pin[i],w_photon)
            calc_photon_vs_ipw[ngr].SetPoint(ctr,ipw[i],w_photon)
            calc_rise_vs_photon[ngr].SetPoint(ctr,w_photon,w_rise)
            calc_rise_vs_ipw[ngr].SetPoint(ctr,ipw[i],w_rise)
            calc_fall_vs_photon[ngr].SetPoint(ctr,w_photon,w_fall)
            calc_fall_vs_ipw[ngr].SetPoint(ctr,ipw[i],w_fall)
            calc_width_vs_photon[ngr].SetPoint(ctr,w_photon,w_width)
            calc_width_vs_ipw[ngr].SetPoint(ctr,ipw[i],w_width)

            ctr+=1

        #Remove any bad scope values
Esempio n. 4
0
        
        wave_can.cd()
        gr = ROOT.TGraph()
        for j, t in enumerate(wave_times):
            gr.SetPoint(j, t, wave_volts[j])
        gr.Draw("alp")
        wave_can.Update()

        raw_input("wait:")

        baseline = waveform_tools.get_baseline(wave_times, wave_volts, baseline_low, baseline_high)
            
        # Compute the area, rise, fall and width *using the baseline that has already been found from the pre-signal region (scope specific)*
        w_area = waveform_tools.integrate(wave_times, wave_volts, x_low = x_low, x_high = x_high, baseline = baseline)
        w_photon = get_photons(w_area, voltage)
        w_rise = waveform_tools.get_rise(wave_times, wave_volts,voltage, x_low = x_low, x_high = x_high, baseline = baseline)
        w_fall = waveform_tools.get_fall(wave_times,wave_volts,voltage, x_low = x_low, x_high = x_high, baseline = baseline)
        w_width = waveform_tools.get_width(wave_times,wave_volts,voltage, x_low = x_low, x_high = x_high, baseline = baseline)

        calc_photon_vs_pin.SetPoint(ctr,pin[i],w_photon)
        calc_photon_vs_ipw.SetPoint(ctr,ipw[i],w_photon)
        calc_rise_vs_photon.SetPoint(ctr,w_photon,w_rise)
        calc_rise_vs_ipw.SetPoint(ctr,ipw[i],w_rise)
        calc_fall_vs_photon.SetPoint(ctr,w_photon,w_fall)
        calc_fall_vs_ipw.SetPoint(ctr,ipw[i],w_fall)
        calc_width_vs_photon.SetPoint(ctr,w_photon,w_width)
        calc_width_vs_ipw.SetPoint(ctr,ipw[i],w_width)

        ctr+=1

    #Remove any bad scope values
Esempio n. 5
0
            scope_width_vs_photon[ngr].SetPoint(i, photon, width_time)
            scope_width_vs_ipw[ngr].SetPoint(i, ipw[i], width_time)

            #now, the values from the graphs directly
            waveform_name = os.path.join(
                dirname, "Chan%02d_Width%05d" % (logical_channel, ipw[i]))
            if not os.path.exists("%s.pkl" % waveform_name):
                print "SKIPPING", waveform_name
                continue
            waveform = utils.PickleFile(waveform_name, 1)
            waveform.load()
            wave_times = waveform.get_meta_data("timeform_1")
            wave_volts = waveform.get_data(1)[0]
            w_area = waveform_tools.integrate(wave_times, wave_volts)
            w_photon = get_photons(w_area, pmt_volt)
            w_rise = waveform_tools.get_rise(wave_times, wave_volts, pmt_volt)
            w_fall = waveform_tools.get_fall(wave_times, wave_volts, pmt_volt)
            w_width = waveform_tools.get_width(wave_times, wave_volts,
                                               pmt_volt)

            calc_photon_vs_pin[ngr].SetPoint(ctr, pin[i], w_photon)
            calc_photon_vs_ipw[ngr].SetPoint(ctr, ipw[i], w_photon)
            calc_rise_vs_photon[ngr].SetPoint(ctr, w_photon, w_rise)
            calc_rise_vs_ipw[ngr].SetPoint(ctr, ipw[i], w_rise)
            calc_fall_vs_photon[ngr].SetPoint(ctr, w_photon, w_fall)
            calc_fall_vs_ipw[ngr].SetPoint(ctr, ipw[i], w_fall)
            calc_width_vs_photon[ngr].SetPoint(ctr, w_photon, w_width)
            calc_width_vs_ipw[ngr].SetPoint(ctr, ipw[i], w_width)

            ctr += 1