This commit is contained in:
2019-05-21 13:26:07 +02:00
parent 217cb15f60
commit 9683094f61

442
script/test/TestThomas.xml Normal file
View File

@@ -0,0 +1,442 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
<data format="txt" fileName="XAS_Jiaqi_EMPA_A17_2"/>
<variable name="K" value="0.0" description="Buffer K spacing for EXAFS k-spacing scans "/>
<variable name="N_cycles" value="0.0" description="Buffer N_cycles for EXAFS k-spacing scans "/>
<variable name="NINT" value="0.0" description="Counter for file number of Moche files"/>
<scan>
<dimension zigzag="false" dataGroup="false">
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RegionPositioner" name="X07MB-OP-MO:E-SET" readback="X07MB-OP-MO:E-GET" settlingTime="0.2" id="Energy">
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="10"/>
<start>4071.0</start>
<end>4100.0</end>
<stepSize>1.0</stepSize>
</region>
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="15.0"/>
<start>3.83209893521</start>
<end>13.5</end>
<stepSize>0.05</stepSize>
<function>
<mapping xsi:type="VariableParameterMapping" name="K" variable="K_v"/>
<mapping xsi:type="ChannelParameterMapping" channel="X07MB-OP2:TOTAL-CYCLES" type="Double" variable="N_Cycles"/>
<script>
def calculate(parameter):
nc=N_Cycles.getValue()
nc=nc*1.018
N_Cycles.setValue(nc)
E_0=4045.0
h=6.626e-34
m=9.109e-31
k=parameter*1e10
K_v=k*1e-10
hk=(h/(2.*3.1415926))*k
E_joule=hk*hk / (2.*m)
E_eV=E_joule/1.6021e-19+E_0
return E_eV
</script>
</function>
</region>
</positioner>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-XMAP:EraseStart" value="1" operation="putq" type="String" delay="0.075"/>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:SMPL" value="1" operation="put" type="String" delay="0.075"/>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:SMPL-DONE" value="1" operation="wait" type="Integer" delay="0.03"/>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-XMAP:StopAll" value="1" operation="put" type="String" delay="0.05"/>
<guard>
<condition channel="ACOAU-ACCU:OP-MODE" value="6" type="Integer"/>
<condition channel="X07MA:m1.URIP" value="1" type="Integer"/>
<condition channel="X07MA:m2.URIP" value="1" type="Integer"/>
<condition channel="X07MA-PGM:rbkcrashrisk" value="0" type="Integer"/>
</guard>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-ES-MA1:ScanX.VAL" id="ScanX_set"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-ES-MA1:ScanY.VAL" id="ScanY_set"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP-MO:E-SET" id="Energy_set"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP-MO:BEAM-OFS" id="Mono_offset"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="ARIDI-PCT:CURRENT" id="I_SLS"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP2-SAI_01:MEAN" id="KEITHLEY4_TEY"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP2:TOTAL-CYCLES" id="U_CYC"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP2-SAI_07:MEAN" id="I0_KEITHLEY1"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP-KEITH1:setGain" id="KEITHLEY1_GAIN"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP2-SAI_08:MEAN" id="I1_KEITHLEY2"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP-KEITH2:setGain" id="KEITHLEY2_GAIN"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-OP2-SAI_06:MEAN" id="KEITHLEY3"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca1.R0" id="D1_CaKa"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp1:SCA0Counts" id="D1_CaKa_dxp"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca2.R0" id="D2_CaKa"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp2:SCA0Counts" id="D2_CaKa_dxp"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca3.R0" id="D3_CaKa"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp3:SCA0Counts" id="D3_CaKa_dxp"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca4.R0" id="D4_CaKa"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp4:SCA0Counts" id="D4_CaKa_dxp"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp1:InputCountRate" id="D1_ICR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp1:OutputCountRate" id="D1_OCR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca1.ELTM" id="DD1_ELTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca1.ERTM" id="DD1_ERTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca1.DTIM" id="DD1_DTIM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp2:InputCountRate" id="D2_ICR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp2:OutputCountRate" id="D2_OCR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca2.ELTM" id="DD2_ELTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca2.ERTM" id="DD2_ERTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca2.DTIM" id="DD2_DTIM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp3:InputCountRate" id="D3_ICR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp3:OutputCountRate" id="D3_OCR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca3.ELTM" id="DD3_ELTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca3.ERTM" id="DD3_ERTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca3.DTIM" id="DD3_DTIM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp4:InputCountRate" id="D4_ICR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp4:OutputCountRate" id="D4_OCR"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca4.ELTM" id="DD4_ELTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca4.ERTM" id="DD4_ERTM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:mca4.DTIM" id="DD4_DTIM"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="2048" name="X07MB-XMAP:mca1.VAL" id="Spec_1"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="2048" name="X07MB-XMAP:mca2.VAL" id="Spec_2"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="2048" name="X07MB-XMAP:mca3.VAL" id="Spec_3"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="2048" name="X07MB-XMAP:mca4.VAL" id="Spec_4"/>
</dimension>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:START-CSMPL" value="1" operation="put" type="String" delay="0.1"/>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/sls/X07MB/data/settings/Scripts/GUI_X07MB/X_X07MB_write_filename_to_file.sh ${FILENAME} &amp;" exitValue="0"/>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/sls/X07MB/data/x07mbop/Data1/Commissioning/Develop/Develop_Moench/X_X07MB_reset_Moench.py &amp;" exitValue="0"/>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:START-CSMPL" value="1" operation="put" type="String" delay="0.1"/>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP-WV1:WT_SET" value="0" operation="put" type="String" delay="0.1"/>
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-ES1:userCalc4.INPL" value="0" operation="put" type="String" delay="2.0"/>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D1_TrueICR">
<mapping xsi:type="IDParameterMapping" refid="D1_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D1_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD1_ERTM" variable="d"/>
<script>import math
def process(b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR) &lt;&gt; 0:
box = TrueICR
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D2_TrueICR">
<mapping xsi:type="IDParameterMapping" refid="D2_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D2_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD2_ERTM" variable="d"/>
<script>import math
def process(b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR) &lt;&gt; 0:
box = TrueICR
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D3_TrueICR">
<mapping xsi:type="IDParameterMapping" refid="D3_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D3_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD3_ERTM" variable="d"/>
<script>import math
def process(b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR) &lt;&gt; 0:
box = TrueICR
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D4_TrueICR">
<mapping xsi:type="IDParameterMapping" refid="D4_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D4_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD4_ERTM" variable="d"/>
<script>import math
def process(b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR) &lt;&gt; 0:
box = TrueICR
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D1_CaKa_corr">
<mapping xsi:type="IDParameterMapping" refid="D1_CaKa" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="D1_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D1_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD1_ERTM" variable="d"/>
<script>import math
def process(a,b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR*d) &lt;&gt; 0:
box = a * TrueICR / OCR / d
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D1_CaKa_corr_over_KEITHLEY4_TEY">
<mapping xsi:type="IDParameterMapping" refid="D1_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="KEITHLEY4_TEY" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D1_CaKa_corr_over_U_CYC">
<mapping xsi:type="IDParameterMapping" refid="D1_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="U_CYC" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D2_CaKa_corr">
<mapping xsi:type="IDParameterMapping" refid="D2_CaKa" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="D2_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D2_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD2_ERTM" variable="d"/>
<script>import math
def process(a,b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR*d) &lt;&gt; 0:
box = a * TrueICR / OCR / d
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D2_CaKa_corr_over_KEITHLEY4_TEY">
<mapping xsi:type="IDParameterMapping" refid="D2_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="KEITHLEY4_TEY" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D2_CaKa_corr_over_U_CYC">
<mapping xsi:type="IDParameterMapping" refid="D2_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="U_CYC" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D3_CaKa_corr">
<mapping xsi:type="IDParameterMapping" refid="D3_CaKa" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="D3_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D3_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD3_ERTM" variable="d"/>
<script>import math
def process(a,b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR*d) &lt;&gt; 0:
box = a * TrueICR / OCR / d
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D3_CaKa_corr_over_KEITHLEY4_TEY">
<mapping xsi:type="IDParameterMapping" refid="D3_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="KEITHLEY4_TEY" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D3_CaKa_corr_over_U_CYC">
<mapping xsi:type="IDParameterMapping" refid="D3_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="U_CYC" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D4_CaKa_corr">
<mapping xsi:type="IDParameterMapping" refid="D4_CaKa" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="D4_ICR" variable="b"/>
<mapping xsi:type="IDParameterMapping" refid="D4_OCR" variable="c"/>
<mapping xsi:type="IDParameterMapping" refid="DD4_ERTM" variable="d"/>
<script>import math
def process(a,b,c,d):
DeadTime = 1.182e-7
ICR = b
OCR = c
if (OCR) == 0:
box = 0
return box
if (ICR) == 0:
box = 0
return box
Test = 1.e8
TestICR = ICR
n = 0
while ((Test &gt; DeadTime) and (n &lt; 30)):
TrueICR = ICR * math.exp(TestICR * DeadTime)
Test = (TrueICR - TestICR) / TestICR
TestICR = TrueICR
n = n + 1
if (OCR*d) &lt;&gt; 0:
box = a * TrueICR / OCR / d
if (OCR*d) == 0:
box=0.0
return box</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D4_CaKa_corr_over_KEITHLEY4_TEY">
<mapping xsi:type="IDParameterMapping" refid="D4_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="KEITHLEY4_TEY" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="D4_CaKa_corr_over_U_CYC">
<mapping xsi:type="IDParameterMapping" refid="D4_CaKa_corr" variable="a"/>
<mapping xsi:type="IDParameterMapping" refid="U_CYC" variable="b"/>
<script>import math
def process(a,b):
return (a/b)</script>
</manipulation>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="CaKa_sum_cps">
<mapping xsi:type="IDParameterMapping" refid="D1_CaKa_corr" variable="D1_CaKa_corr"/>
<mapping xsi:type="IDParameterMapping" refid="D2_CaKa_corr" variable="D2_CaKa_corr"/>
<mapping xsi:type="IDParameterMapping" refid="D3_CaKa_corr" variable="D3_CaKa_corr"/>
<mapping xsi:type="IDParameterMapping" refid="D4_CaKa_corr" variable="D4_CaKa_corr"/>
<script>import math
def process(D1_CaKa_corr , D2_CaKa_corr , D3_CaKa_corr , D4_CaKa_corr):
SUM_DET = 0.
SUM_DET = SUM_DET + D1_CaKa_corr
SUM_DET = SUM_DET + D2_CaKa_corr
SUM_DET = SUM_DET + D3_CaKa_corr
SUM_DET = SUM_DET + D4_CaKa_corr
return SUM_DET</script>
</manipulation>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D1_ICR D2_ICR D3_ICR D4_ICR D1_TrueICR D2_TrueICR D3_TrueICR D4_TrueICR" title="ICR "/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D1_OCR D2_OCR D3_OCR D4_OCR" title="OCR "/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D1_CaKa D1_CaKa_dxp" title="D1_CaKa"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_CaKa D2_CaKa_dxp" title="D2_CaKa"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D3_CaKa D3_CaKa_dxp" title="D3_CaKa"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D4_CaKa D4_CaKa_dxp" title="D4_CaKa"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D1_CaKa_corr" title="D1_CaKa_corr"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_CaKa_corr" title="D2_CaKa_corr"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D3_CaKa_corr" title="D3_CaKa_corr"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D4_CaKa_corr" title="D4_CaKa_corr"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D4_CaKa_corr_over_KEITHLEY4_TEY" title="D4_CaKa_corr_over_KEITHLEY4_TEY"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D4_CaKa_corr_over_U_CYC" title="D4_CaKa_corr_over_U_CYC"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="I0_KEITHLEY1" title="KEITHLEY1 (I0)=f(Energy)"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="I1_KEITHLEY2" title="KEITHLEY2 (I1)=f(Energy)"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="KEITHLEY3" title="KEITHLEY3=f(Energy)"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="KEITHLEY4_TEY U_CYC" title="USER DETECTORS KEITHLEY4_TEY U_CYC"/>
</configuration>