/**
  * Here the actual processing of the frequency-domain frame (in cartesian coordinates) happens.
  * This implementation converts to polar coordinates calls processPolar(), and converts the result
  * back to cartesian coordinates.
  *
  * @param real real
  * @param imag imag
  */
 protected final void process(double[] real, double[] imag) {
   MathUtils.toPolarCoordinates(real, imag);
   // for readability:
   double[] r = real;
   double[] phi = imag;
   // Now do something meaningful with the fourier transform
   processPolar(r, phi);
   // Convert back:
   MathUtils.toCartesianCoordinates(real, imag);
 }