From 5b142242c66fa270204d941765838de8e81a5494 Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Wed, 17 Jun 2020 15:26:36 +0200 Subject: [PATCH] Closedown --- config/devices.properties | 1 + config/variables.properties | 4 ++-- plugins/HarmonicScan.form | 19 +++++++++---------- plugins/HarmonicScan.java | 14 +++++++------- script/HarmonicScan.py | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config/devices.properties b/config/devices.properties index 48d5a03..997d62c 100755 --- a/config/devices.properties +++ b/config/devices.properties @@ -1,3 +1,4 @@ +$pol_offset=ch.psi.pshell.epics.ChannelDouble||||false $det=ch.psi.pshell.epics.AreaDetector|13SIM1|||false det2=ch.psi.pshell.epics.AreaDetector|CCCC||| image=ch.psi.pshell.imaging.CameraSource|det||-500|false diff --git a/config/variables.properties b/config/variables.properties index db27703..8deef25 100644 --- a/config/variables.properties +++ b/config/variables.properties @@ -1,2 +1,2 @@ -#Fri Jun 05 16:58:59 CEST 2020 -FileSequentialNumber=330 +#Wed Jun 17 11:25:33 CEST 2020 +FileSequentialNumber=333 diff --git a/plugins/HarmonicScan.form b/plugins/HarmonicScan.form index 891c9eb..47f94f8 100644 --- a/plugins/HarmonicScan.form +++ b/plugins/HarmonicScan.form @@ -33,9 +33,9 @@ - - - + + + @@ -78,7 +78,7 @@ - + @@ -149,13 +149,12 @@ - + - - - - - + + + + diff --git a/plugins/HarmonicScan.java b/plugins/HarmonicScan.java index e867bd4..f8ecf66 100644 --- a/plugins/HarmonicScan.java +++ b/plugins/HarmonicScan.java @@ -80,8 +80,8 @@ public class HarmonicScan extends Panel { String selection = comboSetup.getSelectedItem().toString(); String val = prop.getProperty(selection); String[] tokens = val.split(" "); - if (tokens.length != 8) { - throw new Exception("Invalid file format"); + if (tokens.length != 1) { + throw new Exception("Invalid file format: " + tokens.length); } spinnerEnergy.setValue(Double.valueOf(tokens[0].trim())); } @@ -105,7 +105,7 @@ public class HarmonicScan extends Panel { args.put("ID_ENERGY", (Double) spinnerEnergy.getValue()); args.put("HALFWIDTH", (Double) spinnerHalfwidth.getValue()); args.put("STEP", (Double) spinnerStep.getValue()); - args.put("POLARIZATION ", comboPolarizarion.getSelectedItem().toString()); + args.put("MODE ", comboPolarizarion.getSelectedItem().toString()); runAsync("HarmonicScan", args); } @@ -151,7 +151,7 @@ public class HarmonicScan extends Panel { jLabel11.setText("Polarization:"); - comboPolarizarion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Manual", "Circ+", "Circ-", "LinV", "LinH", " " })); + comboPolarizarion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Manual", "CIRC +", "CIRC -", "LINEAR H", "LINEAR V" })); jLabel1.setText("Energy"); @@ -189,7 +189,7 @@ public class HarmonicScan extends Panel { .addComponent(spinnerHalfwidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(spinnerStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(spinnerEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(9, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonConfigure, comboPolarizarion, comboSetup}); @@ -274,9 +274,9 @@ public class HarmonicScan extends Panel { layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); }// //GEN-END:initComponents diff --git a/script/HarmonicScan.py b/script/HarmonicScan.py index 5f69cac..7f4387a 100644 --- a/script/HarmonicScan.py +++ b/script/HarmonicScan.py @@ -37,7 +37,7 @@ try: sleep( 0.3 ) # Settling time #ret = lscan(energy, [signal_i0, signal_tey, 'ca://X07MA-PC-K428:2:getTotalGain', 'ca://X07MA-ID:MODE?type=d', pol_angle, current, energy, pol_offset, 'ca://X07MA-ID-GAP:READ','ca://X07MA-ID-SHIFT:READ'], ID_ENERGY-HALFWIDTH, ID_ENERGY+HALFWIDTH, STEP, before_read = before) - ret = lscan(energy, [signal_i0, signal_tey, 'ca://X07MA-PC-K428:2:getTotalGain', energy], ID_ENERGY-HALFWIDTH, ID_ENERGY+HALFWIDTH, STEP, before_read = before) + ret = lscan(energy, sensors, ID_ENERGY-HALFWIDTH, ID_ENERGY+HALFWIDTH, STEP, before_read = before) xdata = ret.getPositions(0) ydata = ret.getReadable(0) ymin = min(ydata)