Class AlgorithmHilbertTransform

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmHilbertTransform
    extends AlgorithmBase
    • Field Detail

      • z

        private double[] z
        The Hilbert tramsform and the other needed supporting routines are ported from the file transform.c written by Scott Paine of the Smithsonian Astrophysical Observatory, Submillimeter Receiver Laboratory on February 2, 2010. Scott Paine wrote these routines with the add of Joerg Arndt's excellent text, "Matters Computational," online at http://www.jjj.de./fxt All of the functions assume n is a power of 2, without checking Purpose: Given a real sequence, initially stored in the complex array z, this function computes the corresponding analytic sequence. The imaginary part is the Hilbert transform of the real part.
      • n

        private int n
    • Constructor Detail

      • AlgorithmHilbertTransform

        public AlgorithmHilbertTransform​(double[] z,
                                         int n)
    • Method Detail

      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • fft_dif

        private void fft_dif​(double[] z,
                             int n)
        void fft_dif(double z[], int n) Purpose: Computes the forward discrete Fourier transform of a complex sequence z, using a radix 2 decimation-in-frequency FFT. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in normal order. On return, the FT is stored in bit-reversed order. n must be a power of 2. Arguments: double z[] - array of 2n doubles, representing n complex numbers int n - dimension of z, must be a power of 2 Return: none
      • fft_dif_rec

        private void fft_dif_rec​(double[] z,
                                 int n,
                                 int nbranch)
        static void fft_dif_rec(double z[], int n, int nbranch) Purpose: Computes the forward discrete Fourier transform of a complex sequence z, using a radix 2 decimation-in-frequency FFT. If the computation is small enough to fit in cache, it is done iteratively. Otherwise, it is done recursively until the recursion descends to cache-sized chunks. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in normal order. On return, the FT is stored in bit-reversed order. n must be a power of 2. To support OpenMP parallelism, nbranch keeps track of the number of active transforms at a given recursion level. On the first call to this function, nbranch should be 1. It is then doubled for each recursion. Arguments: double z[] - array of 2n doubles, representing n complex numbers int n - dimension of z, must be a power of 2 int nbranch - number of transforms at this recursion level Return: none
      • fft_dif_iter

        private void fft_dif_iter​(double[] z,
                                  int n)
        static void fft_dif_iter(double *z, unsigned long n) Purpose: Computes the forward discrete Fourier transform of a complex sequence z, using an iterative radix 2 decimation-in-frequency FFT. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in normal order. On return, the FT is stored in bit-reversed order. n must be a power of 2. Arguments: double *z - array of 2n doubles, representing n complex numbers unsigned long n - dimension of z, must be a power of 2 Return: none
      • ifft_dit

        private void ifft_dit​(double[] z,
                              int n)
        void ifft_dit(double z[], int n) Purpose: Computes the inverse discrete Fourier transform of a complex sequence z, using a radix 2 decimation-in-time FFT. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in bit-reversed order. The returned inverse FT is restored to normal order. n must be a power of 2. Arguments: double z[] - array of 2n doubles, representing n complex numbers int n - dimension of z, must be a power of 2 Return: none
      • ifft_dit_rec

        private void ifft_dit_rec​(double[] z,
                                  int n,
                                  int nbranch)
        static void ifft_dit_rec(double z[], int n, int nbranch) Purpose: Computes the inverse discrete Fourier transform of a complex sequence z, using a radix 2 decimation-in-time FFT. If the computation is small enough to fit in cache, it is done iteratively. Otherwise, it is done recursively until the recursion descends to cache-sized chunks. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in normal order. On return, the FT is stored in bit-reversed order. n must be a power of 2. To support OpenMP parallelism, nbranch keeps track of the number of active transforms at a given recursion level. On the first call to this function, nbranch should be 1. It is then doubled for each recursion. Arguments: double z[] - array of 2n doubles, representing n complex numbers int n - dimension of z, must be a power of 2 int nbranch - number of transforms at this recursion level Return: none
      • ifft_dit_iter

        private void ifft_dit_iter​(double[] z,
                                   int n)
        static void ifft_dit_iter(double *z, unsigned long n) Purpose: Computes the inverse discrete Fourier transform of a complex sequence z, using an iterative radix 2 decimation-in-time FFT. z[0..2n-1] is an array of n complex numbers, stored in the usual way with real elements in z[0,2,..2n-2] and imaginary elements in z[1,3,..2n-1]. Entering this function, z[] should be in bit-reversed order. The returned inverse FT is restored to normal order. n must be a power of 2. Arguments: double *z - array of 2n doubles, representing n complex numbers unsigned long n - dimension of z, must be a power of 2 Return: none