diff --git a/Software/AutomatedMeasurements/ElectronicMonkeyCCEScan.py b/Software/AutomatedMeasurements/ElectronicMonkeyCCEScan.py index a352c1b..cbccd1f 100644 --- a/Software/AutomatedMeasurements/ElectronicMonkeyCCEScan.py +++ b/Software/AutomatedMeasurements/ElectronicMonkeyCCEScan.py @@ -25,6 +25,10 @@ If = , = 67 && = 75 && = 1 means that the measurement is taken from 67 ns to 75 ns in 1 ns steps. More functionalities can be implemented. +Meaurements of type "CCEBiasVoltageScan" and "CCEDelayScan" have int parameters but measurements of type "CCEAttenuationScan" have float parameters. So float are used all the time, but casting them to int if necessary. + +If the measurement is of type "CCEDelayScan" we need a different configuration file for each value of the delay. All these files are in "CCEDelayScanConfig" folder. + How to run it: python ElectronicMonkeyCCEScan.py --m --fp --lp --sp --z --fx --lx --sx --date @@ -47,6 +51,8 @@ import time +import pylab as pl + parser = argparse.ArgumentParser(description='Define the parameters of the automated measurement for CCE scan.') parser.add_argument('--m',help='type of measurement') @@ -144,10 +150,10 @@ subprocess.call(command,shell=True) # Perform the measurement. -for pospar in range(firstpar,lastpar+steppar,steppar) : +for pospar in pl.frange(firstpar,lastpar,steppar) : # If the measurement is of type "CCEDelayScan" we need a different configuration file for each value of the delay. All these files are in "CCEDelayScanConfig" folder. if (measurement == "CCEDelayScan") : - config = config+"/CCEDelayScanConfig/"+"CCEDelayScanConfig"+str(int(pospar))+"ns" + configlas = config+"/CCEDelayScanConfig/"+"CCEDelayScanConfig"+str(int(pospar))+"ns" for posx in range(firstx,lastx+stepx,stepx) : print 'Value of the parameter identifying the measurement: %i steps' % pospar @@ -163,8 +169,8 @@ else : filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-216-"+str(posx)+"x-"+str(z)+"z-las.ali" - printcommand = "echo alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+config - command = "alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+config + printcommand = "echo alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+configlas + command = "alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+configlas print '***' subprocess.call(printcommand,shell=True) subprocess.call(command,shell=True) diff --git a/Software/CCE/CCE.C b/Software/CCE/CCE.C index 3cd0024..aaf019c 100644 --- a/Software/CCE/CCE.C +++ b/Software/CCE/CCE.C Binary files differ diff --git a/Software/Tools/SCurve.C b/Software/Tools/SCurve.C index 593ccb0..dec2cb6 100644 --- a/Software/Tools/SCurve.C +++ b/Software/Tools/SCurve.C @@ -404,7 +404,7 @@ - else if ((filename == "ProcessRawData-201502253-216") || (filename == "ProcessRawData-20150226-216") || (filename == "ProcessRawData-201502262-216") || (filename == "ProcessRawData-20150226-100V-216") || (filename == "ProcessRawData-20150226-120V-216") || (filename == "ProcessRawData-20150226-140V-216") || (filename == "ProcessRawData-20150226-160V-216") || (filename == "ProcessRawData-20150226-180V-216") || (filename == "ProcessRawData-20150226-200V-216") || (filename == "ProcessRawData-20150227-21.0dB-216") || (filename == "ProcessRawData-20150227-21.5dB-216") || (filename == "ProcessRawData-20150227-22.0dB-216") || (filename == "ProcessRawData-20150227-22.5dB-216") || (filename == "ProcessRawData-20150227-23.0dB-216") || (filename == "ProcessRawData-20150227-23.5dB-216") || (filename == "ProcessRawData-20150227-24.0dB-216") || (filename == "ProcessRawData-20150227-24.5dB-216") || (filename == "ProcessRawData-20150227-25.0dB-216")) { + else if ((filename == "ProcessRawData-201502253-216") || (filename == "ProcessRawData-20150226-216") || (filename == "ProcessRawData-201502262-216") || (filename == "ProcessRawData-20150226-100V-216") || (filename == "ProcessRawData-20150226-120V-216") || (filename == "ProcessRawData-20150226-140V-216") || (filename == "ProcessRawData-20150226-160V-216") || (filename == "ProcessRawData-20150226-180V-216") || (filename == "ProcessRawData-20150226-200V-216") || (filename == "ProcessRawData-20150227-21.0dB-216") || (filename == "ProcessRawData-20150227-21.5dB-216") || (filename == "ProcessRawData-20150227-22.0dB-216") || (filename == "ProcessRawData-20150227-22.5dB-216") || (filename == "ProcessRawData-20150227-23.0dB-216") || (filename == "ProcessRawData-20150227-23.5dB-216") || (filename == "ProcessRawData-20150227-24.0dB-216") || (filename == "ProcessRawData-20150227-24.5dB-216") || (filename == "ProcessRawData-20150227-25.0dB-216") || (filename == "ProcessRawData-20150305-67ns-216") || (filename == "ProcessRawData-20150305-68ns-216") || (filename == "ProcessRawData-20150305-69ns-216") ||(filename == "ProcessRawData-20150305-70ns-216") || (filename == "ProcessRawData-20150305-71ns-216") || (filename == "ProcessRawData-20150305-72ns-216") || (filename == "ProcessRawData-20150305-73ns-216") || (filename == "ProcessRawData-20150305-74ns-216") || (filename == "ProcessRawData-20150305-75ns-216")) { // Right. *minRight = 30.; *maxRight = 140.; @@ -576,7 +576,7 @@ // - Float_t parEta[], the array containing the parameters of the erf function; // - Float_t lengthParEta, the length of the array containing the parameters of the erf function. void assignParInfoEta(string filename, Float_t parEta[], Int_t lengthParEta) { - if ((filename == "ProcessRawData-201502262-216") || (filename == "ProcessRawData-20150226-100V-216") || (filename == "ProcessRawData-20150226-120V-216") || (filename == "ProcessRawData-20150226-140V-216") || (filename == "ProcessRawData-20150226-160V-216") || (filename == "ProcessRawData-20150226-180V-216") || (filename == "ProcessRawData-20150226-200V-216") || (filename == "ProcessRawData-20150227-21.0dB-216") || (filename == "ProcessRawData-20150227-21.5dB-216") || (filename == "ProcessRawData-20150227-22.0dB-216") || (filename == "ProcessRawData-20150227-22.5dB-216") || (filename == "ProcessRawData-20150227-23.0dB-216") || (filename == "ProcessRawData-20150227-23.5dB-216") || (filename == "ProcessRawData-20150227-24.0dB-216") || (filename == "ProcessRawData-20150227-24.5dB-216") || (filename == "ProcessRawData-20150227-25.0dB-216")) { + if ((filename == "ProcessRawData-201502262-216") || (filename == "ProcessRawData-20150226-100V-216") || (filename == "ProcessRawData-20150226-120V-216") || (filename == "ProcessRawData-20150226-140V-216") || (filename == "ProcessRawData-20150226-160V-216") || (filename == "ProcessRawData-20150226-180V-216") || (filename == "ProcessRawData-20150226-200V-216") || (filename == "ProcessRawData-20150227-21.0dB-216") || (filename == "ProcessRawData-20150227-21.5dB-216") || (filename == "ProcessRawData-20150227-22.0dB-216") || (filename == "ProcessRawData-20150227-22.5dB-216") || (filename == "ProcessRawData-20150227-23.0dB-216") || (filename == "ProcessRawData-20150227-23.5dB-216") || (filename == "ProcessRawData-20150227-24.0dB-216") || (filename == "ProcessRawData-20150227-24.5dB-216") || (filename == "ProcessRawData-20150227-25.0dB-216") || (filename == "ProcessRawData-20150305-67ns-216") || (filename == "ProcessRawData-20150305-68ns-216") || (filename == "ProcessRawData-20150305-69ns-216") ||(filename == "ProcessRawData-20150305-70ns-216") || (filename == "ProcessRawData-20150305-71ns-216") || (filename == "ProcessRawData-20150305-72ns-216") || (filename == "ProcessRawData-20150305-73ns-216") || (filename == "ProcessRawData-20150305-74ns-216") || (filename == "ProcessRawData-20150305-75ns-216")) { parEta[0] = 1.5; parEta[1] = 140.; parEta[2] = 5.;