42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""
|
|
parallel photon energy and manipulator scan
|
|
"""
|
|
import math
|
|
global VECTOR, SENSORS
|
|
|
|
MODE = "swept"
|
|
LATENCY = 0.0
|
|
SENSORS = [Counts, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent]
|
|
|
|
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
|
#writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy, ManipulatorZ)
|
|
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy, ManipulatorZ)
|
|
|
|
adjust_sensors()
|
|
set_adc_averaging()
|
|
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
|
|
|
n = 36
|
|
Estep=2.0
|
|
#Zstart=114.9
|
|
#Zstep=-0.00
|
|
Estart=130.0
|
|
Ewidth=19.5
|
|
|
|
try:
|
|
eph = [Estart + i * Estep for i in range(n)]
|
|
elo = [Estart-Ewidth + i * Estep for i in range(n)]
|
|
ehi = [Estart-0.5 + i * Estep for i in range(n)]
|
|
#z = [Zstart + i * Zstep for i in range(n)]
|
|
z = [111.6]*10+[111.7]*10+[111.8]*10+[111.9]*6
|
|
VECTOR = [[eph[i], elo[i], ehi[i], z[i]] for i in range(len(eph))]
|
|
vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
|
|
finally:
|
|
after_scan()
|
|
|
|
|
|
|
|
|
|
|
|
|