sc.set_pulse_delay(1.0) sc.set_pulse_number(1000) sc.set_fibre_delay(0) sc.set_trigger_delay(0) sc.disable_external_trigger() ipt = 0 for width in widths: sc.set_pulse_width(width) sc.fire() time.sleep(1.0) pin = None while pin==None: pin = sc.read_pin() results.pin = int(pin) results.width = width tt.Fill() tg.SetPoint(ipt,float(width),float(pin)) print "WIDTH:",width,"PIN",pin ipt += 1 tg.Draw("ap") tc.Update() # raw_input("wait") tt.Write() tf.Close()
scope.set_edge_trigger(min_volt / 2, 1, True) #run the box for a while first to try to stabalise #the temperature print "\tdelay: %.3f" % delay delay_actual = delay * 1e-3 + offset _ = run_settings(n_pulse=100, chan=logical_channel, delay=delay, width=width) pin = run_settings(n_pulse=100, chan=logical_channel, delay=delay, width=width) area = float(scope.measure(1, "area")) results.width = width results.pin = pin results.delay = delay * 1e-3 results.delay_actual = delay_actual results.scope_area = area tt.Fill() scope.unlock() tt.Write() tf.Close()
sc.set_pulse_number(1000) sc.set_fibre_delay(0) sc.set_trigger_delay(0) sc.disable_external_trigger() ipt = 0 for width in widths: sc.set_pulse_width(width) sc.fire() time.sleep(1.0) pin = None while pin==None: pin = sc.read_pin() # print pin, channel, pin[0][channel] results.pin = int(pin[0][channel]) results.width = width ipin = int(pin[0][channel]) iwidth = width output.write("%d %d\n"%(iwidth,ipin)) tt.Fill() tg.SetPoint(ipt,float(iwidth),float(ipin)) print "WIDTH:",width,"PIN",pin ipt += 1 tg.Draw("ap") tc.Update() # raw_input("wait") tc.Print("PINCalib%02d.pdf"%channel) tt.Write()
scope.set_edge_trigger(min_volt/2,1,True) #run the box for a while first to try to stabalise #the temperature print "\tdelay: %.3f" % delay delay_actual = delay * 1e-3 + offset _ = run_settings(n_pulse = 100, chan = logical_channel, delay = delay, width = width) pin = run_settings(n_pulse = 100, chan = logical_channel, delay = delay, width = width) area = float(scope.measure(1,"area")) results.width = width results.pin = pin results.delay = delay * 1e-3 results.delay_actual = delay_actual results.scope_area = area tt.Fill() scope.unlock() tt.Write() tf.Close()
sc.set_trigger_delay(0) sc.disable_external_trigger() ipt = 0 for height in heights: sc.set_pulse_height(height) sc.fire() time.sleep(p._medium_pause) pin = None while pin==None: pin = sc.read_pin() print pin tmpList = pin[0].values() pinValue = int(''.join(tmpList)) results.pin = pinValue #print int(''.join(tmpList)) results.height = height tt.Fill() tg.SetPoint(ipt,float(height),float(pinValue)) print "Height:",height,"PIN",pinValue ipt += 1 tg.Draw("ap") tc.Update() # raw_input("wait") tt.Write() tf.Close()
sc.set_pulse_number(p._pulse_num) sc.set_fibre_delay(0) sc.set_trigger_delay(0) sc.disable_external_trigger() ipt = 0 for width in widths: sc.set_pulse_width(width) sc.fire() time.sleep(p._medium_pause) pin = None while pin == None: pin = sc.read_pin() # print pin, channel, pin[0][channel] results.pin = int(pin[0][channel]) results.width = width ipin = int(pin[0][channel]) iwidth = width output.write("%d %d\n" % (iwidth, ipin)) tt.Fill() tg.SetPoint(ipt, float(iwidth), float(ipin)) print "WIDTH:", width, "PIN", pin ipt += 1 tg.Draw("ap") tc.Update() # raw_input("wait") tc.Print("PINCalib%02d.pdf" % channel) tt.Write()