Script execution

This commit is contained in:
gac-x03da
2019-02-08 15:43:44 +01:00
parent c28f3c2f6c
commit e78bb09c63

View File

@@ -0,0 +1,41 @@
"""
Theta scan of OTF XAS
set OTF parameters separately
"""
import math
STARTPOS = 111.
ENDPOS = 51.
STEPS = 3
LATENCY = 0.0
ENDSCAN = False
RELATIVE = False
# do not edit below
OtfRunChannel = Channel("X03DA-OTF:RUN", type="b")
OtfEnergyChannel = Channel("X03DA-OTF:EDATA", type="[d", size=2000)
OtfCh1Channel = Channel("X03DA-OTF:IDATA1", type="[d", size=2000)
OtfCh2Channel = Channel("X03DA-OTF:IDATA2", type="[d", size=2000)
#MOTOR = (ManipulatorTheta)
MOTOR = (dummy)
#SENSORS = (SampleCurrent, RefCurrent, MachineCurrent)
SENSORS = (OtfCh1Channel, OtfCh2Channel, OtfEnergyChannel)
def trigger_otf():
wait_beam()
OtfRunChannel.put(True)
time.sleep(10.)
OtfRunChannel.wait_for_value(False, 200)
try:
lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=trigger_otf, after_read = after_readout)
finally:
if ENDSCAN:
after_scan()