Files
x03da/script/PhotonEnergy.py
2016-04-05 14:47:11 +02:00

31 lines
922 B
Python

"""
Arguments:
VECTOR (Double[][], Scan vector: Eph,Elow,Ehigh or Eph,Ecenter)
SENSORS (list)
LATENCY (double)
MODE ('fixed' or 'swept')
TYPE ('CIS' or 'CFS')
STEP (double)
"""
if MODE == "swept":
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
else:
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Fixed)
adjust_sensors()
set_adc_averaging()
if len(VECTOR[0]) == 2:
#FIXED
writables = (Eph, Scienta.centerEnergy)
Scienta.centerEnergy.write(VECTOR[0][1]) #in order scaling of image based on first point
else:
#SWEPT
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
Scienta.lowEnergy.write(VECTOR[0][1])
Scienta.highEnergy.write(VECTOR[0][2])
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta, after_read = after_readout)