Examples of complexForward()


Examples of edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D.complexForward()

      array[i*2+1] = x.getElementAsComplex(i).getImaginary();
    }
    if(inverse) {
      fft.complexInverse(array, false);
    } else {
      fft.complexForward(array);
    }
    return toComplex(array);
  }
 
  private static ComplexVector realFFT(Vector x, boolean inverse) {
View Full Code Here

Examples of edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D.complexForward()

        DoubleFFT_1D fourierTransform = new DoubleFFT_1D(numberOfSamples);
        //ComplexArray specElement;
        for (int i = 0; i < numberOfTraces; i++) {
                 double[] interleaved = this.fid[i].toDoubleArray(
                                ComplexArray.reductionMode.INTERLEAVED);
               fourierTransform.complexForward(interleaved);
               ComplexArray tmp = new ComplexArray(numberOfSamples);
               tmp.setInterleavedDoubles(interleaved);
               this.spec[i] = tmp.circShift().clone();
           
        }
View Full Code Here

Examples of edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D.complexForward()

            //The number of coefficients for the FFT
            int transformLength = coef.length / 2// N real, imag pairs

            // Perform the FFT. Values are placed back in coef[].
            DoubleFFT_1D fft = new DoubleFFT_1D(transformLength);
            fft.complexForward(coef);

            // Swap the left/right halves of the output array
            // to get the negative freqs into the proper place.
            for (int i = 0; i < transformLength; ++i)
            {
View Full Code Here

Examples of edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D.complexForward()

    DoubleFFT_1D fft = CACHE_1D.get(n);
    if (fft == null) {
      fft = new DoubleFFT_1D(n);
      CACHE_1D.put(n, fft);
    }
    fft.complexForward(a);
    return unpackFull(a);
  }

  /**
   * The inverse (backward) discrete Fourier transform. *Note:* In this
View Full Code Here

Examples of edu.emory.mathcs.jtransforms.fft.DoubleFFT_2D.complexForward()

      for (int j = 0; j < 20; j++) {
        field[i][j] = 0;
      }
    }

    fft.complexForward(field);

  }
 
  void assertAlmostEquals(String text, double x, double y, double limit) {
    if ((Math.abs(x - y) / Math.abs(x + y) > limit)
View Full Code Here

Examples of edu.emory.mathcs.jtransforms.fft.FloatFFT_1D.complexForward()

      for (int i = 0; i < 2 * length; i++) {
        input[i] = (float) data[i];
      }

      FloatFFT_1D fftlib = new FloatFFT_1D(length);
      fftlib.complexForward(input);
      //        int multiplier = (int) (BASE_FREQUENCY / ((float) SAMPLE_RATE / (float) FFT_SIZE));

      float outputData[] = new float[(input.length + 1) / 2];
      for (int i = 0; i < length / 2; i++) {
        outputData[i] = (float) Math.sqrt((Math.pow(input[2 * i], 2)) + (Math.pow(input[2 * i + 1], 2)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.