New ScreenPanel

This commit is contained in:
2018-01-19 10:56:53 +01:00
commit ae4d621609
580 changed files with 46598 additions and 0 deletions

38
script/PhotonEnergy.py Executable file
View File

@@ -0,0 +1,38 @@
"""
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)
"""
EnergyDistribution = scienta.getSpectrum()
AngleDistribution = scienta.getSpectrum()
Scienta = scienta
Eph = out
if MODE == "swept":
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
else:
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Fixed)
if len(VECTOR[0]) == 2:
#FIXED
Scienta.centerEnergy.write(VECTOR[0][1])
writables = (Eph, Scienta.centerEnergy)
else:
#SWEPT
Scienta.lowEnergy.write(VECTOR[0][1])
Scienta.highEnergy.write(VECTOR[0][2])
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
#adjust_sensors()
#set_adc_averaging()
#set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
try:
vscan(writables, SENSORS, VECTOR, True, LATENCY,False)
finally:
if ENDSCAN:
after_scan()