34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# set STARTPOS, ENDPOS, STEPS to the proper values
|
|
|
|
# swept mode
|
|
# for fixed mode, remove kinetic_high
|
|
STARTPOS = (75, 68, 70.6, -4.05, -2.7)
|
|
ENDPOS = (138, 131, 133.6, -3.8, -2.266)
|
|
# actually executed number is +1, i believe
|
|
STEPS = 21
|
|
|
|
RELATIVE = False
|
|
SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution, Scienta.dataMatrix)
|
|
LATENCY = 1.
|
|
|
|
if len(STARTPOS) == 4:
|
|
#FIXED
|
|
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Fixed)
|
|
Scienta.centerEnergy.write(STARTPOS[1])
|
|
MOTOR = (Eph, Scienta.centerEnergy, ManipulatorX, ManipulatorY)
|
|
else:
|
|
#SWEPT
|
|
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
|
Scienta.lowEnergy.write(STARTPOS[1])
|
|
Scienta.highEnergy.write(STARTPOS[2])
|
|
MOTOR = (Eph, Scienta.lowEnergy, Scienta.highEnergy, ManipulatorX, ManipulatorY)
|
|
|
|
adjust_sensors()
|
|
set_adc_averaging()
|
|
|
|
try:
|
|
lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
|
finally:
|
|
if ENDSCAN:
|
|
after_scan()
|