diff --git a/script/staff/MultiPhotonEnergy.py b/script/staff/MultiPhotonEnergy.py new file mode 100644 index 00000000..e87c1398 --- /dev/null +++ b/script/staff/MultiPhotonEnergy.py @@ -0,0 +1,36 @@ +""" +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) +""" + +global VECTOR, SENSORS + +MODE = "swept" +LATENCY = 1.0 +SENSORS = [Counts, EnergyDistribution, AngleDistribution, Scienta.spectrum, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent] + +Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept) +writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy) + +adjust_sensors() +set_adc_averaging() +set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) +set_exec_pars(compression=True) + +try: + VECTOR = [[80. + i * 2.5, 32. + i * 2.5, 48. + i * 2.5] for i in range(86)] + ManipulatorPhi.move(-90.0) + ManipulatorTheta.move(-9.0) + vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout) + + ManipulatorPhi.move(+96.8) + ManipulatorTheta.move(+44.0) + vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout) +finally: + after_scan()