diff --git a/config/settings.properties b/config/settings.properties index bcb5952..a12bdf1 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,4 +1,4 @@ -#Tue Sep 29 10:36:31 CEST 2020 +#Wed Sep 30 09:03:39 CEST 2020 HARMONIC_ID_1=1 ENERGY=639.2 OUTLIERS_THRESHOLD=1000000000 diff --git a/config/variables.properties b/config/variables.properties index 6ff24f0..91674cc 100644 --- a/config/variables.properties +++ b/config/variables.properties @@ -1,2 +1,2 @@ -#Tue Sep 29 04:32:04 CEST 2020 -FileSequentialNumber=2333 +#Tue Sep 29 14:16:06 CEST 2020 +FileSequentialNumber=2336 diff --git a/devices/image.properties b/devices/image.properties index 17e7b65..96c73eb 100644 --- a/devices/image.properties +++ b/devices/image.properties @@ -1,4 +1,4 @@ -#Fri Sep 25 21:06:12 CEST 2020 +#Tue Sep 29 11:24:20 CEST 2020 spatialCalOffsetY=NaN spatialCalOffsetX=NaN colormapLogarithmic=false @@ -6,7 +6,7 @@ scale=1.0 grayscale=false spatialCalScaleX=NaN spatialCalScaleY=NaN -colormapMax=0.5 +colormapMax=1.5 rescaleOffset=0.0 roiWidth=-1 colormap=Grayscale @@ -19,7 +19,7 @@ spatialCalUnits=null flipVertically=false roiHeight=-1 flipHorizontally=false -colormapAutomatic=true +colormapAutomatic=false roiY=0 roiX=0 transpose=false diff --git a/plugins/Eiger.form b/plugins/Eiger.form index 71fc3ee..f7b3fad 100644 --- a/plugins/Eiger.form +++ b/plugins/Eiger.form @@ -876,23 +876,21 @@ - + - - - - - - + + + + + + + + + - - - - - diff --git a/plugins/Eiger.java b/plugins/Eiger.java index 5d56c10..4db6daa 100644 --- a/plugins/Eiger.java +++ b/plugins/Eiger.java @@ -1194,20 +1194,18 @@ public class Eiger extends Panel { panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelRoiLayout.createSequentialGroup() .addGap(17, 17, 17) - .addComponent(rendererRoi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(rendererRoi, javax.swing.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(buttonTriggerDetector, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE) - .addComponent(buttonMeasurements, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(buttonRoiRemove, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(buttonRoiAdd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(buttonTriggerDetector, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE) + .addComponent(buttonMeasurements, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(buttonRoiRemove, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(buttonRoiAdd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jLabel26)) .addGap(13, 13, 13)) - .addGroup(panelRoiLayout.createSequentialGroup() - .addGap(472, 472, 472) - .addComponent(jLabel26) - .addGap(182, 182, 182)) ); panelRoiLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonMeasurements, buttonRoiAdd, buttonRoiRemove, buttonShowDetectorPanel, buttonTriggerDetector, jScrollPane1}); diff --git a/plugins/Experiment.form b/plugins/Experiment.form new file mode 100644 index 0000000..451cabe --- /dev/null +++ b/plugins/Experiment.form @@ -0,0 +1,300 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/plugins/Experiment.java b/plugins/Experiment.java new file mode 100644 index 0000000..c62a30e --- /dev/null +++ b/plugins/Experiment.java @@ -0,0 +1,363 @@ +import ch.psi.pshell.ui.Panel; +import ch.psi.utils.State; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.SwingUtilities; + +/** + * + */ +public class Experiment extends Panel { + + public Experiment() { + initComponents(); + } + + //Overridable callbacks + @Override + public void onInitialize(int runCount) { + SwingUtilities.invokeLater(()->{ + undo(); + }); + } + + @Override + public void onStateChange(State state, State former) { + + } + + @Override + public void onExecutedFile(String fileName, Object result) { + } + + + //Callback to perform update - in event thread + @Override + protected void doUpdate() { + } + + + void undo(){ + try { + textDataRoot.setText(getContext().getSetup().expandPath("{data}")); + textDataPath.setText(getContext().getConfig().dataPath); + + textPGroup.setText(getContext().getSetting("pgroup") == null ? "" : getContext().getSetting("pgroup")); + textProposal.setText(getContext().getSetting("proposal") == null ? "" : getContext().getSetting("proposal")); + textProposer.setText(getContext().getSetting("proposer") == null ? "" : getContext().getSetting("proposer")); + textSamples.setText(getContext().getSetting("sample") == null ? "" : getContext().getSetting("sample")); + textAuthors.setText(getContext().getSetting("authors") == null ? "" : getContext().getSetting("authors").replace("|", "\n")); + textPrefix.setText(getContext().getSetting("prefix") == null ? "" : getContext().getSetting("prefix")); + } catch (Exception ex) { + Logger.getLogger(Experiment.class.getName()).log(Level.SEVERE, null, ex); + } + + } + + void apply(){ + + try { + String proposal = textProposal.getText().trim(); + String pgroup = textPGroup.getText().trim(); + String proposer = textProposer.getText().trim(); + String samples = textSamples.getText().trim(); + String authors = textAuthors.getText().trim().replace("\n","|"); + String prefix = textPrefix.getText().trim(); + + getContext().setSetting("pgroup", pgroup); + getContext().setSetting("proposal", proposal); + getContext().setSetting("proposer", proposer); + getContext().setSetting("sample", samples); + getContext().setSetting("authors", authors); + getContext().setSetting("prefix", prefix); + + getContext().getConfig().dataPath = "{data}/{year}/{month}/" + + (proposer.isEmpty() ? "bl-dev" : proposer) + "/" + + (prefix.isEmpty() ? "pshell" : prefix) + "-{date}-{time}-{name}"; + getContext().getConfig().save(); + + } catch (Exception ex) { + Logger.getLogger(Experiment.class.getName()).log(Level.SEVERE, null, ex); + } + undo(); + } + + void reset(){ + + try { + textProposal.setText(""); + textPGroup.setText(""); + textProposer.setText(""); + textSamples.setText(""); + textAuthors.setText(""); + textPrefix.setText(""); + apply(); + } catch (Exception ex) { + Logger.getLogger(Experiment.class.getName()).log(Level.SEVERE, null, ex); + } + undo(); + } + + + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel3 = new javax.swing.JLabel(); + textProposer = new javax.swing.JTextField(); + jLabel4 = new javax.swing.JLabel(); + textProposal = new javax.swing.JTextField(); + jLabel5 = new javax.swing.JLabel(); + textPGroup = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + textSamples = new javax.swing.JTextField(); + jLabel7 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + textAuthors = new javax.swing.JTextArea(); + jLabel8 = new javax.swing.JLabel(); + textPrefix = new javax.swing.JTextField(); + jPanel2 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + textDataRoot = new javax.swing.JTextField(); + textDataPath = new javax.swing.JTextField(); + buttonApply = new javax.swing.JButton(); + buttonUndo = new javax.swing.JButton(); + buttonClear = new javax.swing.JButton(); + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Metadata")); + + jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel3.setText("Proposer:"); + + textProposer.setDisabledTextColor(javax.swing.UIManager.getDefaults().getColor("TextField.foreground")); + + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel4.setText("Proposal:"); + + textProposal.setDisabledTextColor(javax.swing.UIManager.getDefaults().getColor("TextField.foreground")); + + jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel5.setText("P-group:"); + + jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel6.setText("Sample:"); + + jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel7.setText("Authors:"); + + textAuthors.setColumns(20); + textAuthors.setRows(5); + jScrollPane1.setViewportView(textAuthors); + + jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel8.setText("File Prefix:"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(textPrefix) + .addComponent(textSamples) + .addComponent(textProposer, javax.swing.GroupLayout.DEFAULT_SIZE, 547, Short.MAX_VALUE) + .addComponent(jScrollPane1) + .addComponent(textProposal) + .addComponent(textPGroup)) + .addContainerGap()) + ); + + jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel3, jLabel4, jLabel5, jLabel6, jLabel7, jLabel8}); + + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(textPrefix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textProposer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textProposal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textPGroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 43, Short.MAX_VALUE)) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) + .addContainerGap()) + ); + + jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Location")); + + jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel1.setText("Root:"); + + jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + jLabel2.setText("Path:"); + + textDataRoot.setDisabledTextColor(javax.swing.UIManager.getDefaults().getColor("TextField.foreground")); + textDataRoot.setEnabled(false); + + textDataPath.setDisabledTextColor(javax.swing.UIManager.getDefaults().getColor("TextField.foreground")); + textDataPath.setEnabled(false); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2) + .addComponent(jLabel1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(textDataRoot) + .addComponent(textDataPath)) + .addContainerGap()) + ); + + jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2}); + + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(textDataRoot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textDataPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + buttonApply.setText("Apply"); + buttonApply.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonApplyActionPerformed(evt); + } + }); + + buttonUndo.setText("Undo"); + buttonUndo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonUndoActionPerformed(evt); + } + }); + + buttonClear.setText("Reset"); + buttonClear.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonClearActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(buttonClear) + .addGap(18, 18, 18) + .addComponent(buttonUndo) + .addGap(18, 18, 18) + .addComponent(buttonApply) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonApply, buttonUndo}); + + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(buttonApply) + .addComponent(buttonUndo) + .addComponent(buttonClear)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + }// //GEN-END:initComponents + + private void buttonUndoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonUndoActionPerformed + try{ + undo(); + } catch (Exception ex){ + showException(ex); + } + }//GEN-LAST:event_buttonUndoActionPerformed + + private void buttonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonApplyActionPerformed + try{ + apply(); + } catch (Exception ex){ + showException(ex); + } + }//GEN-LAST:event_buttonApplyActionPerformed + + private void buttonClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonClearActionPerformed + try{ + reset(); + } catch (Exception ex){ + showException(ex); + } + }//GEN-LAST:event_buttonClearActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton buttonApply; + private javax.swing.JButton buttonClear; + private javax.swing.JButton buttonUndo; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextArea textAuthors; + private javax.swing.JTextField textDataPath; + private javax.swing.JTextField textDataRoot; + private javax.swing.JTextField textPGroup; + private javax.swing.JTextField textPrefix; + private javax.swing.JTextField textProposal; + private javax.swing.JTextField textProposer; + private javax.swing.JTextField textSamples; + // End of variables declaration//GEN-END:variables +} diff --git a/script/devices/diag.py b/script/devices/diag.py index d21a1de..e01ad10 100644 --- a/script/devices/diag.py +++ b/script/devices/diag.py @@ -69,12 +69,12 @@ def get_diags(): try: ret[k]=str(v.read()) except: - ret[k]="Error: " + sys.exc_info()[1] + ret[k]="Error: " + str(sys.exc_info()[1]) for k,v in diag_channels.items(): try: ret[k]=caget(v,'s') except: - ret[k]="Error: " + sys.exc_info()[1] + ret[k]="Error: " + str(sys.exc_info()[1]) ret["exposure time"] = str(eiger.getExposure()) return OrderedDict(sorted(ret.items(), key=lambda i: i[0].lower()))