Startup
This commit is contained in:
41
script/Test.xml
Normal file
41
script/Test.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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=""/>
|
||||
<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="TESTIOC:TESTCALCOUT:Input" 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="K" 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>
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="Energy" y="SIN" title="Sin"/>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user