public int [] peak(int x, int y)
	  {
		  // find the peak and minimum ssd coordinates.
		  float minp = Float.MAX_VALUE;
		  float mag = 0;
		  peakloc[0] = peakloc[1] = 0;
		  for (int l = -size/2; l <= size/2; l++)
		  {
			for (int k = -size/2; k <= size/2; k++)
			{
				// look for minimum in size/2xsize/2 central region only.
				/* COMPILER BUG. EXTERNALISED THIS CODE. */
				// Compiler bug! Inline code for offsets.
				int lo = l+size/2; int ko = k+size/2;
				int distance = l*l+k*k;
				if (l >= -size/4 && l <= size/4 && k >= -size/4 && k <= size/4)
				{
					// compiler bug???
					boolean test1 = Math.abs(w[lo][ko] - minp) <= 0.1;
					boolean test2 = distance < mag; // centrality
					boolean test3 = (minp - w[lo][ko]) > 0.1; // significance of delta.
					if (test1 && test2 || test3)
					{
						minp = w[lo][ko];
						peakloc[1] = l; peakloc[0] = k;
						mag = distance;  // Euclidean distance from center.
					}
				}
			}
		  }
		  return peakloc;
	  }