Files
x03da/script/PhotonEnergyManipulator.py
2019-12-01 14:24:54 +01:00

34 lines
1.1 KiB
Python

# set STARTPOS, ENDPOS, STEPS to the proper values
# swept mode
# for fixed mode, remove kinetic_high
STARTPOS = (141., 134., 136.7, -3.8, -2.266)
ENDPOS = (252., 245., 247.7, -3.3, -1.4)
# actually executed number is +1, i believe
STEPS = 37
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()