Files
dev/script/2019_0227_023309_XAS_Fe_b.xml
2019-03-20 13:52:00 +01:00

189 lines
13 KiB
XML

<?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_Fe_b"/>
<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>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/sls/X07MB/data/settings/Scripts/GUI_X07MB/X_X07MB_fda_file_to_EPICS.sh ${FILENAME}" checkExitValue="false"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/sls/X07MB/data/settings/Scripts/GUI_X07MB/X_X07MB_fda_write_header.py &amp;" checkExitValue="false"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:START-CSMPL" value="0" operation="put" type="String" delay="0.05"/>
<preAction 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"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-XMAP:CollectMode" value="0" operation="put" type="String" delay="0.05"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-XMAP:Apply" value="1" operation="put" type="String" delay="0.05"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-XMAP:PresetReal" value="0" operation="put" type="String" delay="0.05"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="2" operation="put" type="String" delay="0.05"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP2:SMPL" value="1" operation="put" type="String" delay="0.7"/>
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="X07MB-OP-WV1:WT_SET" value="1" operation="put" type="String" delay="0.05"/>
<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="20"/>
<start>7000.0</start>
<end>7001.0</end>
<stepSize>1.0</stepSize>
</region>
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="5"/>
<start>7003.0</start>
<end>7100.0</end>
<stepSize>3.0</stepSize>
</region>
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="15"/>
<start>7103.0</start>
<end>7160.0</end>
<stepSize>0.3</stepSize>
</region>
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="15"/>
<start>7160.5</start>
<end>7200.0</end>
<stepSize>0.5</stepSize>
</region>
<region>
<preAction xsi:type="ChannelAction" channel="X07MB-OP2:TOTAL-CYCLES" value="15.0"/>
<start>4.80379024078</start>
<end>10.0</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.02
N_Cycles.setValue(nc)
E_0=7112.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"/>
</guard>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-ES3-MA1:TRSCANH.VAL" id="ScanX_set"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-ES3-MA1:TRSCANV.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_04:MEAN" id="diode"/>
<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-XMAP:mca2.R0" id="D2_FeKa"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="X07MB-XMAP:dxp2:SCA0Counts" id="D2_FeKa_dxp"/>
<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="ArrayDetector" arraySize="2048" name="X07MB-XMAP:mca2.VAL" id="Spec_2"/>
</dimension>
<dimension>
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayPositioner" name="X07MB-ES3-MA1:TRSCANH.VAL" readback="X07MB-ES3-MA1:TRSCANH.RBV" id="ScanX">
<positions> -2.25</positions>
</positioner>
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayPositioner" name="X07MB-ES3-MA1:TRSCANV.VAL" readback="X07MB-ES3-MA1:TRSCANV.RBV" id="ScanY">
<positions> 1.0</positions>
</positioner>
</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="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="D2_FeKa_corr">
<mapping xsi:type="IDParameterMapping" refid="D2_FeKa" 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="FeKa_sum_cps">
<mapping xsi:type="IDParameterMapping" refid="D2_FeKa_corr" variable="D2_FeKa_corr"/>
<script>import math
def process(D2_FeKa_corr):
SUM_DET = 0.
SUM_DET = SUM_DET + D2_FeKa_corr
return SUM_DET </script>
</manipulation>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_ICR D2_TrueICR" title="ICR "/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_OCR" title="OCR "/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_FeKa D2_FeKa_dxp" title="D2_FeKa"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="D2_FeKa_corr" title="D2_FeKa_corr"/>
<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)"/>
</configuration>