if(colorComponents.colorsToCorrect[5])input_bayer=combineCheckerGreens(input_bayer,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
if(colorComponents.colorsToCorrect[5])input_bayer_or_mono=combineCheckerGreens(input_bayer_or_mono,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
}
}
for(i=0;i<4;i++)if(!colorComponents.colorsToCorrect[i])input_bayer[i]=null;// leave composite greens even if disabled
for(i=0;i<4;i++)if(!colorComponents.colorsToCorrect[i])input_bayer_or_mono[i]=null;// leave composite greens even if disabled
double[][]PSF_shifts=newdouble[input_bayer.length][];// X/Y shift of the PSF array, in Bayer component pixel coordinates (same as PSF arrays)
double[][]PSF_centroids=newdouble[input_bayer.length][];// X/Y coordinates of the centroids of PSF in Bayer component pioxel coordinates (same as PSF arrays) (after they were optionally shifted)
double[][]PSF_shifts=newdouble[input_bayer_or_mono.length][];// X/Y shift of the PSF array, in Bayer component pixel coordinates (same as PSF arrays)
double[][]lateralChromatic=newdouble[input_bayer.length][];// X/Y coordinates of the centroids of Bayer component PSF in sensor pixel coordinates
double[][]PSF_centroids=newdouble[input_bayer_or_mono.length][];// X/Y coordinates of the centroids of PSF in Bayer component pioxel coordinates (same as PSF arrays) (after they were optionally shifted)
double[][]lateralChromatic=newdouble[input_bayer_or_mono.length][];// X/Y coordinates of the centroids of Bayer component PSF in sensor pixel coordinates
kernels[i]=combinePSF(inverted[i],// Square array of pixels with multiple repeated PSF (alternating sign)
inverted[i],// Square array of pixels with multiple repeated PSF (alternating sign)
!psfParameters.absoluteCenter,//true, // master, force ignoreChromatic
!psfParameters.absoluteCenter,//true, // master, force ignoreChromatic
PSF_shifts[i],// centerXY[] - will be modified inside combinePSF() if PSF_PARS.ignoreChromatic is true
PSF_shifts[i],// centerXY[] - will be modified inside combinePSF() if PSF_PARS.ignoreChromatic is true
PSF_centroids[i],// will return array of XY coordinates of the result centroid
PSF_centroids[i],// will return array of XY coordinates of the result centroid
...
@@ -2941,11 +2938,12 @@ public class EyesisAberrations {
...
@@ -2941,11 +2938,12 @@ public class EyesisAberrations {
(globalDebugLevel>4),
(globalDebugLevel>4),
globalDebugLevel
globalDebugLevel
);
);
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_shifts["+i+"][0]="+IJ.d2s(PSF_shifts[i][0],3)+" PSF_shifts["+i+"][1]="+IJ.d2s(PSF_shifts[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_shifts["+i+"][0]="+IJ.d2s(PSF_shifts[i][0],3)+" PSF_shifts["+i+"][1]="+IJ.d2s(PSF_shifts[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_centroids["+i+"][0]="+IJ.d2s(PSF_centroids[i][0],3)+" PSF_centroids["+i+"][1]="+IJ.d2s(PSF_centroids[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_centroids["+i+"][0]="+IJ.d2s(PSF_centroids[i][0],3)+" PSF_centroids["+i+"][1]="+IJ.d2s(PSF_centroids[i][1],3));
if(!psfParameters.ignoreChromatic&&!psfParameters.absoluteCenter){/* Recalculate center to pixels from greens (diagonal)) and supply it to other colors (lateral chromatic aberration correction) */
if(!psfParameters.ignoreChromatic&&!psfParameters.absoluteCenter){/* Recalculate center to pixels from greens (diagonal)) and supply it to other colors (lateral chromatic aberration correction) */
System.out.println("#!# "+x0+":"+y0+" "+"Lateral shift green from simulation "+IJ.d2s(lateralChromaticAbs[referenceComp],3)+"pix(sensor): ["+referenceComp+"][0]="+IJ.d2s(lateralChromatic[referenceComp][0],3)+
System.out.println("#!# "+x0+":"+y0+" "+"Lateral shift green from simulation "+IJ.d2s(lateralChromaticAbs[referenceComp],3)+"pix(sensor): ["+referenceComp+"][0]="+IJ.d2s(lateralChromatic[referenceComp][0],3)+