Files
dev/script/Test3.xml
2023-05-01 11:28:04 +02:00

47 lines
2.2 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="Test"/>
<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="" readback="TESTIOC:TESTCALCOUT:Input" settlingTime="0.1" asynchronous="false" id="Energy">
<region>
<start>0.0</start>
<end>10.0</end>
<stepSize>1.0</stepSize>
<function>
<mapping xsi:type="VariableParameterMapping" name="N_cycles" variable="K_v"/>
<mapping xsi:type="ChannelParameterMapping" channel="TESTIOC:TESTCALCOUT:Output" type="Double" variable="Ch"/>
<script>def calculate(parameter):
print "X"
nc=Ch.getValue()
print nc
#nc=nc*1.02
#N_Cycles.setValue(nc)
return parameter * 2
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>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" type="Double" name="TESTIOC:TESTSINUS:SinCalc" id="SIN"/>
</dimension>
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="id951374">
<mapping xsi:type="IDParameterMapping" refid="SIN" variable=""/>
<script>def process():
return 0.0</script>
</manipulation>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="id951374" title="Sin"/>
</configuration>