from gempython.gemplotting.utils.anautilities import getEmptyPerVFATList, parseCalFile, rejectOutliersMADOneSided from array import array from ctypes import * from gempython.gemplotting.fitting.fitScanData import fitScanData from gempython.tools.vfat_user_functions_xhal import * from gempython.utils.nesteddict import nesteddict as ndict from gempython.utils.wrappers import runCommand, envCheck from gempython.gemplotting.mapping.chamberInfo import chamber_config, chamber_vfatDACSettings from gempython.vfatqc.qcoptions import parser import datetime, subprocess, sys import numpy as np parser.add_option("--armDAC", type="int", dest="armDAC", default=100, help="CFG_THR_ARM_DAC value to write to all VFATs", metavar="armDAC") parser.add_option("--calFileCAL", type="string", dest="calFileCAL", default=None, help="File specifying CAL_DAC to fC equations per VFAT", metavar="calFileCAL") parser.add_option( "--calFileARM", type="string", dest="calFileARM", default=None, help="File specifying THR_ARM_DAC to fC equations per VFAT", metavar="calFileARM")
By: Cameron Bravo [email protected] Modified by: Eklavya Sarkar [email protected] Brian Dorney [email protected] """ from array import array from gempython.tools.vfat_user_functions_xhal import * from gempython.gemplotting.mapping.chamberInfo import chamber_vfatDACSettings from gempython.vfatqc.qcoptions import parser from gempython.vfatqc.qcutilities import inputOptionsValid, setChannelRegisters #from gempython.vfatqc.qcutilities import readBackCheck parser.add_option( "--chConfig", type="string", dest="chConfig", default=None, help="Specify file containing channel settings from anaUltraSCurve", metavar="chConfig") parser.add_option( "--compare", action="store_true", dest="compare", help= "When supplied with {chConfig, filename, vfatConfig} compares current reg values with those stored in input files", metavar="compare") parser.add_option("--filename", type="string", dest="filename", default=None, help="Specify file containing settings information",
if __name__ == '__main__': import sys, os, signal import subprocess import itertools from multiprocessing import Pool, freeze_support from gempython.gemplotting.mapping.chamberInfo import chamber_config from gempython.utils.wrappers import envCheck from gempython.vfatqc.qcoptions import parser parser.add_option("--config", action="store_true", dest="config", help="Set Configuration from simple txt files", metavar="config") parser.add_option("--run", action="store_true", dest="run", help="Set VFATs to run mode", metavar="run") parser.add_option("--series", action="store_true", dest="series", help="Run tests in series (default is false)", metavar="series") parser.add_option("--vt1", type="int", dest="vt1",
By: Jared Sturdy ([email protected]) Cameron Bravo ([email protected]) Brian Dorney ([email protected]) """ import sys, os, random, time from array import array from ctypes import * from gempython.tools.vfat_user_functions_xhal import * from gempython.tools.vfat_user_functions_uhal import * #remove this later after making it so amc13 communication doesn't spit bullshit messages from gempython.tools.optohybrid_user_functions_uhal import scanmode from gempython.vfatqc.qcoptions import parser parser.add_option("--amc13local", action="store_true", dest="amc13local", help="Set up for using AMC13 local trigger generator", metavar="amc13local") parser.add_option("--fakeTTC", action="store_true", dest="fakeTTC", help="Set up for using AMC13 local TTC generator", metavar="fakeTTC") parser.add_option("--filename", type="string", dest="filename", default="LatencyScanData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--internal", action="store_true", dest="internal", help="Run a latency scan using the internal calibration pulse", metavar="internal") parser.add_option("--randoms", type="int", default=0, dest="randoms", help="Set up for using AMC13 local trigger generator to generate random triggers with rate specified", metavar="randoms") parser.add_option("--t3trig", action="store_true", dest="t3trig", help="Set up for using AMC13 T3 trigger input", metavar="t3trig") parser.add_option("--throttle", type="int", default=0, dest="throttle", help="factor by which to throttle the input L1A rate, e.g. new trig rate = L1A rate / throttle", metavar="throttle") parser.add_option("--vcal", type="int", dest="vcal", help="Height of CalPulse in DAC units for all VFATs", metavar="vcal", default=250)
Modified By: Brian Dorney ([email protected]) """ import sys, os, random, time from array import array import gempython.tools.optohybrid_user_functions_uhal as oh from gempython.tools.vfat_user_functions_uhal import * import gempython.tools.amc_user_functions_uhal as amc from gempython.vfatqc.qcoptions import parser parser.add_option("--amc13local", action="store_true", dest="amc13local", help="Set up for using AMC13 local trigger generator", metavar="amc13local") parser.add_option("--fakeTTC", action="store_true", dest="fakeTTC", help="Set up for using AMC13 local TTC generator", metavar="fakeTTC") parser.add_option("--filename", type="string", dest="filename", default="LatencyData_Trimmed.root", help="Specify Output Filename", metavar="filename") parser.add_option( "--internal",
#!/bin/env python """ Script to measure sbit rate as a function of CFG_THR_ARM_DAC By: Brian Dorney ([email protected]) Evaldas Juska ([email protected]) """ import sys, os from array import array from ctypes import * from gempython.tools.vfat_user_functions_xhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("--arm", action="store_true", dest="scanARM", help="Use only the arming comparator instead of the CFD", metavar="scanARM") parser.add_option("--chMin", type="int", dest = "chMin", default = 0, help="Specify minimum channel number to scan", metavar="chMin") parser.add_option("--chMax", type="int", dest = "chMax", default = 127, help="Specify maximum channel number to scan", metavar="chMax") parser.add_option("-f", "--filename", type="string", dest="filename", default="SBitRateData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--invertVFATPos", action="store_true", dest="invertVFATPos", help="Invert VFAT Position ordered, e.g. VFAT0 is idx 23 and vice versa", metavar="invertVFATPos") parser.add_option("--perchannel", action="store_true", dest="perchannel", help="Run a per-channel sbit rate scan", metavar="perchannel") parser.add_option("--time", type="int", dest="time", default = 3000, help="Acquire time per point in milliseconds", metavar="time") #parser.add_option("--zcc", action="store_true", dest="scanZCC", # help="V3 Electronics only, scan the threshold on the ZCC instead of the ARM comparator", metavar="scanZCC")
By: Cameron Bravo ([email protected]) Jared Sturdy ([email protected]) Modified By: Brian Dorney ([email protected]) """ import sys, os, random, time from array import array from gempython.tools.optohybrid_user_functions_uhal import * from gempython.tools.vfat_user_functions_uhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("--vt2", type="int", dest="vt2", default=0, help="Specify VT2 to use", metavar="vt2") parser.add_option("-f", "--filename", type="string", dest="filename", default="VThreshold1Data_Trimmed.root", help="Specify Output Filename", metavar="filename") parser.add_option("--perchannel", action="store_true", dest="perchannel", help="Run a per-channel VT1 scan", metavar="perchannel") parser.add_option("--trkdata", action="store_true", dest="trkdata", help="Run a per-VFAT VT1 scan using tracking data (default is to use trigger data)", metavar="trkdata") (options, args) = parser.parse_args() if options.vt2 not in range(256): print "Invalid VT2 specified: %d, must be in range [0,255]"%(options.vt2) exit(1) if options.debug: uhal.setLogLevelTo( uhal.LogLevel.INFO )
#!/bin/env python """ Script to measure sbit rate as a function of CFG_THR_ARM_DAC By: Brian Dorney ([email protected]) Evaldas Juska ([email protected]) """ import sys, os from array import array from ctypes import * from gempython.tools.vfat_user_functions_xhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("--arm", action="store_true", dest="scanARM", help="Use only the arming comparator instead of the CFD", metavar="scanARM") parser.add_option("--chMin", type="int", dest = "chMin", default = 0, help="Specify minimum channel number to scan", metavar="chMin") parser.add_option("--chMax", type="int", dest = "chMax", default = 127, help="Specify maximum channel number to scan", metavar="chMax") parser.add_option("-f", "--filename", type="string", dest="filename", default="SBitRateData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--perchannel", action="store_true", dest="perchannel", help="Run a per-channel sbit rate scan", metavar="perchannel") #parser.add_option("--zcc", action="store_true", dest="scanZCC", # help="V3 Electronics only, scan the threshold on the ZCC instead of the ARM comparator", metavar="scanZCC") parser.set_defaults(stepSize=2) (options, args) = parser.parse_args() remainder = (options.scanmax-options.scanmin+1) % options.stepSize
#!/bin/env python """ Script to take latency data using OH BX delay counter By: Jared Sturdy ([email protected]) Cameron Bravo ([email protected]) """ import sys from array import array from gempython.tools.vfat_user_functions_uhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("--filename", type="string", dest="filename", default="LatencyData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--vt1", type="int", dest="vt1", help="VThreshold1 DAC value for all VFATs", metavar="vt1", default=100) parser.set_defaults(nevts=1000) (options, args) = parser.parse_args() if options.MSPL not in range(1, 9): print "Invalid MSPL specified: %d, must be in range [1,8]" % (options.MSPL) exit(1)
if __name__ == '__main__': """ Script to take Scurve data using OH ultra scans By: Cameron Bravo ([email protected]) and Brian Dorney ([email protected]) """ from array import array from ctypes import * from gempython.tools.optohybrid_user_functions_uhal import scanmode from gempython.tools.vfat_user_functions_xhal import * from gempython.vfatqc.qcoptions import parser import os, sys parser.add_option("--CalPhase", type="int", dest = "CalPhase", default = 0, help="Specify CalPhase. Must be in range 0-8", metavar="CalPhase") parser.add_option("--calSF", type="int", dest = "calSF", default = 0, help="V3 electroncis only. Value of the CFG_CAL_FS register", metavar="calSF") parser.add_option("--chMin", type="int", dest = "chMin", default = 0, help="Specify minimum channel number to scan", metavar="chMin") parser.add_option("--chMax", type="int", dest = "chMax", default = 127, help="Specify maximum channel number to scan", metavar="chMax") parser.add_option("-f", "--filename", type="string", dest="filename", default="SCurveData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--latency", type="int", dest = "latency", default = 37, help="Specify Latency", metavar="latency") parser.add_option("--voltageStepPulse", action="store_true",dest="voltageStepPulse", help="V3 electronics only. Calibration Module is set to use voltage step pulsing instead of default current pulse injection", metavar="voltageStepPulse") (options, args) = parser.parse_args()
Script to take VT1 data using OH ultra scans By: Cameron Bravo ([email protected]) Jared Sturdy ([email protected]) Brian Dorney ([email protected]) """ import sys, os, random, time from array import array from ctypes import * from gempython.tools.optohybrid_user_functions_uhal import scanmode from gempython.tools.vfat_user_functions_xhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("--chMin", type="int", dest = "chMin", default = 0, help="Specify minimum channel number to scan", metavar="chMin") parser.add_option("--chMax", type="int", dest = "chMax", default = 127, help="Specify maximum channel number to scan", metavar="chMax") parser.add_option("-f", "--filename", type="string", dest="filename", default="VThreshold1Data_Trimmed.root", help="Specify Output Filename", metavar="filename") parser.add_option("--perchannel", action="store_true", dest="perchannel", help="Run a per-channel VT1 scan", metavar="perchannel") parser.add_option("--trkdata", action="store_true", dest="trkdata", help="Run a per-VFAT VT1 scan using tracking data (default is to use trigger data)", metavar="trkdata") parser.add_option("--vt2", type="int", dest="vt2", default=0, help="Specify VT2 to use", metavar="vt2") parser.add_option("--zcc", action="store_true", dest="scanZCC", help="V3 Electronics only, scan the threshold on the ZCC instead of the ARM comparator", metavar="scanZCC") (options, args) = parser.parse_args()
#!/bin/env python """ Script to take Scurve data using OH ultra scans By: Cameron Bravo ([email protected]) """ import sys from array import array from gempython.tools.vfat_user_functions_uhal import * from gempython.vfatqc.qcoptions import parser parser.add_option("-f", "--filename", type="string", dest="filename", default="SCurveData.root", help="Specify Output Filename", metavar="filename") parser.add_option("--latency", type="int", dest="latency", default=37, help="Specify Latency", metavar="latency") parser.add_option("--CalPhase", type="int", dest="CalPhase", default=0, help="Specify CalPhase. Must be in range 0-8", metavar="CalPhase")