public void check(int x, int y, int [] loc, float startmag)
	  {
			int r = 10;
			float [][] SSD = new float[size][size];
			int N = size/4;

			for (int l = -size/2; l <= size/2; l++)
				for (int k = -size/2; k <= size/2; k++)
					SSD[l+size/2][k+size/2] = w[l+size/2][k+size/2];
			IJ.write("Check minima at "+x+","+y+" max (peak)="+loc[0]+","+loc[1]);
			for (int i=0;i<r;i++)
			{
				  float min_value = Float.MAX_VALUE;
				  float SSDmag = startmag;   // 0 or MAX_VALUE;
				  int u_min = 0; int v_min = 0;
				  for (int u=(-N);u<=N;u++)
				  for (int v=(-N);v<=N;v++)
					{
						  int u_index = u+N;
						int v_index = v+N;
						if ((Math.abs(SSD[u_index][v_index] - min_value) <= 0.1 && (u*u+v*v) < SSDmag)
							||
						  (min_value - SSD[u_index][v_index] > 0.1))
						{
								  min_value = SSD[u_index][v_index];
							  v_min = v; u_min = u;
							  SSDmag = u*u+v*v;  // Euclidean distance from center.
						}
					}
				  SSD[u_min+N][v_min+N] = Float.MAX_VALUE;
				  if (startmag < 1)
						IJ.write(""+i+"th minimum: "+min_value+" at "+u_min+","+v_min
						+" SSDmag: "+(u_min*u_min+v_min*v_min));
				  else  IJ.write(""+i+"th minimum: "+min_value+" at "+u_min+","+v_min);

			}
	  }