code: public double computePhase(int idx){
  		double r = real[idx];
  		double i = imag[idx];
  		return atan2(r, i);
  	}
docs: Calculates the phase of the pixel at the specified index.
  The phase is the argument of the complex number, i.e. the angle of the complex vector
  in the complex plane.
  @param idx index
  @return the phase in [0,2pi] of the complex number at index