42 lines
904 B
Python
42 lines
904 B
Python
"""
|
|
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()
|