Script execution
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
|
||||
POSITIONERS = [dummy, ManipulatorCoolFlowSet]
|
||||
POSITIONERS = [dummy]
|
||||
RELATIVE = False
|
||||
SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution, Scienta.dataMatrix, ManipulatorTempA, ManipulatorTempB, ManipulatorCoolFlow)
|
||||
LATENCY = 0.0
|
||||
ENDSCAN = False
|
||||
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
@@ -30,26 +31,55 @@ def set_survey():
|
||||
Scienta.stepSize.write(0.1)
|
||||
Scienta.setPassEnergy(int(50))
|
||||
Scienta.stepTime.write(0.0588)
|
||||
Scienta.setIterations(1)
|
||||
Scienta.setIterations(2)
|
||||
ExitSlit.write(200.)
|
||||
Scienta.update()
|
||||
|
||||
def set_cool_down():
|
||||
temp = ManipulatorTempA.read()
|
||||
flow = min(40., 10. + 0.15 * (300. - temp))
|
||||
ManipulatorCoolFlowSet.write(flow)
|
||||
|
||||
def set_cool_up():
|
||||
temp = ManipulatorTempA.read()
|
||||
flow = min(40., 0. + 0.15 * (300. - temp))
|
||||
ManipulatorCoolFlowSet.write(flow)
|
||||
|
||||
def my_after_read_down(rec, scan):
|
||||
after_readout(rec, scan)
|
||||
set_cool_down()
|
||||
|
||||
def my_after_read_up(rec, scan):
|
||||
after_readout(rec, scan)
|
||||
set_cool_up()
|
||||
|
||||
try:
|
||||
print("survey")
|
||||
set_survey()
|
||||
lscan(POSITIONERS, SENSORS, (1., 10.), (1., 10.), 1, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
lscan(POSITIONERS, SENSORS, 1., 1., 0, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
print("4f ramping down")
|
||||
set_4f()
|
||||
lscan(POSITIONERS, SENSORS, (300., 15.), (10., 40.), 150, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
caput('X03DA-PC-LAKESHORE:1-TEMP_SP', 10.)
|
||||
lscan(POSITIONERS, SENSORS, 300., 10., 150, LATENCY, RELATIVE, before_read=before_readout, after_read = my_after_read_down)
|
||||
|
||||
# print("wait for 10 K")
|
||||
# the timeout is dangerous, it may cause an exception!
|
||||
# time.sleep(600) # seconds
|
||||
# ManipulatorTempA.waitValueInRange(10., 5., 600000) # milliseconds
|
||||
|
||||
print("survey")
|
||||
set_survey()
|
||||
lscan(POSITIONERS, SENSORS, (1., 40.), (1., 40.), 1, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
lscan(POSITIONERS, SENSORS, 1., 1., 0, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
print("4f ramping up")
|
||||
set_4f()
|
||||
lscan(POSITIONERS, SENSORS, (10., 20.), (300., 0.), 150, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
caput('X03DA-PC-LAKESHORE:1-TEMP_SP', 300.)
|
||||
lscan(POSITIONERS, SENSORS, 10., 300., 150, LATENCY, RELATIVE, before_read=before_readout, after_read = my_after_read_up)
|
||||
|
||||
print("survey")
|
||||
set_survey()
|
||||
lscan(POSITIONERS, SENSORS, (1., 0.), (1., 0.), 1, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
lscan(POSITIONERS, SENSORS, 1., 1., 0, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
finally:
|
||||
if ENDSCAN:
|
||||
|
||||
Reference in New Issue
Block a user