Script execution
This commit is contained in:
33
script/PhotonEnergyManipulator.py
Normal file
33
script/PhotonEnergyManipulator.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# set STARTPOS, ENDPOS, STEPS to the proper values
|
||||
|
||||
# swept mode
|
||||
# for fixed mode, remove kinetic_high
|
||||
STARTPOS = (131, 115.5, 120.5, -3.8, -2.05)
|
||||
ENDPOS = (139, 123.5, 128.5, -3.9, -2.15)
|
||||
# actually executed number is +1, i believe
|
||||
STEPS = 2
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user