Commit 81b73514 authored by Andrey Filippov's avatar Andrey Filippov

Debugging

parent 46292639
......@@ -3865,6 +3865,10 @@ if (MORE_BUTTONS) {
IJ.showMessage("LENS_DISTORTION_PARAMETERS is not set");
return;
}
// CLear histories anyway
MOTORS.clearPreFocus();
MOTORS.clearHistory();
int mode=autoMove? (FOCUS_MEASUREMENT_PARAMETERS.confirmFirstAuto?2:3):1;
// not to forget to reset history after forcusing lens by thread
if (autoMove) MOTORS.clearPreFocus();
......
......@@ -4900,12 +4900,25 @@ public boolean LevenbergMarquardt(
result[1]=zTilts[1]-this.qualBOptimizationResults[1];
result[2]=zTilts[2]-this.qualBOptimizationResults[2];
double [] zm=null;
if (parallelMove){
// if (parallelMove){
zm=new double [3];
for (int i=0;i<zm.length;i++) zm[i]=fieldFitting.mechanicalFocusingModel.mToZm(measurement.motors[i], i);
// }
if (this.debugLevel>0){
System.out.println("Current linearized motor positions:");
for (int i=0;i<zm.length;i++) {
System.out.println(i+": "+zm[i]+" um");
}
System.out.println("Checking back to motor positions:");
double [] rzm=new double [3];
for (int i=0;i<zm.length;i++) zm[i]=fieldFitting.mechanicalFocusingModel.zmToM(zm[i], i);
for (int i=0;i<zm.length;i++) {
System.out.println(i+": "+rzm[i]+" um (was "+measurement.motors[i]);
}
}
double [] dm= getAdjustedMotors(
zm,
parallelMove?zm:null,
targetRelFocalShift+this.qualBOptimizationResults[0] , //targetRelFocalShift+best_qb_corr[0],
this.qualBOptimizationResults[1], //0.0, // targetTiltX, // for testing, normally should be 0 um/mm
this.qualBOptimizationResults[2], //0.0, // targetTiltY,
......
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