Class Peaks


  • public abstract class Peaks
    extends Object
    Author:
    Simon Dixon, updated by Azim Ahmadzadeh and Dustin Kempton, Data Mining Lab, Georgia State University
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean debug  
      static int post  
      static int pre  
    • Constructor Summary

      Constructors 
      Constructor Description
      Peaks()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double expDecayWithHold​(double av, double decayRate, double[] data, int start, int stop)  
      static int findPeaks​(double[] data, int[] peaks, int width)
      General peak picking method for finding n local maxima in an array
      static LinkedList<Integer> findPeaks​(double[] data, int width, double threshold)
      General peak picking method for finding local maxima in an array
      static LinkedList<Integer> findPeaks​(double[] data, int width, double threshold, double decayRate, boolean isRelative)
      General peak picking method for finding local maxima in an array
      static void getSlope​(double[] data, double hop, int n, double[] slope)
      Uses an n-point linear regression to estimate the slope of data.
      static int imax​(double[] arr)  
      static int imin​(double[] arr)  
      static double max​(double[] arr)  
      static double min​(double[] arr)  
      static void normalise​(double[] data)  
      static boolean overThreshold​(double[] data, int index, int width, double threshold, boolean isRelative, double av)  
    • Field Detail

      • debug

        public static boolean debug
      • pre

        public static int pre
      • post

        public static int post
    • Constructor Detail

      • Peaks

        public Peaks()
    • Method Detail

      • findPeaks

        public static int findPeaks​(double[] data,
                                    int[] peaks,
                                    int width)
        General peak picking method for finding n local maxima in an array
        Parameters:
        data - input data
        peaks - list of peak indexes
        width - minimum distance between peaks
      • findPeaks

        public static LinkedList<Integer> findPeaks​(double[] data,
                                                    int width,
                                                    double threshold)
        General peak picking method for finding local maxima in an array
        Parameters:
        data - input data
        width - minimum distance between peaks
        threshold - minimum value of peaks
        Returns:
        list of peak indexes
      • findPeaks

        public static LinkedList<Integer> findPeaks​(double[] data,
                                                    int width,
                                                    double threshold,
                                                    double decayRate,
                                                    boolean isRelative)
        General peak picking method for finding local maxima in an array
        Parameters:
        data - input data
        width - minimum distance between peaks
        threshold - minimum value of peaks
        decayRate - how quickly previous peaks are forgotten
        isRelative - minimum value of peaks is relative to local average
        Returns:
        list of peak indexes
      • expDecayWithHold

        public static double expDecayWithHold​(double av,
                                              double decayRate,
                                              double[] data,
                                              int start,
                                              int stop)
      • overThreshold

        public static boolean overThreshold​(double[] data,
                                            int index,
                                            int width,
                                            double threshold,
                                            boolean isRelative,
                                            double av)
      • normalise

        public static void normalise​(double[] data)
      • getSlope

        public static void getSlope​(double[] data,
                                    double hop,
                                    int n,
                                    double[] slope)
        Uses an n-point linear regression to estimate the slope of data.
        Parameters:
        data - input data
        hop - spacing of data points
        n - length of linear regression
        slope - output data
      • min

        public static double min​(double[] arr)
      • max

        public static double max​(double[] arr)
      • imin

        public static int imin​(double[] arr)
      • imax

        public static int imax​(double[] arr)