Commit 60e0334d authored by Andrey Filippov's avatar Andrey Filippov

bug fixes + more verbose output

parent 4e7653fe
...@@ -774,7 +774,7 @@ if (MORE_BUTTONS) { ...@@ -774,7 +774,7 @@ if (MORE_BUTTONS) {
} }
addButton("Lens Center",panelFocusing,color_process); addButton("Lens Center",panelFocusing,color_process);
// if (MORE_BUTTONS) { // if (MORE_BUTTONS) {
addButton("Find Grid",panelFocusing,color_lenses); addButton("Find Grid",panelFocusing,color_process);
// } // }
addButton("Select WOI",panelFocusing,color_lenses); addButton("Select WOI",panelFocusing,color_lenses);
addButton("Reset Histories",panelFocusing,color_lenses); addButton("Reset Histories",panelFocusing,color_lenses);
......
...@@ -4858,6 +4858,13 @@ public boolean LevenbergMarquardt( ...@@ -4858,6 +4858,13 @@ public boolean LevenbergMarquardt(
boolean noTiltScan, boolean noTiltScan,
FocusingFieldMeasurement measurement, FocusingFieldMeasurement measurement,
boolean parallelMove){ boolean parallelMove){
if (debugLevel>0) System.out.println("Calculating optimal focal/tilt, qualBOptimizeMode="+this.qualBOptimizeMode);
testQualB(false); // optimize qualB, store results in this.qualBOptimizationResults
if (debugLevel>0) {
System.out.println("Optimal absolute Zc="+this.qualBOptimizationResults[0]);
System.out.println("Optimal Tx="+this.qualBOptimizationResults[1]);
System.out.println("Optimal Ty="+this.qualBOptimizationResults[2]);
}
if (!testMeasurement( if (!testMeasurement(
measurement, measurement,
zMin, //+best_qb_corr[0], zMin, //+best_qb_corr[0],
...@@ -4870,13 +4877,6 @@ public boolean LevenbergMarquardt( ...@@ -4870,13 +4877,6 @@ public boolean LevenbergMarquardt(
return null; return null;
} }
double [] result=new double [6]; double [] result=new double [6];
if (debugLevel>0) System.out.println("Calculating optimal focal/tilt, qualBOptimizeMode="+this.qualBOptimizeMode);
testQualB(false); // optimize qualB, store results in this.qualBOptimizationResults
if (debugLevel>0) {
System.out.println("Optimal absolute Zc="+this.qualBOptimizationResults[0]);
System.out.println("Optimal Tx="+this.qualBOptimizationResults[1]);
System.out.println("Optimal Ty="+this.qualBOptimizationResults[2]);
}
// double [] best_qb_corr= fieldFitting.getBestQualB( // double [] best_qb_corr= fieldFitting.getBestQualB(
// k_red, // k_red,
...@@ -5023,6 +5023,17 @@ public boolean LevenbergMarquardt( ...@@ -5023,6 +5023,17 @@ public boolean LevenbergMarquardt(
} }
if (!changedEnable) { if (!changedEnable) {
if (debugLevel>0) System.out.println("No filter cnange, finished in "+(n+1)+" step"+((n==0)?"":"s")); if (debugLevel>0) System.out.println("No filter cnange, finished in "+(n+1)+" step"+((n==0)?"":"s"));
if (debugLevel>0) {
System.out.println("=== Absolute shift/tilt from the measuremet ===");
for (int i=0;i<fieldFitting.mechanicalFocusingModel.paramValues.length;i++){
if ((fieldFitting.mechanicalSelect==null) || fieldFitting.mechanicalSelect[i] ) {
System.out.println(
fieldFitting.mechanicalFocusingModel.getDescription(i)+": "+
IJ.d2s(fieldFitting.mechanicalFocusingModel.paramValues[i],3)+" "+
fieldFitting.mechanicalFocusingModel.getUnits(i));
}
}
}
return true; return true;
} else { } else {
if ((was2PrevEnable!=null) && (prevEnable!=null) && (was2PrevEnable.length==prevEnable.length)){ if ((was2PrevEnable!=null) && (prevEnable!=null) && (was2PrevEnable.length==prevEnable.length)){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment