if (DEBUG_LEVEL>0) System.out.println(((this.SYNC_COMMAND.stopRequested.get()>0)?"Partial (interrupted by user) set of grids":"All")+ " grids calculation done at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
if (DEBUG_LEVEL>0) System.out.println(((this.SYNC_COMMAND.stopRequested.get()>0)?"Partial (interrupted by user) set of grids":"All")+ " grids calculation done at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
if (DEBUG_LEVEL>0) System.out.println(((this.SYNC_COMMAND.stopRequested.get()>0)?"Partial (interrupted by user) set of grids":"All")+ " grids calculation done at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
public boolean showPatternDetectParametersDialog(MatchSimulatedPattern.PatternDetectParameters patternDetectParameters) {
public boolean showPatternDetectParametersDialog(MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, boolean use_lwir) {
///gaussWidth
///gaussWidth
GenericDialog gd = new GenericDialog("Parameters");
GenericDialog gd = new GenericDialog("Parameters");
gd.addNumericField("Gaussian width for the window function (<=0 - use Hamming):", patternDetectParameters.gaussWidth, 3);
gd.addNumericField("Gaussian width for the window function (<=0 - use Hamming):", patternDetectParameters.gaussWidth, 3);
...
@@ -19844,16 +20023,30 @@ use the result to create a rejectiobn mask - if the energy was high, (multiplica
...
@@ -19844,16 +20023,30 @@ use the result to create a rejectiobn mask - if the energy was high, (multiplica
gd.addNumericField("Minimal pattern correlation contrast" , patternDetectParameters.minCorrContrast, 3); //5.0; // Discrimination threshold between good and bad pattern correleation
gd.addNumericField("Minimal pattern correlation contrast" , patternDetectParameters.minCorrContrast, 3); //5.0; // Discrimination threshold between good and bad pattern correleation
gd.addNumericField("Minimal pattern grid period (<=0.0 - do not check)" , patternDetectParameters.minGridPeriod, 2,5,"pix");
gd.addNumericField("Minimal pattern grid period (<=0.0 - do not check)" , patternDetectParameters.minGridPeriod, 2,5,"pix");
gd.addNumericField("Maximal pattern grid period (<=0.0 - do not check)" , patternDetectParameters.maxGridPeriod, 2,5,"pix");
gd.addNumericField("Maximal pattern grid period (<=0.0 - do not check)" , patternDetectParameters.maxGridPeriod, 2,5,"pix");
if (use_lwir) {
gd.addNumericField("Minimal pattern grid period for LWIR sensors (<=0.0 - do not check)" , patternDetectParameters.minGridPeriodLwir, 2,5,"pix");
gd.addNumericField("Maximal pattern grid period for LWIR sensors (<=0.0 - do not check)" , patternDetectParameters.maxGridPeriodLwir, 2,5,"pix");
}
gd.addMessage("----- debug -----");
gd.addMessage("----- debug -----");
gd.addNumericField("Debug grid near pixel X" , patternDetectParameters.debugX, 1,6,"pix");
gd.addNumericField("Debug grid near pixel X" , patternDetectParameters.debugX, 1,6,"pix");
gd.addNumericField("Debug grid near pixel X" , patternDetectParameters.debugY, 1,6,"pix");
gd.addNumericField("Debug grid near pixel X" , patternDetectParameters.debugY, 1,6,"pix");
gd.addNumericField("Debug grid nodes at this distance of (x,Y) - <0 - no debug", patternDetectParameters.debugRadius, 1,5,"pix");
gd.addNumericField("Debug grid nodes at this distance of (x,Y) - <0 - no debug", patternDetectParameters.debugRadius, 1,5,"pix");
gd.addMessage("----- New method that should work with large cells (only half-period negative correlations fit in window) -----");
gd.addCheckbox("Keep Gaussian width absolute when increasing FFT size",distortionParameters.absoluteCorrelationGaussWidth);
gd.addCheckbox("Keep Gaussian width absolute when increasing FFT size",distortionParameters.absoluteCorrelationGaussWidth);
...
@@ -20108,23 +20325,25 @@ use the result to create a rejectiobn mask - if the energy was high, (multiplica
...
@@ -20108,23 +20325,25 @@ use the result to create a rejectiobn mask - if the energy was high, (multiplica
gd.addNumericField("Correlation minimal contrast for initial search (absolute)", distortionParameters.correlationMinAbsoluteInitialContrast, 3);
gd.addNumericField("Correlation minimal contrast for initial search (absolute)", distortionParameters.correlationMinAbsoluteInitialContrast, 3);
gd.addNumericField("Decrease contrast of cells that are too close to the border to be processed in refinement pass", distortionParameters.scaleFirstPassContrast, 3);
gd.addNumericField("Decrease contrast of cells that are too close to the border to be processed in refinement pass", distortionParameters.scaleFirstPassContrast, 3);
gd.addNumericField("Gaussian sigma to select correlation centers (fraction of UV period), 0.1", distortionParameters.contrastSelectSigma, 3);
gd.addNumericField("Gaussian sigma to select correlation center in pixels, 2.0", distortionParameters.contrastSelectSigmaCenter, 3);
gd.addNumericField("Gaussian sigma to select correlation off-centers (fraction of UV period), 0.1", distortionParameters.contrastSelectSigma, 3);
gd.addNumericField("Gaussian sigma to average correlation variations (as contrast reference), 0.5", distortionParameters.contrastAverageSigma, 3);
gd.addNumericField("Gaussian sigma to average correlation variations (as contrast reference), 0.5", distortionParameters.contrastAverageSigma, 3);
@@ -139,14 +137,14 @@ public class EyesisAberrations {
...
@@ -139,14 +137,14 @@ public class EyesisAberrations {
if(showResult){
if(showResult){
impInvertedPSF.getProcessor().resetMinAndMax();// imp_psf will be reused
impInvertedPSF.getProcessor().resetMinAndMax();// imp_psf will be reused
impInvertedPSF.show();
impInvertedPSF.show();
}
}
if(saveResult){
if(saveResult){
if(globalDebugLevel>0)System.out.println((numProcessed+1)+" of "+numToProcess+": saving invered (of the file"+srcPaths[nChn]+") kernel to "+resultPaths[nChn]+" at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
if(globalDebugLevel>0)System.out.println((numProcessed+1)+" of "+numToProcess+": saving invered (of the file"+srcPaths[nChn]+") kernel to "+resultPaths[nChn]+" at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
multiFilePSF,// MULTIFILE_PSF = new EyesisAberrations.MultiFilePSF(
multiFilePSF,// MULTIFILE_PSF = new EyesisAberrations.MultiFilePSF(
...
@@ -1433,7 +1435,7 @@ public class EyesisAberrations {
...
@@ -1433,7 +1435,7 @@ public class EyesisAberrations {
thisDebugLevel,
thisDebugLevel,
globalDebugLevel);
globalDebugLevel);
if(OK&&(globalDebugLevel>0))System.out.println("Saved combined kernel for channel "+nChn+" to"+resultPaths[nChn]+" at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
if(OK&&(globalDebugLevel>0))System.out.println("Saved combined kernel for channel "+nChn+" to"+resultPaths[nChn]+" at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
" this radius ={"+psfRadius[0][worstFile+1][index]+","+psfRadius[1][worstFile+1][index]+","+psfRadius[2][worstFile+1][index]+"}\n"+
" this radius ={"+psfRadius[0][worstFile+1][index]+","+psfRadius[1][worstFile+1][index]+","+psfRadius[2][worstFile+1][index]+"}\n"+
" mean radius ={"+radiusRatio[0][0][index]+","+radiusRatio[1][0][index]+","+radiusRatio[2][0][index]+"}\n"+
" mean radius ={"+radiusRatio[0][0][index]+","+radiusRatio[1][0][index]+","+radiusRatio[2][0][index]+"}\n"+
" this center X={"+pxfCenterX[0][worstFile+1][index]+","+pxfCenterX[1][worstFile+1][index]+","+pxfCenterX[2][worstFile+1][index]+"}\n"+
" this center X={"+pxfCenterX[0][worstFile+1][index]+","+pxfCenterX[1][worstFile+1][index]+","+pxfCenterX[2][worstFile+1][index]+"}\n"+
" mean center X={"+pxfCenterX[0][0][index]+","+pxfCenterX[1][0][index]+","+pxfCenterX[2][0][index]+"}\n"+
" mean center X={"+pxfCenterX[0][0][index]+","+pxfCenterX[1][0][index]+","+pxfCenterX[2][0][index]+"}\n"+
" this center Y={"+pxfCenterY[0][worstFile+1][index]+","+pxfCenterY[1][worstFile+1][index]+","+pxfCenterY[2][worstFile+1][index]+"}\n"+
" this center Y={"+pxfCenterY[0][worstFile+1][index]+","+pxfCenterY[1][worstFile+1][index]+","+pxfCenterY[2][worstFile+1][index]+"}\n"+
" mean center Y={"+pxfCenterY[0][0][index]+","+pxfCenterY[1][0][index]+","+pxfCenterY[2][0][index]+"}");
" mean center Y={"+pxfCenterY[0][0][index]+","+pxfCenterY[1][0][index]+","+pxfCenterY[2][0][index]+"}");
}
}
if(numSamples<1)break;// nothing left
if(numSamples<1)break;// nothing left
if(worstDiff>multiFilePSF.radiusDiffHigh){
if(worstDiff>multiFilePSF.radiusDiffHigh){
if((numSamples==1)&&(globalDebugLevel>0)){
if((numSamples==1)&&(globalDebugLevel>0)){
System.out.println("PSF size for the cell "+tileX+":"+tileY+", file# "+worstFile+" varies too much from the neighbor cells, so it is removed, creating a gap");
System.out.println("PSF size for the cell "+tileX+":"+tileY+", file# "+worstFile+" varies too much from the neighbor cells, so it is removed, creating a gap");
...
@@ -1733,14 +1735,14 @@ public class EyesisAberrations {
...
@@ -1733,14 +1735,14 @@ public class EyesisAberrations {
weights[0][index]+=weights[nFile+1][index];
weights[0][index]+=weights[nFile+1][index];
}
}
}
}
// for each channel, each cell - compare radius calculated for neighbors (use masked weights) and the cell
// for each channel, each cell - compare radius calculated for neighbors (use masked weights) and the cell
// TODO: Filter out outlayers: Add bonus to cells surrounded by others?
// TODO: Filter out outlayers: Add bonus to cells surrounded by others?
// double [][][][] c= new double[numResults][nChn][nFiles+1][kLength];
// double [][][][] c= new double[numResults][nChn][nFiles+1][kLength];
// fht_instance.debug=(centerXY[0]-Math.round(centerXY[0]))<-0.4; // just reducing number
// fht_instance.debug=(centerXY[0]-Math.round(centerXY[0]))<-0.4; // just reducing number
pixelsPSF=fht_instance.translateSubPixel(
pixelsPSF=fht_instance.translateSubPixel(
...
@@ -3549,14 +3557,14 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
...
@@ -3549,14 +3557,14 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
if(debugLevel>2)System.out.println("Centroid after second binPSF: x="+IJ.d2s(centroidXY[0],3)+" y="+IJ.d2s(centroidXY[1],3)+" center was at x="+IJ.d2s(centerXY[0],3)+" y="+IJ.d2s(centerXY[1],3));
if(debugLevel>2)System.out.println("Centroid after second binPSF: x="+IJ.d2s(centroidXY[0],3)+" y="+IJ.d2s(centroidXY[1],3)+" center was at x="+IJ.d2s(centerXY[0],3)+" y="+IJ.d2s(centerXY[1],3));
}
}
/* compensate center point and/or add center-symmetrical points if enabled */
/* compensate center point and/or add center-symmetrical points if enabled */
gd.addCheckbox("Autoload additional files on \"Restore\"",this.autoRestore);
gd.addCheckbox("Autoload additional files on \"Restore\"",this.autoRestore);
gd.addCheckbox("Overwrite all (including position/orientation) SFE parameters from the sensor calibration files (at auto-load) DANGEROUS!",this.autoRestoreSensorOverwriteOrientation);
gd.addCheckbox("Overwrite all (including position/orientation) SFE parameters from the sensor calibration files (at auto-load) DANGEROUS!",this.autoRestoreSensorOverwriteOrientation);
gd.addCheckbox("Overwrite SFE distortion parameters from the sensor calibration files (at auto-load) DANGEROUS!",this.autoRestoreSensorOverwriteDistortion);
gd.addCheckbox("Overwrite SFE distortion parameters from the sensor calibration files (at auto-load) DANGEROUS!",this.autoRestoreSensorOverwriteDistortion);
gd.addCheckbox("Re-calibrate grids on autoload",this.autoReCalibrate);
gd.addCheckbox("Re-calibrate grids on autoload",this.autoReCalibrate);
gd.addCheckbox("Ignore laser pointers on recalibrate",this.autoReCalibrateIgnoreLaser);
gd.addCheckbox("Ignore laser pointers on recalibrate",this.autoReCalibrateIgnoreLaser);
gd.addCheckbox("Filter grids after restore",this.autoFilter);
gd.addCheckbox("Filter grids after restore",this.autoFilter);
gd.addCheckbox("Trust enabled images on input (mark as hintedGrid=2)",this.trustEnabled);
gd.addCheckbox("Trust enabled images on input (mark as hintedGrid=2)",this.trustEnabled);
numAbsolutePoints=matchSimulatedPattern.calculateDistortions(// allow more of grid around pointers?
numAbsolutePoints=matchSimulatedPattern.calculateDistortions(// allow more of grid around pointers?
null,// LwirReaderParameters lwirReaderParameters, // null is OK
distortionParameters,//
distortionParameters,//
patternDetectParameters,
patternDetectParameters,
// patternDetectParameters.minGridPeriod/2,
// patternDetectParameters.maxGridPeriod/2,
simulParameters,
simulParameters,
equalizeGreens,
equalizeGreens,
imp_eq,
imp_eq,
...
@@ -201,7 +207,7 @@ public class LensAdjustment {
...
@@ -201,7 +207,7 @@ public class LensAdjustment {
returnnumAbsolutePoints;
returnnumAbsolutePoints;
}
}
publicstaticclassFocusMeasurementParameters{
publicstaticclassFocusMeasurementParameters{
publicStringgridGeometryFile="";
publicStringgridGeometryFile="";
publicStringinitialCalibrationFile="";
publicStringinitialCalibrationFile="";
...
@@ -216,15 +222,15 @@ public class LensAdjustment {
...
@@ -216,15 +222,15 @@ public class LensAdjustment {
publicStringserialNumber="";// camera serial number string
publicStringserialNumber="";// camera serial number string
publicdoublesensorTemperature=Double.NaN;// last measured sensor temperature
publicdoublesensorTemperature=Double.NaN;// last measured sensor temperature
//other summary results to be saved with parameters
//other summary results to be saved with parameters
publicdoubleresult_lastKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from last run
publicdoubleresult_lastKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from last run
publicdoubleresult_lastFD20=Double.NaN;// focal distance for 20C, measured from last run
publicdoubleresult_lastFD20=Double.NaN;// focal distance for 20C, measured from last run
publicdoubleresult_allHistoryKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
publicdoubleresult_allHistoryKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
publicdoubleresult_allHistoryFD20=Double.NaN;// focal distance for 20C, measured from all the measurement histgory
publicdoubleresult_allHistoryFD20=Double.NaN;// focal distance for 20C, measured from all the measurement histgory
publicdoubleresult_fDistance=Double.NaN;// last measured focal distance
publicdoubleresult_fDistance=Double.NaN;// last measured focal distance
publicdoubleresult_tiltX=Double.NaN;// last measured tilt X
publicdoubleresult_tiltX=Double.NaN;// last measured tilt X
publicdoubleresult_tiltY=Double.NaN;// last measured tilt Y
publicdoubleresult_tiltY=Double.NaN;// last measured tilt Y
publicdoubleresult_R50=Double.NaN;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
publicdoubleresult_R50=Double.NaN;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
publicdoubleresult_A50=Double.NaN;// last measured A50 (simailar, but R^2 are averaged)
publicdoubleresult_A50=Double.NaN;// last measured A50 (simailar, but R^2 are averaged)
publicdoubleresult_B50=Double.NaN;// last measured B50 (simailar, but R^4 are averaged)
publicdoubleresult_B50=Double.NaN;// last measured B50 (simailar, but R^4 are averaged)
publicdoubleresult_RC50=Double.NaN;// last measured RC50(R50 calculated only for the 2 center samples)
publicdoubleresult_RC50=Double.NaN;// last measured RC50(R50 calculated only for the 2 center samples)
publicdoubleresult_PX0=Double.NaN;// lens center shift, X
publicdoubleresult_PX0=Double.NaN;// lens center shift, X
...
@@ -237,10 +243,10 @@ public class LensAdjustment {
...
@@ -237,10 +243,10 @@ public class LensAdjustment {
publicintlensSerialLength=4;
publicintlensSerialLength=4;
publicStringlensSerial="";// Lens serial number
publicStringlensSerial="";// Lens serial number
publicbooleanaskLensSerial=true;// Ask lens serial on camera power cycle
publicbooleanaskLensSerial=true;// Ask lens serial on camera power cycle
publicdoublereportTemperature=50;// temperature to report focal length
publicdoublereportTemperature=50;// temperature to report focal length
publicbooleanshowLegacy=false;// Show old focusing parameters (most are not supported anyway)
publicbooleanshowLegacy=false;// Show old focusing parameters (most are not supported anyway)
publicbooleanincludeLensSerial=true;// add lens serial to config filename
publicbooleanincludeLensSerial=true;// add lens serial to config filename
publicdoublecenterDeltaX=0.0;// required X-difference between lens center and sensor center
publicdoublecenterDeltaX=0.0;// required X-difference between lens center and sensor center
publicdoublecenterDeltaY=0.0;// required Y-difference between lens center and sensor center
publicdoublecenterDeltaY=0.0;// required Y-difference between lens center and sensor center
// with the seam in the middle - make even # of samples horizontally
// with the seam in the middle - make even # of samples horizontally
// to be made private or removed
// to be made private or removed
...
@@ -258,34 +264,34 @@ public class LensAdjustment {
...
@@ -258,34 +264,34 @@ public class LensAdjustment {
publicbooleanshowAcquiredImages=false;
publicbooleanshowAcquiredImages=false;
publicbooleanshowROI=true;
publicbooleanshowROI=true;
publicbooleanshowSamples=true;
publicbooleanshowSamples=true;
publicbooleanshowFittedParameters=true;
publicbooleanshowFittedParameters=true;
publicbooleanuseHeadLasers=true;
publicbooleanuseHeadLasers=true;
// when approximating PSF with a second degree polynomial:
// when approximating PSF with a second degree polynomial:
publicdoublepsf_cutoffEnergy=0.98;//0.5; // disregard pixels outside of this fraction of the total energy
publicdoublepsf_cutoffEnergy=0.98;//0.5; // disregard pixels outside of this fraction of the total energy
publicdoublepsf_cutoffLevel=0.2;// disregard pixels below this fraction of the maximal value
publicdoublepsf_cutoffLevel=0.2;// disregard pixels below this fraction of the maximal value
publicintpsf_minArea=10;// continue increasing the selected area, even if beyond psf_cutoffEnergy and psf_cutoffLevel,
publicintpsf_minArea=10;// continue increasing the selected area, even if beyond psf_cutoffEnergy and psf_cutoffLevel,
// if the selected area is smaller than this (so approximation would work)
// if the selected area is smaller than this (so approximation would work)
publicdoublepsf_blurSigma=0.0;// optionally blur the calculated mask
publicdoublepsf_blurSigma=0.0;// optionally blur the calculated mask
publicdoubleweightRatioRedToGreen=0.7;// Use this data when combining defocusing data from different color PSF
publicdoubleweightRatioRedToGreen=0.7;// Use this data when combining defocusing data from different color PSF
publicdoubleweightRatioBlueToGreen=0.2;
publicdoubleweightRatioBlueToGreen=0.2;
publicdoubletargetFarNear=0.0;// OBSOLETE target logarithm of average tangential-to-radial resolution
publicdoubletargetFarNear=0.0;// OBSOLETE target logarithm of average tangential-to-radial resolution
publicbooleanuseRadialTangential=false;// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
publicbooleanuseRadialTangential=false;// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
publicdoubletargetMicrons=0.0;// target lens center distance (away from "best focus"
publicdoubletargetMicrons=0.0;// target lens center distance (away from "best focus"
publicdoubletoleranceMicrons=0.5;// microns
publicdoubletoleranceMicrons=0.5;// microns
publicdoubletoleranceTilt=0.02;//
publicdoubletoleranceTilt=0.02;//
publicdoubletoleranceThreshold=3.0;// When each error is under scaled threshold, reduce correction step twice
publicdoubletoleranceThreshold=3.0;// When each error is under scaled threshold, reduce correction step twice
// public boolean parallelAdjust=true; // move 3 motors parallel after each 3-motor focus/tilt adjustment
// public boolean parallelAdjust=true; // move 3 motors parallel after each 3-motor focus/tilt adjustment
publicdoubleparallelAdjustThreshold=4.0;// adjust 3 motors parallel if focal distance error in the center exceeds this
publicdoubleparallelAdjustThreshold=4.0;// adjust 3 motors parallel if focal distance error in the center exceeds this
publicdoublemotorsSigma=896.0;// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma 1/4 turn
publicdoublemotorsSigma=896.0;// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma 1/4 turn
publicdoublemotorsSigma3=896.0;// all 3 motors together (focusing center)
publicdoublemotorsSigma3=896.0;// all 3 motors together (focusing center)
publicdoublemotorsMinSigma=200.0;// sigma will not drop below this value when fitting walk is getting smaller
publicdoublemotorsMinSigma=200.0;// sigma will not drop below this value when fitting walk is getting smaller
publicdoublemotorsVarSigmaToTravel=2.0;// when walk is getting smaller, sigma will keep going down proportionally
publicdoublemotorsVarSigmaToTravel=2.0;// when walk is getting smaller, sigma will keep going down proportionally
publicdoublemotorsFadeSigma=0.3;// after each step new sigma will have this part of the calculated from the travel
publicdoublemotorsFadeSigma=0.3;// after each step new sigma will have this part of the calculated from the travel
publicdoublemotorsOverShootToBalance=0.9;//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
publicdoublemotorsOverShootToBalance=0.9;//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
publicbooleanfilterGoodDistance=true;// when measuring tilt, use those with good center with higher weight
publicbooleanfilterGoodDistance=true;// when measuring tilt, use those with good center with higher weight
publicdoublegoodDistanceSigma=5.0;// sigma for the weight function of tilt measurements, depending on the center distance error
publicdoublegoodDistanceSigma=5.0;// sigma for the weight function of tilt measurements, depending on the center distance error
...
@@ -295,15 +301,15 @@ public class LensAdjustment {
...
@@ -295,15 +301,15 @@ public class LensAdjustment {
publicdoubleprobe_M1M2M3=448.0;// how far to move average of the 3 motors: (M1+M2+M3)/3
publicdoubleprobe_M1M2M3=448.0;// how far to move average of the 3 motors: (M1+M2+M3)/3
publicdoubleprobe_M3_M1M2=3584.0;// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
publicdoubleprobe_M3_M1M2=3584.0;// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
publicdoubleprobe_M2_M1=3584.0;// how far to move M2 opposite to M1: M2-M1
publicdoubleprobe_M2_M1=3584.0;// how far to move M2 opposite to M1: M2-M1
publicdoublesigmaToProbe=1.0;// data from far samples decay proportionally to the probe distances
publicdoublesigmaToProbe=1.0;// data from far samples decay proportionally to the probe distances
publicbooleanuseTheBest=true;// adjust from the best known position (false - from the last)
publicbooleanuseTheBest=true;// adjust from the best known position (false - from the last)
publicbooleanprobeSymmetrical=false;// if true, probe 6 measurements), if false - only 4 (tetrahedron)
publicbooleanprobeSymmetrical=false;// if true, probe 6 measurements), if false - only 4 (tetrahedron)
publicbooleanparallelBeforeProbing=true;// move 3 motors before probing around
publicbooleanparallelBeforeProbing=true;// move 3 motors before probing around
publicdoublereProbeDistance=4000.0;// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
publicdoublereProbeDistance=4000.0;// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
publicdoublebelieveLast=0.0;// coefficient 0.. 1.0. When each ot the 3 parameters is linearized, add shift, so 1.0 the planes will go throug the last sample
publicdoublebelieveLast=0.0;// coefficient 0.. 1.0. When each ot the 3 parameters is linearized, add shift, so 1.0 the planes will go throug the last sample
publicbooleancompensateHysteresis=true;// move motors in the same direction to compensate for hysteresis
publicbooleancompensateHysteresis=true;// move motors in the same direction to compensate for hysteresis
publicdoubleminCorr=100.0;// minimal correction movement to initiate final numFinalCorr moves
publicdoubleminCorr=100.0;// minimal correction movement to initiate final numFinalCorr moves
publicintnumFinalCorr=5;// exit if this number of last corrections where below minCorr
publicintnumFinalCorr=5;// exit if this number of last corrections where below minCorr
...
@@ -312,16 +318,16 @@ public class LensAdjustment {
...
@@ -312,16 +318,16 @@ public class LensAdjustment {
publicintmaxAutoIterations=25;// exit if history grows above this
publicintmaxAutoIterations=25;// exit if history grows above this
publicdoublemaxAutoDistance=10000;// Maximal allowed automatic correction, motor steps
publicdoublemaxAutoDistance=10000;// Maximal allowed automatic correction, motor steps
publicbooleanconfirmFirstAuto=true;// ask confirmation after first automatic adjustment step (before moving)
publicbooleanconfirmFirstAuto=true;// ask confirmation after first automatic adjustment step (before moving)
publicdoublemotorsPreSigma=3584.0;// when fitting parabola for focusing sharpness in the center, far measurements decay with this sigma
publicdoublemotorsPreSigma=3584.0;// when fitting parabola for focusing sharpness in the center, far measurements decay with this sigma
publicdoublemaxLinearStep=3584.0;// If there are insufficient measurements to fit parabola - make this step
publicdoublemaxLinearStep=3584.0;// If there are insufficient measurements to fit parabola - make this step
publicintscanStep=320;// 200; // motor step (all 3 motors) in scan focus mode (signed value)
publicintscanStep=320;// 200; // motor step (all 3 motors) in scan focus mode (signed value)
publicintscanNumber=50;// number of scanStep steps to run
publicintscanNumber=50;// number of scanStep steps to run
publicintscanNumberNegative=20;// 15; // number of scanStep steps negative from the start
publicintscanNumberNegative=20;// 15; // number of scanStep steps negative from the start
publicbooleanscanHysteresis=false;// true; // scan both ways
publicbooleanscanHysteresis=false;// true; // scan both ways
publicintscanHysteresisNumber=5;// number of test points for the Hysteresis measurement
publicintscanHysteresisNumber=5;// number of test points for the Hysteresis measurement
publicbooleanscanTiltReverse=false;// enable scanning tilt in both directions
publicbooleanscanTiltReverse=false;// enable scanning tilt in both directions
publicbooleanscanMeasureLast=false;// Calculate PSF after last move (to original position)
publicbooleanscanMeasureLast=false;// Calculate PSF after last move (to original position)
...
@@ -330,45 +336,45 @@ public class LensAdjustment {
...
@@ -330,45 +336,45 @@ public class LensAdjustment {
publicintscanTiltRangeY=14336;// 4 periods
publicintscanTiltRangeY=14336;// 4 periods
publicintscanTiltStepsX=24;
publicintscanTiltStepsX=24;
publicintscanTiltStepsY=24;
publicintscanTiltStepsY=24;
publicintmotorHysteresis=300;
publicintmotorHysteresis=300;
publicdoublemeasuredHysteresis=0;// actually measured (will be saved/restored)
publicdoublemeasuredHysteresis=0;// actually measured (will be saved/restored)
publicdoublemotorCalm=2;// wait (seconds) after motors reached final position (for the first time) before acquiring image
publicdoublemotorCalm=2;// wait (seconds) after motors reached final position (for the first time) before acquiring image
publicdoublelinearReductionRatio=4.0/38.0;// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
publicdoublelinearReductionRatio=4.0/38.0;// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
publicintmotorDebug=0;// 1 show motor moves, 2 - show hysteresis back-ups too
publicintmotorDebug=0;// 1 show motor moves, 2 - show hysteresis back-ups too
// parameters for appoximating sensor center position
// parameters for appoximating sensor center position
publicintlensDistanceNumPoints=1000;// number of points to tabulate center focus parameters vs. focal distance
publicintlensDistanceNumPoints=1000;// number of points to tabulate center focus parameters vs. focal distance
publicintlensDistancePolynomialDegree=8;// polynomial degree to approximate center focus parameters vs. focal distance
publicintlensDistancePolynomialDegree=8;// polynomial degree to approximate center focus parameters vs. focal distance
publicdoublelensDistanceWeightY=0.5;// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
publicdoublelensDistanceWeightY=0.5;// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
publicdoublelensDistanceWeightK=0.0;// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
publicdoublelensDistanceWeightK=0.0;// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
publicbooleanlensDistanceInteractive=true;// Open dialog when calibrating focal distance
publicbooleanlensDistanceInteractive=true;// Open dialog when calibrating focal distance
publicbooleanlensDistanceShowResults=true;// show results window from foca
publicbooleanlensDistanceShowResults=true;// show results window from foca
publicbooleanlensDistanceMoveToGoal=true;// Move to targetMicrons
publicbooleanlensDistanceMoveToGoal=true;// Move to targetMicrons
publicbooleanpowerControlEnable=true;
publicbooleanpowerControlEnable=true;
publicdoublepowerControlMaximalTemperature=60.0;
publicdoublepowerControlMaximalTemperature=60.0;
publicdoublepowerControlHeaterOnMinutes=10.0;
publicdoublepowerControlHeaterOnMinutes=10.0;
publicdoublepowerControlNeitherOnMinutes=5.0;
publicdoublepowerControlNeitherOnMinutes=5.0;
publicdoublepowerControlFanOnMinutes=15.0;
publicdoublepowerControlFanOnMinutes=15.0;
publicStringuvLasersIP="192.168.0.236";// IP address of the camera with UV LEDs and aiming lasers are connected
publicStringuvLasersIP="192.168.0.236";// IP address of the camera with UV LEDs and aiming lasers are connected
publicintuvLasersBus=0;// 0 if 103641 board is connected to the sensor port (through 10-359), 1 - to 10369
publicintuvLasersBus=0;// 0 if 103641 board is connected to the sensor port (through 10-359), 1 - to 10369
publicdouble[]uvLasersCurrents={40.0,40.0,40.0,40.0};// default LED on currents (mA)
publicdouble[]uvLasersCurrents={40.0,40.0,40.0,40.0};// default LED on currents (mA)
// the following 3 overwrite SimulParameters members
// the following 3 overwrite SimulParameters members
publicdoublesmallestSubPix=0.3;// subdivide pixels down to that fraction when simulating
publicdoublesmallestSubPix=0.3;// subdivide pixels down to that fraction when simulating
publicdoublebitmapNonuniforityThreshold=0.1;// subdivide pixels until difference between the corners is below this value
publicdoublebitmapNonuniforityThreshold=0.1;// subdivide pixels until difference between the corners is below this value
publicintsubdiv=4;
publicintsubdiv=4;
// overwrites public static class MultiFilePSF.overexposedMaxFraction
// overwrites public static class MultiFilePSF.overexposedMaxFraction
publicdoubleoverexposedMaxFraction=0.1;// allowed fraction of the overexposed pixels in the PSF kernel measurement area
publicdoubleoverexposedMaxFraction=0.1;// allowed fraction of the overexposed pixels in the PSF kernel measurement area
// overwrites public static class PSFParameters.minDefinedArea
// overwrites public static class PSFParameters.minDefinedArea
publicdoubleminDefinedArea=0.75;// minimal (weighted) fraction of the defined patter pixels in the FFT area
publicdoubleminDefinedArea=0.75;// minimal (weighted) fraction of the defined patter pixels in the FFT area
publicintPSFKernelSize=32;// size of the detected PSF kernel
publicintPSFKernelSize=32;// size of the detected PSF kernel
publicbooleanapproximateGrid=true;// approximate grid with polynomial
publicbooleanapproximateGrid=true;// approximate grid with polynomial
publicbooleancenterPSF=true;// Center PSF by modifying phase
publicbooleancenterPSF=true;// Center PSF by modifying phase
publicdoublemask1_sigma=1.0;
publicdoublemask1_sigma=1.0;
publicdoublemask1_threshold=0.25;
publicdoublemask1_threshold=0.25;
publicdoublegaps_sigma=1.0;
publicdoublegaps_sigma=1.0;
...
@@ -384,24 +390,24 @@ public class LensAdjustment {
...
@@ -384,24 +390,24 @@ public class LensAdjustment {
publicdoublecorrelationMinInitialContrast=1.5;// minimal contrast for the pattern of the center (initial point)
publicdoublecorrelationMinInitialContrast=1.5;// minimal contrast for the pattern of the center (initial point)
publicdoublecorrelationMinAbsoluteContrast=0.5;// minimal contrast for the pattern to pass, does not compensate for low ligt
publicdoublecorrelationMinAbsoluteContrast=0.5;// minimal contrast for the pattern to pass, does not compensate for low ligt
publicdoublecorrelationMinAbsoluteInitialContrast=0.5;// minimal contrast for the pattern of the center (initial point)
publicdoublecorrelationMinAbsoluteInitialContrast=0.5;// minimal contrast for the pattern of the center (initial point)
@@ -454,21 +460,21 @@ public class LensAdjustment {
...
@@ -454,21 +460,21 @@ public class LensAdjustment {
}
}
returnnull;// should not get here
returnnull;// should not get here
}
}
publicFocusMeasurementParameters(int[]motorPos){
publicFocusMeasurementParameters(int[]motorPos){
this.motorPos=motorPos;
this.motorPos=motorPos;
}
}
publicvoidresetResults(){
publicvoidresetResults(){
this.result_lastKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from last run
this.result_lastKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from last run
this.result_lastFD20=Double.NaN;// focal distance for 20C, measured from last run
this.result_lastFD20=Double.NaN;// focal distance for 20C, measured from last run
this.result_allHistoryKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryKT=Double.NaN;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryFD20=Double.NaN;// focal distance for 20C, measured from all the measurement histgory
this.result_allHistoryFD20=Double.NaN;// focal distance for 20C, measured from all the measurement histgory
this.result_fDistance=Double.NaN;// last measured focal distance
this.result_fDistance=Double.NaN;// last measured focal distance
this.result_tiltX=Double.NaN;// last measured tilt X
this.result_tiltX=Double.NaN;// last measured tilt X
this.result_tiltY=Double.NaN;// last measured tilt Y
this.result_tiltY=Double.NaN;// last measured tilt Y
this.result_R50=Double.NaN;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_R50=Double.NaN;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_A50=Double.NaN;// last measured A50 (simailar, but R^2 are averaged)
this.result_A50=Double.NaN;// last measured A50 (simailar, but R^2 are averaged)
this.result_B50=Double.NaN;// last measured B50 (similar, but R^4 are averaged)
this.result_B50=Double.NaN;// last measured B50 (similar, but R^4 are averaged)
this.result_RC50=Double.NaN;// last measured RC50(R50 calculated only for the 2 center samples)
this.result_RC50=Double.NaN;// last measured RC50(R50 calculated only for the 2 center samples)
this.result_PX0=Double.NaN;// lens center shift, X
this.result_PX0=Double.NaN;// lens center shift, X
...
@@ -490,15 +496,15 @@ public class LensAdjustment {
...
@@ -490,15 +496,15 @@ public class LensAdjustment {
StringserialNumber,// camera serial number string
StringserialNumber,// camera serial number string
doublesensorTemperature,// last measured sensor temperature
doublesensorTemperature,// last measured sensor temperature
// other summary results to be saved with parameters
// other summary results to be saved with parameters
doubleresult_lastKT,// focal distance temperature coefficient (um/C), measured from last run
doubleresult_lastKT,// focal distance temperature coefficient (um/C), measured from last run
doubleresult_lastFD20,// focal distance for 20C, measured from last run
doubleresult_lastFD20,// focal distance for 20C, measured from last run
doubleresult_allHistoryKT,// focal distance temperature coefficient (um/C), measured from all the measurement histgory
doubleresult_allHistoryKT,// focal distance temperature coefficient (um/C), measured from all the measurement histgory
doubleresult_allHistoryFD20,// focal distance for 20C, measured from all the measurement histgory
doubleresult_allHistoryFD20,// focal distance for 20C, measured from all the measurement histgory
doubleresult_fDistance,// last measured focal distance
doubleresult_fDistance,// last measured focal distance
doubleresult_tiltX,// last measured tilt X
doubleresult_tiltX,// last measured tilt X
doubleresult_tiltY,// last measured tilt Y
doubleresult_tiltY,// last measured tilt Y
doubleresult_R50,// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
doubleresult_R50,// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
doubleresult_A50,// last measured A50 (simailar, but R^2 are averaged)
doubleresult_A50,// last measured A50 (simailar, but R^2 are averaged)
doubleresult_B50,// last measured B50 (simailar, but R^4 are averaged)
doubleresult_B50,// last measured B50 (simailar, but R^4 are averaged)
doubleresult_RC50,// last measured RC50(R50 calculated only for the 2 center samples)
doubleresult_RC50,// last measured RC50(R50 calculated only for the 2 center samples)
doubleresult_PX0,// lens center shift, X
doubleresult_PX0,// lens center shift, X
...
@@ -511,7 +517,7 @@ public class LensAdjustment {
...
@@ -511,7 +517,7 @@ public class LensAdjustment {
intmanufacturingState,// SFE manufacturing state
intmanufacturingState,// SFE manufacturing state
booleanaskLensSerial,
booleanaskLensSerial,
booleanincludeLensSerial,// add lens serial to config filename
booleanincludeLensSerial,// add lens serial to config filename
doublecenterDeltaX,// required X-difference between lens center and sensor center
doublecenterDeltaX,// required X-difference between lens center and sensor center
doublecenterDeltaY,// required Y-difference between lens center and sensor center
doublecenterDeltaY,// required Y-difference between lens center and sensor center
Rectanglemargins,
Rectanglemargins,
int[]numSamples,
int[]numSamples,
...
@@ -525,7 +531,7 @@ public class LensAdjustment {
...
@@ -525,7 +531,7 @@ public class LensAdjustment {
booleanshowAcquiredImages,
booleanshowAcquiredImages,
booleanshowROI,
booleanshowROI,
booleanshowSamples,
booleanshowSamples,
booleanshowFittedParameters,
booleanshowFittedParameters,
booleanuseHeadLasers,
booleanuseHeadLasers,
doublepsf_cutoffEnergy,// disregard pixels outside of this fraction of the total energy
doublepsf_cutoffEnergy,// disregard pixels outside of this fraction of the total energy
...
@@ -533,21 +539,21 @@ public class LensAdjustment {
...
@@ -533,21 +539,21 @@ public class LensAdjustment {
intpsf_minArea,// continue increasing the selected area, even if beyound psf_cutoffEnergy and psf_cutoffLevel,
intpsf_minArea,// continue increasing the selected area, even if beyound psf_cutoffEnergy and psf_cutoffLevel,
// if the selected area is smaller than this (so approximation wpuld work)
// if the selected area is smaller than this (so approximation wpuld work)
doublepsf_blurSigma,// optionally blur the calculated mask
doublepsf_blurSigma,// optionally blur the calculated mask
doubleweightRatioRedToGreen,// Use this data when combining defocusing data from different color PSF
doubleweightRatioRedToGreen,// Use this data when combining defocusing data from different color PSF
doubleweightRatioBlueToGreen,
doubleweightRatioBlueToGreen,
doubletargetFarNear,// target logariphm of average tangential-to-radial resolution
doubletargetFarNear,// target logariphm of average tangential-to-radial resolution
booleanuseRadialTangential,// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
booleanuseRadialTangential,// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
doubletargetMicrons,// target lens center distance (away from "best focus"
doubletargetMicrons,// target lens center distance (away from "best focus"
doubletoleranceMicrons,// microns
doubletoleranceMicrons,// microns
doubletoleranceTilt,//
doubletoleranceTilt,//
doubletoleranceThreshold,// When each error is under swcaled thereshold, reduce correxction step twice
doubletoleranceThreshold,// When each error is under swcaled thereshold, reduce correxction step twice
doubleparallelAdjustThreshold,// adjust 3 motors parallel if focal distance error in the center exceeds this
doubleparallelAdjustThreshold,// adjust 3 motors parallel if focal distance error in the center exceeds this
doublemotorsSigma,// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
doublemotorsSigma,// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
doublemotorsSigma3,// all 3 motors together (focusing center)
doublemotorsSigma3,// all 3 motors together (focusing center)
doublemotorsMinSigma,// sigma will not drop below this value when fitting walk is getting smaller
doublemotorsMinSigma,// sigma will not drop below this value when fitting walk is getting smaller
doublemotorsVarSigmaToTravel,// when walk is getting smaller, sigma will keep going down proportionally
doublemotorsVarSigmaToTravel,// when walk is getting smaller, sigma will keep going down proportionally
doublemotorsFadeSigma,// after each step new sigma will have this part of the calculated from the travel
doublemotorsFadeSigma,// after each step new sigma will have this part of the calculated from the travel
doublemotorsOverShootToBalance,//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
doublemotorsOverShootToBalance,//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
booleanfilterGoodDistance,// when measuring tilt, use those with good center with higher weight
booleanfilterGoodDistance,// when measuring tilt, use those with good center with higher weight
doublegoodDistanceSigma,// sigma for the weight function of tilt measurements, depending on the center distance error
doublegoodDistanceSigma,// sigma for the weight function of tilt measurements, depending on the center distance error
...
@@ -557,8 +563,8 @@ public class LensAdjustment {
...
@@ -557,8 +563,8 @@ public class LensAdjustment {
doubleprobe_M1M2M3,// how far to move average of the 3 motors: (M1+M2+M3)/3
doubleprobe_M1M2M3,// how far to move average of the 3 motors: (M1+M2+M3)/3
doubleprobe_M3_M1M2,// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
doubleprobe_M3_M1M2,// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
doubleprobe_M2_M1,// how far to move M2 opposite to M1: M2-M1
doubleprobe_M2_M1,// how far to move M2 opposite to M1: M2-M1
doublesigmaToProbe,// data from far samples decay proportionally to the probe distances
doublesigmaToProbe,// data from far samples decay proportionally to the probe distances
booleanuseTheBest,// adjust from the best known position (false - from the last)
booleanuseTheBest,// adjust from the best known position (false - from the last)
booleanprobeSymmetrical,// if true, probe 6 measurements), if false - only 4 (tetrahedron)
booleanprobeSymmetrical,// if true, probe 6 measurements), if false - only 4 (tetrahedron)
booleanparallelBeforeProbing,// move 3 motors before probing around
booleanparallelBeforeProbing,// move 3 motors before probing around
doublereProbeDistance,// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
doublereProbeDistance,// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
...
@@ -578,7 +584,7 @@ public class LensAdjustment {
...
@@ -578,7 +584,7 @@ public class LensAdjustment {
intscanNumberNegative,// of them negative
intscanNumberNegative,// of them negative
booleanscanHysteresis,// scan both ways
booleanscanHysteresis,// scan both ways
intscanHysteresisNumber,// number of test points for the Hysteresis measurement
intscanHysteresisNumber,// number of test points for the Hysteresis measurement
@@ -588,15 +594,15 @@ public class LensAdjustment {
...
@@ -588,15 +594,15 @@ public class LensAdjustment {
intscanTiltStepsX,//=24;
intscanTiltStepsX,//=24;
intscanTiltStepsY,//=24;
intscanTiltStepsY,//=24;
intmotorHysteresis,
intmotorHysteresis,
doublemeasuredHysteresis,// actually measured (will be saved/restored)
doublemeasuredHysteresis,// actually measured (will be saved/restored)
doublemotorCalm,// wait (seconds) after motors reached final position (for the first time) before acquiring image
doublemotorCalm,// wait (seconds) after motors reached final position (for the first time) before acquiring image
doublelinearReductionRatio,// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
doublelinearReductionRatio,// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
intmotorDebug,// 1 show motor moves, 2 - show hysteresis back-ups too
intmotorDebug,// 1 show motor moves, 2 - show hysteresis back-ups too
intlensDistanceNumPoints,// number of points to tabulate center focus parameters vs. focal distance
intlensDistanceNumPoints,// number of points to tabulate center focus parameters vs. focal distance
intlensDistancePolynomialDegree,// polynomial degree to approximate center focus parameters vs. focal distance
intlensDistancePolynomialDegree,// polynomial degree to approximate center focus parameters vs. focal distance
doublelensDistanceWeightY,// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
doublelensDistanceWeightY,// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
doublelensDistanceWeightK,// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
doublelensDistanceWeightK,// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
booleanlensDistanceInteractive,// Open dialog when calibrating focal distance
booleanlensDistanceInteractive,// Open dialog when calibrating focal distance
booleanlensDistanceShowResults,// show results window from foca
booleanlensDistanceShowResults,// show results window from foca
...
@@ -612,8 +618,8 @@ public class LensAdjustment {
...
@@ -612,8 +618,8 @@ public class LensAdjustment {
doublesmallestSubPix,// subdivide pixels down to that fraction when simulating
doublesmallestSubPix,// subdivide pixels down to that fraction when simulating
doublebitmapNonuniforityThreshold,// subdivide pixels until difference between the corners is below this value
doublebitmapNonuniforityThreshold,// subdivide pixels until difference between the corners is below this value
intsubdiv,
intsubdiv,
doubleoverexposedMaxFraction,// allowed fraction of the overexposed pixels in the PSF kernel measurement area
doubleoverexposedMaxFraction,// allowed fraction of the overexposed pixels in the PSF kernel measurement area
doubleminDefinedArea,// minimal (weighted) fraction of the defined patter pixels in the FFT area
doubleminDefinedArea,// minimal (weighted) fraction of the defined patter pixels in the FFT area
intPSFKernelSize,
intPSFKernelSize,
booleanapproximateGrid,// approximate grid with polynomial
booleanapproximateGrid,// approximate grid with polynomial
...
@@ -633,7 +639,7 @@ public class LensAdjustment {
...
@@ -633,7 +639,7 @@ public class LensAdjustment {
double[]postUVscrewSensitivity,// microns/turn for 3 post-UV fixture adjustment screws
double[]postUVscrewSensitivity,// microns/turn for 3 post-UV fixture adjustment screws
booleanflatFieldCorrection,
booleanflatFieldCorrection,
doubleflatFieldExpand,
doubleflatFieldExpand,
doublethresholdFinish,// (copied from series) stop iterations if 2 last steps had less improvement (but not worsening )
doublethresholdFinish,// (copied from series) stop iterations if 2 last steps had less improvement (but not worsening )
intnumIterations,// maximal number of iterations
intnumIterations,// maximal number of iterations
booleancameraIsConfigured,
booleancameraIsConfigured,
booleanuseExtraSensor,
booleanuseExtraSensor,
...
@@ -655,15 +661,15 @@ public class LensAdjustment {
...
@@ -655,15 +661,15 @@ public class LensAdjustment {
this.showResults=showResults;// show focusing (includingh intermediate) results
this.showResults=showResults;// show focusing (includingh intermediate) results
this.serialNumber=serialNumber;// camera serial number string
this.serialNumber=serialNumber;// camera serial number string
this.sensorTemperature=sensorTemperature;// last measured sensor temperature
this.sensorTemperature=sensorTemperature;// last measured sensor temperature
this.result_lastKT=result_lastKT;// focal distance temperature coefficient (um/C), measured from last run
this.result_lastKT=result_lastKT;// focal distance temperature coefficient (um/C), measured from last run
this.result_lastFD20=result_lastFD20;// focal distance for 20C, measured from last run
this.result_lastFD20=result_lastFD20;// focal distance for 20C, measured from last run
this.result_allHistoryKT=result_allHistoryKT;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryKT=result_allHistoryKT;// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryFD20=result_allHistoryFD20;// focal distance for 20C, measured from all the measurement histgory
this.result_allHistoryFD20=result_allHistoryFD20;// focal distance for 20C, measured from all the measurement histgory
this.result_fDistance=result_fDistance;// last measured focal distance
this.result_fDistance=result_fDistance;// last measured focal distance
this.result_tiltX=result_tiltX;// last measured tilt X
this.result_tiltX=result_tiltX;// last measured tilt X
this.result_tiltY=result_tiltY;// last measured tilt Y
this.result_tiltY=result_tiltY;// last measured tilt Y
this.result_R50=result_R50;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_R50=result_R50;// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_A50=result_A50;// last measured A50 (simailar, but R^2 are averaged)
this.result_A50=result_A50;// last measured A50 (simailar, but R^2 are averaged)
this.result_B50=result_B50;// last measured B50 (simailar, but R^4 are averaged)
this.result_B50=result_B50;// last measured B50 (simailar, but R^4 are averaged)
this.result_RC50=result_RC50;// last measured RC50(R50 calculated only for the 2 center samples)
this.result_RC50=result_RC50;// last measured RC50(R50 calculated only for the 2 center samples)
this.result_PX0=result_PX0;// lens center shift, X
this.result_PX0=result_PX0;// lens center shift, X
...
@@ -676,7 +682,7 @@ public class LensAdjustment {
...
@@ -676,7 +682,7 @@ public class LensAdjustment {
this.manufacturingState=manufacturingState;
this.manufacturingState=manufacturingState;
this.askLensSerial=askLensSerial;
this.askLensSerial=askLensSerial;
this.includeLensSerial=includeLensSerial;// add lens serial to config filename
this.includeLensSerial=includeLensSerial;// add lens serial to config filename
this.centerDeltaX=centerDeltaX;// required X-difference between lens center and sensor center
this.centerDeltaX=centerDeltaX;// required X-difference between lens center and sensor center
this.centerDeltaY=centerDeltaY;// required Y-difference between lens center and sensor center
this.centerDeltaY=centerDeltaY;// required Y-difference between lens center and sensor center
this.margins=(Rectangle)margins.clone();
this.margins=(Rectangle)margins.clone();
// this.origin=origin.clone(); // top left corner
// this.origin=origin.clone(); // top left corner
...
@@ -701,17 +707,17 @@ public class LensAdjustment {
...
@@ -701,17 +707,17 @@ public class LensAdjustment {
this.weightRatioRedToGreen=weightRatioRedToGreen;// Use this data when combining defocusing data from different color PSF
this.weightRatioRedToGreen=weightRatioRedToGreen;// Use this data when combining defocusing data from different color PSF
this.targetFarNear=targetFarNear;// target logariphm of average tangential-to-radial resolution
this.targetFarNear=targetFarNear;// target logariphm of average tangential-to-radial resolution
this.useRadialTangential=useRadialTangential;// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
this.useRadialTangential=useRadialTangential;// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
this.targetMicrons=targetMicrons;// target lens center distance (away from "best focus"
this.targetMicrons=targetMicrons;// target lens center distance (away from "best focus"
this.toleranceMicrons=toleranceMicrons;// microns
this.toleranceMicrons=toleranceMicrons;// microns
this.toleranceTilt=toleranceTilt;//
this.toleranceTilt=toleranceTilt;//
this.toleranceThreshold=toleranceThreshold;// When each error is under swcaled thereshold, reduce correxction step twice
this.toleranceThreshold=toleranceThreshold;// When each error is under swcaled thereshold, reduce correxction step twice
this.parallelAdjustThreshold=parallelAdjustThreshold;// adjust 3 motors parallel if focal distance error in the center exceeds this
this.parallelAdjustThreshold=parallelAdjustThreshold;// adjust 3 motors parallel if focal distance error in the center exceeds this
this.motorsSigma=motorsSigma;// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
this.motorsSigma=motorsSigma;// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
this.motorsSigma3=motorsSigma3;// same when 3 motors move together
this.motorsSigma3=motorsSigma3;// same when 3 motors move together
this.motorsMinSigma=motorsMinSigma;// sigma will not drop below this value when fitting walk is getting smaller
this.motorsMinSigma=motorsMinSigma;// sigma will not drop below this value when fitting walk is getting smaller
this.motorsVarSigmaToTravel=motorsVarSigmaToTravel;// when walk is getting smaller, sigma will keep going down proportionally
this.motorsVarSigmaToTravel=motorsVarSigmaToTravel;// when walk is getting smaller, sigma will keep going down proportionally
this.motorsFadeSigma=motorsFadeSigma;// after each step new sigma will have this part of the calculated from the travel
this.motorsFadeSigma=motorsFadeSigma;// after each step new sigma will have this part of the calculated from the travel
this.motorsOverShootToBalance=motorsOverShootToBalance;//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
this.motorsOverShootToBalance=motorsOverShootToBalance;//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
this.filterGoodDistance=filterGoodDistance;// when measuring tilt, use those with good center with higher weight
this.filterGoodDistance=filterGoodDistance;// when measuring tilt, use those with good center with higher weight
this.goodDistanceSigma=goodDistanceSigma;// sigma for the weight function of tilt measurements, depending on the center distance error
this.goodDistanceSigma=goodDistanceSigma;// sigma for the weight function of tilt measurements, depending on the center distance error
...
@@ -722,7 +728,7 @@ public class LensAdjustment {
...
@@ -722,7 +728,7 @@ public class LensAdjustment {
this.probe_M3_M1M2=probe_M3_M1M2;// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
this.probe_M3_M1M2=probe_M3_M1M2;// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
this.probe_M2_M1=probe_M2_M1;// how far to move M2 opposite to M1: M2-M1
this.probe_M2_M1=probe_M2_M1;// how far to move M2 opposite to M1: M2-M1
this.sigmaToProbe=sigmaToProbe;// data from far samples decay proportionally to the probe distances
this.sigmaToProbe=sigmaToProbe;// data from far samples decay proportionally to the probe distances
this.useTheBest=useTheBest;// adjust from the best known position (false - from the last)
this.useTheBest=useTheBest;// adjust from the best known position (false - from the last)
this.probeSymmetrical=probeSymmetrical;// if true, probe 6 measurements), if false - only 4 (tetrahedron)
this.probeSymmetrical=probeSymmetrical;// if true, probe 6 measurements), if false - only 4 (tetrahedron)
this.parallelBeforeProbing=parallelBeforeProbing;// move 3 motors before probing around
this.parallelBeforeProbing=parallelBeforeProbing;// move 3 motors before probing around
this.reProbeDistance=reProbeDistance;// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
this.reProbeDistance=reProbeDistance;// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
...
@@ -742,7 +748,7 @@ public class LensAdjustment {
...
@@ -742,7 +748,7 @@ public class LensAdjustment {
this.scanNumberNegative=scanNumberNegative;// of them negative
this.scanNumberNegative=scanNumberNegative;// of them negative
this.scanHysteresis=scanHysteresis;// scan both ways
this.scanHysteresis=scanHysteresis;// scan both ways
this.scanHysteresisNumber=scanHysteresisNumber;// number of test points for the Hysteresis measurement
this.scanHysteresisNumber=scanHysteresisNumber;// number of test points for the Hysteresis measurement
@@ -751,15 +757,15 @@ public class LensAdjustment {
...
@@ -751,15 +757,15 @@ public class LensAdjustment {
this.scanTiltRangeY=scanTiltRangeY;//, //=14336; // 4 periods
this.scanTiltRangeY=scanTiltRangeY;//, //=14336; // 4 periods
this.scanTiltStepsX=scanTiltStepsX;//=24;
this.scanTiltStepsX=scanTiltStepsX;//=24;
this.scanTiltStepsY=scanTiltStepsY;//=24;
this.scanTiltStepsY=scanTiltStepsY;//=24;
this.motorHysteresis=motorHysteresis;
this.motorHysteresis=motorHysteresis;
this.measuredHysteresis=measuredHysteresis;// actually measured (will be saved/restored)
this.measuredHysteresis=measuredHysteresis;// actually measured (will be saved/restored)
this.motorCalm=motorCalm;// wait (seconds) after motors reached final position (for the first time) before acquiring image
this.motorCalm=motorCalm;// wait (seconds) after motors reached final position (for the first time) before acquiring image
this.linearReductionRatio=linearReductionRatio;// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
this.linearReductionRatio=linearReductionRatio;// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
this.motorDebug=motorDebug;// 1 show motor moves, 2 - show hysteresis back-ups too
this.motorDebug=motorDebug;// 1 show motor moves, 2 - show hysteresis back-ups too
this.lensDistanceNumPoints=lensDistanceNumPoints;// number of points to tabulate center focus parameters vs. focal distance
this.lensDistanceNumPoints=lensDistanceNumPoints;// number of points to tabulate center focus parameters vs. focal distance
this.lensDistancePolynomialDegree=lensDistancePolynomialDegree;// polynomial degree to approximate center focus parameters vs. focal distance
this.lensDistancePolynomialDegree=lensDistancePolynomialDegree;// polynomial degree to approximate center focus parameters vs. focal distance
this.lensDistanceWeightY=lensDistanceWeightY;// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
this.lensDistanceWeightY=lensDistanceWeightY;// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
this.lensDistanceWeightK=lensDistanceWeightK;// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
this.lensDistanceWeightK=lensDistanceWeightK;// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
this.lensDistanceInteractive=lensDistanceInteractive;// Open dialog when calibrating focal distance
this.lensDistanceInteractive=lensDistanceInteractive;// Open dialog when calibrating focal distance
this.lensDistanceShowResults=lensDistanceShowResults;// show results window from foca
this.lensDistanceShowResults=lensDistanceShowResults;// show results window from foca
...
@@ -774,12 +780,12 @@ public class LensAdjustment {
...
@@ -774,12 +780,12 @@ public class LensAdjustment {
this.uvLasersCurrents=uvLasersCurrents.clone();// default LED on currents (mA)
this.uvLasersCurrents=uvLasersCurrents.clone();// default LED on currents (mA)
this.approximateGrid=approximateGrid;// approximate grid with polynomial
this.approximateGrid=approximateGrid;// approximate grid with polynomial
this.centerPSF=centerPSF;// approximate grid with polynomial
this.centerPSF=centerPSF;// approximate grid with polynomial
this.mask1_sigma=mask1_sigma;
this.mask1_sigma=mask1_sigma;
this.mask1_threshold=mask1_threshold;
this.mask1_threshold=mask1_threshold;
this.gaps_sigma=gaps_sigma;
this.gaps_sigma=gaps_sigma;
...
@@ -795,7 +801,7 @@ public class LensAdjustment {
...
@@ -795,7 +801,7 @@ public class LensAdjustment {
this.postUVscrewSensitivity=postUVscrewSensitivity.clone();// microns/turn for 3 post-UV fixture adjustment screws
this.postUVscrewSensitivity=postUVscrewSensitivity.clone();// microns/turn for 3 post-UV fixture adjustment screws
this.flatFieldCorrection=flatFieldCorrection;
this.flatFieldCorrection=flatFieldCorrection;
this.flatFieldExpand=flatFieldExpand;
this.flatFieldExpand=flatFieldExpand;
this.thresholdFinish=thresholdFinish;// (copied from series) stop iterations if 2 last steps had less improvement (but not worsening )
this.thresholdFinish=thresholdFinish;// (copied from series) stop iterations if 2 last steps had less improvement (but not worsening )
this.numIterations=numIterations;// maximal number of iterations
this.numIterations=numIterations;// maximal number of iterations
this.cameraIsConfigured=cameraIsConfigured;
this.cameraIsConfigured=cameraIsConfigured;
this.useExtraSensor=useExtraSensor;
this.useExtraSensor=useExtraSensor;
...
@@ -806,7 +812,8 @@ public class LensAdjustment {
...
@@ -806,7 +812,8 @@ public class LensAdjustment {
this.reportTemperature=reportTemperature;
this.reportTemperature=reportTemperature;
this.showLegacy=showLegacy;
this.showLegacy=showLegacy;
}
}
publicFocusMeasurementParametersclone(){
@Override
publicFocusMeasurementParametersclone(){
returnnewFocusMeasurementParameters(
returnnewFocusMeasurementParameters(
this.gridGeometryFile,
this.gridGeometryFile,
this.initialCalibrationFile,
this.initialCalibrationFile,
...
@@ -819,15 +826,15 @@ public class LensAdjustment {
...
@@ -819,15 +826,15 @@ public class LensAdjustment {
this.showResults,// show focusing (includingh intermediate) results
this.showResults,// show focusing (includingh intermediate) results
this.serialNumber,// camera serial number string
this.serialNumber,// camera serial number string
this.sensorTemperature,// last measured sensor temperature
this.sensorTemperature,// last measured sensor temperature
this.result_lastKT,// focal distance temperature coefficient (um/C), measured from last run
this.result_lastKT,// focal distance temperature coefficient (um/C), measured from last run
this.result_lastFD20,// focal distance for 20C, measured from last run
this.result_lastFD20,// focal distance for 20C, measured from last run
this.result_allHistoryKT,// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryKT,// focal distance temperature coefficient (um/C), measured from all the measurement histgory
this.result_allHistoryFD20,// focal distance for 20C, measured from all the measurement histgory
this.result_allHistoryFD20,// focal distance for 20C, measured from all the measurement histgory
this.result_fDistance,// last measured focal distance
this.result_fDistance,// last measured focal distance
this.result_tiltX,// last measured tilt X
this.result_tiltX,// last measured tilt X
this.result_tiltY,// last measured tilt Y
this.result_tiltY,// last measured tilt Y
this.result_R50,// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_R50,// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this.result_A50,// last measured A50 (simailar, but R^2 are averaged)
this.result_A50,// last measured A50 (simailar, but R^2 are averaged)
this.result_B50,// last measured B50 (simailar, but R^4 are averaged)
this.result_B50,// last measured B50 (simailar, but R^4 are averaged)
this.result_RC50,// last measured RC50(R50 calculated only for the 2 center samples)
this.result_RC50,// last measured RC50(R50 calculated only for the 2 center samples)
this.result_PX0,// lens center shift, X
this.result_PX0,// lens center shift, X
...
@@ -840,7 +847,7 @@ public class LensAdjustment {
...
@@ -840,7 +847,7 @@ public class LensAdjustment {
this.manufacturingState,
this.manufacturingState,
this.askLensSerial,
this.askLensSerial,
this.includeLensSerial,// add lens serial to config filename
this.includeLensSerial,// add lens serial to config filename
this.centerDeltaX,// required X-difference between lens center and sensor center
this.centerDeltaX,// required X-difference between lens center and sensor center
this.centerDeltaY,// required Y-difference between lens center and sensor center
this.centerDeltaY,// required Y-difference between lens center and sensor center
this.margins,
this.margins,
this.numSamples,
this.numSamples,
...
@@ -863,18 +870,18 @@ public class LensAdjustment {
...
@@ -863,18 +870,18 @@ public class LensAdjustment {
this.weightRatioRedToGreen,// Use this data when combining defocusing data from different color PSF
this.weightRatioRedToGreen,// Use this data when combining defocusing data from different color PSF
this.weightRatioBlueToGreen,
this.weightRatioBlueToGreen,
this.targetFarNear,// target logariphm of average tangential-to-radial resolution
this.targetFarNear,// target logariphm of average tangential-to-radial resolution
this.useRadialTangential,// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
this.useRadialTangential,// Use targetFarNear (radial/tangential resolution) as a proxy for the distance
this.targetMicrons,// target lens center distance (away from "best focus"
this.targetMicrons,// target lens center distance (away from "best focus"
this.toleranceMicrons,// microns
this.toleranceMicrons,// microns
this.toleranceTilt,//
this.toleranceTilt,//
this.toleranceThreshold,// When each error is under swcaled thereshold, reduce correxction step twice
this.toleranceThreshold,// When each error is under swcaled thereshold, reduce correxction step twice
this.parallelAdjustThreshold,// adjust 3 motors parallel if focal distance error in the center exceeds this
this.parallelAdjustThreshold,// adjust 3 motors parallel if focal distance error in the center exceeds this
this.motorsSigma,// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
this.motorsSigma,// when fitting planes for far/near, tiltX and tiltY the weights of the samples decay with this sigma
this.motorsSigma3,// same when 3 motors move together
this.motorsSigma3,// same when 3 motors move together
this.motorsMinSigma,// sigma will not drop below this value when fitting walk is getting smaller
this.motorsMinSigma,// sigma will not drop below this value when fitting walk is getting smaller
this.motorsVarSigmaToTravel,// when walk is getting smaller, sigma will keep going down proportionally
this.motorsVarSigmaToTravel,// when walk is getting smaller, sigma will keep going down proportionally
this.motorsFadeSigma,// after each step new sigma will have this part of the calculated from the travel
this.motorsFadeSigma,// after each step new sigma will have this part of the calculated from the travel
this.motorsOverShootToBalance,//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
this.motorsOverShootToBalance,//For quadratic maximum the correction will be increased by 1+motorsOverShootToBalance if there are less samples on teh other side
this.filterGoodDistance,// when measuring tilt, use those with good center with higher weight
this.filterGoodDistance,// when measuring tilt, use those with good center with higher weight
this.goodDistanceSigma,// sigma for the weight function of tilt measurements, depending on the center distance error
this.goodDistanceSigma,// sigma for the weight function of tilt measurements, depending on the center distance error
...
@@ -884,8 +891,8 @@ public class LensAdjustment {
...
@@ -884,8 +891,8 @@ public class LensAdjustment {
this.probe_M1M2M3,// how far to move average of the 3 motors: (M1+M2+M3)/3
this.probe_M1M2M3,// how far to move average of the 3 motors: (M1+M2+M3)/3
this.probe_M3_M1M2,// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
this.probe_M3_M1M2,// how far to move M3 opposite to M1 and M2: M3-(M1+M2)/2
this.probe_M2_M1,// how far to move M2 opposite to M1: M2-M1
this.probe_M2_M1,// how far to move M2 opposite to M1: M2-M1
this.sigmaToProbe,// data from far samples decay proportionally to the probe distances
this.sigmaToProbe,// data from far samples decay proportionally to the probe distances
this.useTheBest,// adjust from the best known position (false - from the last)
this.useTheBest,// adjust from the best known position (false - from the last)
this.probeSymmetrical,// if true, probe 6 measurements), if false - only 4 (tetrahedron)
this.probeSymmetrical,// if true, probe 6 measurements), if false - only 4 (tetrahedron)
this.parallelBeforeProbing,// move 3 motors before probing around
this.parallelBeforeProbing,// move 3 motors before probing around
this.reProbeDistance,// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
this.reProbeDistance,// re-run probing around in orthoganal directions, if the current position move farther from the last probing one
...
@@ -905,7 +912,7 @@ public class LensAdjustment {
...
@@ -905,7 +912,7 @@ public class LensAdjustment {
this.scanNumberNegative,// of them negative
this.scanNumberNegative,// of them negative
this.scanHysteresis,// scan both ways
this.scanHysteresis,// scan both ways
this.scanHysteresisNumber,// number of test points for the Hysteresis measurement
this.scanHysteresisNumber,// number of test points for the Hysteresis measurement
this.scanTiltEnable,// enable scanning tilt
this.scanTiltEnable,// enable scanning tilt
this.scanTiltReverse,
this.scanTiltReverse,
this.scanMeasureLast,
this.scanMeasureLast,
...
@@ -915,14 +922,14 @@ public class LensAdjustment {
...
@@ -915,14 +922,14 @@ public class LensAdjustment {
this.scanTiltStepsX,
this.scanTiltStepsX,
this.scanTiltStepsY,
this.scanTiltStepsY,
this.motorHysteresis,
this.motorHysteresis,
this.measuredHysteresis,// actually measured (will be saved/restored)
this.measuredHysteresis,// actually measured (will be saved/restored)
this.motorCalm,// wait (seconds) after motors reached final position (for the first time) before acquiring image
this.motorCalm,// wait (seconds) after motors reached final position (for the first time) before acquiring image
this.linearReductionRatio,// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
this.linearReductionRatio,// sensor travel to motors travel (all 3 together), By design it is 4/38~=0.105
this.motorDebug,// 1 show motor moves, 2 - show hysteresis back-ups too
this.motorDebug,// 1 show motor moves, 2 - show hysteresis back-ups too
this.lensDistanceNumPoints,// number of points to tabulate center focus parameters vs. focal distance
this.lensDistanceNumPoints,// number of points to tabulate center focus parameters vs. focal distance
this.lensDistancePolynomialDegree,// polynomial degree to approximate center focus parameters vs. focal distance
this.lensDistancePolynomialDegree,// polynomial degree to approximate center focus parameters vs. focal distance
this.lensDistanceWeightY,// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
this.lensDistanceWeightY,// normalize overall sharpness (that depends on the lens quality and/or PSF parameters) to differential ones
this.lensDistanceWeightK,// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
this.lensDistanceWeightK,// 0.0 use 3 distances (to frac-R, frac-B and Y) with teh same weight when fitting, 1.0 - proportional to squared derivatives
this.lensDistanceInteractive,// Open dialog when calibrating focal distance
this.lensDistanceInteractive,// Open dialog when calibrating focal distance
this.lensDistanceShowResults,// show results window from foca
this.lensDistanceShowResults,// show results window from foca
gd.addNumericField("Allowed overexposed pixels (fraction of the area) ",this.overexposedMaxFraction,3);// 0.005; // allowed fraction of the overexposed pixels in the PSF kernel measurement area
gd.addNumericField("Allowed overexposed pixels (fraction of the area) ",this.overexposedMaxFraction,3);// 0.005; // allowed fraction of the overexposed pixels in the PSF kernel measurement area
gd.addNumericField("Min fraction of the FFT square (weighted) to have defined pattern",this.minDefinedArea,3);
gd.addNumericField("Min fraction of the FFT square (weighted) to have defined pattern",this.minDefinedArea,3);
if(!Double.isNaN(this.result_allHistoryKT))gd.addMessage("Temperature focal distance coefficient calculated from all measurements is "+this.result_allHistoryKT+" microns");
if(!Double.isNaN(this.result_allHistoryKT))gd.addMessage("Temperature focal distance coefficient calculated from all measurements is "+this.result_allHistoryKT+" microns");
if(!Double.isNaN(this.result_allHistoryFD20))gd.addMessage("Focal distance @20C calculated from all measurements is "+this.result_allHistoryFD20+" microns");
if(!Double.isNaN(this.result_allHistoryFD20))gd.addMessage("Focal distance @20C calculated from all measurements is "+this.result_allHistoryFD20+" microns");
gd.addNumericField("Max frame diff",this.max_frame_diff,0,3,"","Maximal difference in frames between simultaneously acquired channels as calculated from the timestamps");
gd.addNumericField("Max frame diff",this.max_frame_diff,0,3,"","Maximal difference in frames between simultaneously acquired channels as calculated from the timestamps");