diff --git a/plugins/HoloScan.form b/plugins/HoloScan.form
index 6e29885b..145452f4 100644
--- a/plugins/HoloScan.form
+++ b/plugins/HoloScan.form
@@ -438,7 +438,6 @@
-
diff --git a/plugins/HoloScan.java b/plugins/HoloScan.java
index 02ba0684..ee87d454 100644
--- a/plugins/HoloScan.java
+++ b/plugins/HoloScan.java
@@ -339,7 +339,6 @@ public class HoloScan extends Panel {
checkImageIntegration.setContentAreaFilled(false);
checkImageIntegration.setName("EnergyDistribution"); // NOI18N
- checkSpectrum.setSelected(true);
checkSpectrum.setText("Scienta Spectrum");
checkSpectrum.setName("Scienta.spectrum"); // NOI18N
diff --git a/plugins/ManipulatorScan.form b/plugins/ManipulatorScan.form
index 335f96e1..2ef249bc 100644
--- a/plugins/ManipulatorScan.form
+++ b/plugins/ManipulatorScan.form
@@ -435,7 +435,6 @@
-
@@ -450,7 +449,6 @@
-
diff --git a/plugins/ManipulatorScan.java b/plugins/ManipulatorScan.java
index c2ae3f81..cffc9bae 100644
--- a/plugins/ManipulatorScan.java
+++ b/plugins/ManipulatorScan.java
@@ -359,7 +359,6 @@ public class ManipulatorScan extends Panel {
checkCur2.setText("Ref Current");
checkCur2.setName("RefCurrent"); // NOI18N
- checkImage.setSelected(true);
checkImage.setText("Scienta Image");
checkImage.setToolTipText("");
checkImage.setContentAreaFilled(false);
@@ -368,7 +367,6 @@ public class ManipulatorScan extends Panel {
checkCur3.setText("Aux Current");
checkCur3.setName("AuxCurrent"); // NOI18N
- checkSpectrum.setSelected(true);
checkSpectrum.setText("Scienta Spectrum");
checkSpectrum.setName("Scienta.spectrum"); // NOI18N
diff --git a/plugins/PhotonEnergy.form b/plugins/PhotonEnergy.form
index 8bf05a1c..f710b6ca 100644
--- a/plugins/PhotonEnergy.form
+++ b/plugins/PhotonEnergy.form
@@ -463,7 +463,6 @@
-
diff --git a/plugins/PhotonEnergy.java b/plugins/PhotonEnergy.java
index 1e45704e..4dc652ac 100644
--- a/plugins/PhotonEnergy.java
+++ b/plugins/PhotonEnergy.java
@@ -443,7 +443,6 @@ public class PhotonEnergy extends Panel {
checkImageIntegration.setContentAreaFilled(false);
checkImageIntegration.setName("EnergyDistribution"); // NOI18N
- checkSpectrum.setSelected(true);
checkSpectrum.setText("Scienta Spectrum");
checkSpectrum.setName("Scienta.spectrum"); // NOI18N
diff --git a/script/HoloScan.py b/script/HoloScan.py
index 601002d7..a34a886b 100644
--- a/script/HoloScan.py
+++ b/script/HoloScan.py
@@ -15,4 +15,5 @@ ZIGZAG (BOOLEAN)
#set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
adjust_sensors()
set_adc_averaging()
+set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=trig_scienta, after_read = after_readout)
\ No newline at end of file
diff --git a/script/ManipulatorScan.py b/script/ManipulatorScan.py
index dfcfee66..9975e7ad 100644
--- a/script/ManipulatorScan.py
+++ b/script/ManipulatorScan.py
@@ -12,4 +12,5 @@ RELATIVE (BOOLEAN)
#set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
adjust_sensors()
set_adc_averaging()
+set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=trig_scienta, after_read = after_readout)
\ No newline at end of file
diff --git a/script/PhotonEnergy.py b/script/PhotonEnergy.py
index faa93b01..b7a3c8f9 100644
--- a/script/PhotonEnergy.py
+++ b/script/PhotonEnergy.py
@@ -11,7 +11,6 @@ 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()
@@ -23,5 +22,6 @@ if len(VECTOR[0]) == 2:
else:
#SWEPT
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
-print SENSORS
+
+set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta, after_read = after_readout)
diff --git a/script/XPSSpectrum.py b/script/XPSSpectrum.py
index 5be2e690..a9a6ace0 100644
--- a/script/XPSSpectrum.py
+++ b/script/XPSSpectrum.py
@@ -3,7 +3,6 @@
# pass_energy
#
# skip_iteration: if set to 1 then skips after end of current iteration
-
from ch.psi.pshell.data.LayoutDefault import ATTR_WRITABLE_DIMENSION as ATTR_WRITABLE_DIMENSION
cur_range = 0
@@ -20,7 +19,21 @@ Scienta.passEnergy = pass_energy
names=[]
for i in range(len(ranges)):
names.append(str(ranges[i]))
+names.append("Spectrum")
plots = plot(None, names)
+spectrum_series = plots[len(names)-1].getSeries(0)
+def plot_cur_spectrum():
+ global spectrum_series
+ try:
+ while True:
+ y = Scienta.spectrum.take(100)
+ x = Scienta.spectrumX
+ spectrum_series.setData(x, y)
+ time.sleep(1.0)
+ finally:
+ print "Stopping spectrum plotting"
+task = None
+
try:
for cur_range in range(len(ranges)):
cur_iteration = 0
@@ -39,6 +52,8 @@ try:
#iterations done in script
xdata = None
ydata = None
+ task = fork(plot_cur_spectrum)
+
for cur_iteration in range(vars[2]):
plots[cur_range].setTitle(str(ranges[cur_range]) + " - iteration " + str(cur_iteration+1))
trig_scienta()
@@ -80,4 +95,5 @@ finally:
if not Scienta.isReady():
Scienta.stop()
Scienta.update()
+ task[0].cancel(True)
set_return(to_array(ret,'o'))
\ No newline at end of file