distortionParameters.correlationRadiusScale);// if 0 - use sigma as radius, inside - 1.0, outside 0.0. If >0 - size of array n*sigma
intumax,vmax,vmin,umin;
finalAtomicIntegeraddedCells=newAtomicInteger(0);// cells added at cleanup stage
finalAtomicBooleancleanup=newAtomicBoolean(false);// after the wave dies, it will be restored for all cells with defined neigbors to try again. maybe - try w/o therads?
finalAtomicIntegerdebugCellSet=newAtomicInteger(0);// cells added at cleanup stage
// special case (most common, actually) when initial wave has 1 node. Remove it after processing
distortionParameters.correlationRadiusScale);// if 0 - use sigma as radius, inside - 1.0, outside 0.0. If >0 - size of array n*sigma
intumax,vmax,vmin,umin;
finalAtomicIntegeraddedCells=newAtomicInteger(0);// cells added at cleanup stage
finalAtomicBooleancleanup=newAtomicBoolean(false);// after the wave dies, it will be restored for all cells with defined neigbors to try again. maybe - try w/o therads?
finalAtomicIntegerdebugCellSet=newAtomicInteger(0);// cells added at cleanup stage
// special case (most common, actually) when initial wave has 1 node. Remove it after processing
elsehasNeededNeighbor=focusMask[iy*getImageWidth()+ix];//* OOB -1624 java.lang.ArrayIndexOutOfBoundsException: -1624, at MatchSimulatedPattern.distortions(MatchSimulatedPattern.java:3063), at LensAdjustment.updateFocusGrid(LensAdjustment.java:121), at Aberration_Calibration.measurePSFMetrics(Aberration_Calibration.java:5994)
}
// TODO: find how it could get negative coordinates
elsehasNeededNeighbor=focusMask[iy*getImageWidth()+ix];//* OOB -1624 java.lang.ArrayIndexOutOfBoundsException: -1624, at MatchSimulatedPattern.distortions(MatchSimulatedPattern.java:3063), at LensAdjustment.updateFocusGrid(LensAdjustment.java:121), at Aberration_Calibration.measurePSFMetrics(Aberration_Calibration.java:5994)
}
for(dir=0;dir<directionsUV.length;dir++){
iUV[0]=uvdir[0]+directionsUV[dir][0];
iUV[1]=uvdir[1]+directionsUV[dir][1];
if((iUV[0]<0)||(iUV[1]<0)||
(iUV[0]>=distortionParameters.gridSize)||(iUV[1]>=distortionParameters.gridSize))continue;// don't fit into UV grid