Skip to content

Instantly share code, notes, and snippets.

@bdorney
bdorney / registers2apply.py
Created June 18, 2019 15:59
VFAT3 Frontend Registers
registers2apply = {
#Pulse Stretch
"CFG_PULSE_STRETCH":3,
#Provide a slight offset to the ZCC comparator baseline voltage
"CFG_THR_ZCC_DAC":10,
#Medium VFAT3 preamp gain
"CFG_RES_PRE":2,
"CFG_CAP_PRE":1,
#Comparator Mode - CFD
"CFG_PT":0xf,
@bdorney
bdorney / voltageFluctuationHistograms.py
Created October 28, 2018 15:49
P5 Sustained Operations gist
from gempython.gemplotting.mapping.chamberInfo import chamber_config
from gempython.utils.nesteddict import nesteddict as ndict
import ROOT as r
dict_Histos = ndict()
for link,chamber in chamber_config.iteritems():
dict_Histos[chamber] = r.TH1F("h_{0}_dV".format(chamber),"Voltage Fluctuations for {0}".format(chamber),500,-0.5,499.5)
dict_Histos[chamber].Sumw2()