diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 7f3f8df..70e3915 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,8 +1,8 @@ -#Wed Oct 05 09:50:41 CEST 2016 +#Wed Oct 05 10:02:36 CEST 2016 colormap=Grayscale colormapAutomatic=true -colormapMax=10.0 -colormapMin=0.0 +colormapMax=0.0 +colormapMin=19.0 flipHorizontally=false flipVertically=false grayscale=false diff --git a/plugins/Correlation.form b/plugins/Correlation.form index dcf5a3e..54ff670 100644 --- a/plugins/Correlation.form +++ b/plugins/Correlation.form @@ -19,9 +19,9 @@ - - - + + + @@ -73,9 +73,9 @@ - + - + @@ -105,15 +105,15 @@ - - - - - + + + + + diff --git a/plugins/Correlation.java b/plugins/Correlation.java index 699d895..d566b28 100644 --- a/plugins/Correlation.java +++ b/plugins/Correlation.java @@ -151,9 +151,9 @@ public class Correlation extends Panel { .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); - jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3, jLabel4}); + jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3, jLabel4, jLabel5}); - jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerInterval, spinnerWindow}); + jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerInterval, spinnerWindow, textCorrelation}); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -174,14 +174,14 @@ public class Correlation extends Panel { .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(spinnerWindow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE) - .addComponent(buttonStart) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(buttonStop) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 132, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(textCorrelation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE) + .addComponent(buttonStart) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(buttonStop) .addGap(41, 41, 41)) ); @@ -192,9 +192,9 @@ public class Correlation extends Panel { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE) - .addContainerGap()) + .addGap(0, 0, 0) + .addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE) + .addGap(0, 0, 0)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/script/Correlation/Correlation.py b/script/Correlation/Correlation.py index a6334b3..69a6060 100644 --- a/script/Correlation/Correlation.py +++ b/script/Correlation/Correlation.py @@ -2,6 +2,7 @@ import math from mathutils import fit_polynomial, PolynomialFunction from plotutils import plot_line, plot_function +from ch.psi.pshell.swing.Shell import STDOUT_COLOR import org.apache.commons.math3.stat.correlation.PearsonsCorrelation as PearsonsCorrelation if get_context().source == CommandSource.ui: @@ -52,7 +53,7 @@ while(True): if marker is not None: p.removeMarker(marker) marker = p.addMarker(x2+res, p.AxisId.X, s, p.getBackground()) - marker.setLabelPaint(Color.BLACK) + marker.setLabelPaint(STDOUT_COLOR) #Calculate, print and plot linear fit pars_lin = (a0,a1) = fit_polynomial(ay, ax, 1)