Files
x03da/script/PhotonEnergy.py
2016-03-08 17:29:53 +01:00

28 lines
800 B
Python

"""
Arguments:
VECTOR (Double[][], Scan vector: Eph,Elow,Ehigh or Eph,Ecenter)
SENSORS (list)
LATENCY (double)
MODE ('fixed' or 'swept')
STEP (double)
"""
if MODE == "swept":
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
Scienta.getStepSize().write(STEP)
else:
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Fixed)
adjust_sensors()
set_adc_averaging()
#set_preference(Preference.PLOT_TYPES,{'ImageEnergyDistribution':1, 'ImageAngleDistribution':1})
if len(VECTOR[0]) == 2:
#FIXED
writables = (Eph, Scienta.centerEnergy)
else:
#SWEPT
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
print SENSORS
vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta, after_read = after_readout)