diff --git a/plugins/PhotonEnergy.java b/plugins/PhotonEnergy.java index 1e10a232..e216e7e9 100644 --- a/plugins/PhotonEnergy.java +++ b/plugins/PhotonEnergy.java @@ -161,6 +161,8 @@ public class PhotonEnergy extends Panel { args.put("SENSORS", sensors); args.put("VECTOR", getVector()); args.put("LATENCY", (Double) spinnerLatency.getValue()); + args.put("MODE", radioSwept.isSelected() ? "swept" :"fixed"); + args.put("STEP", (Double) spinnerStep.getValue()); runAsync("PhotonEnergy", args); running = true; } diff --git a/script/PhotonEnergy.py b/script/PhotonEnergy.py index 067d8c64..a14c0210 100644 --- a/script/PhotonEnergy.py +++ b/script/PhotonEnergy.py @@ -4,11 +4,19 @@ 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}) +set_preference(Preference.PLOT_TYPES,{'ImageEnergyDistribution':1}) +set_preference(Preference.PLOT_TYPES,{'ImageAngleDistribution':1}) if len(VECTOR[0]) == 2: #FIXED @@ -16,5 +24,5 @@ if len(VECTOR[0]) == 2: 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)