Class Peaks
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.imageparam.util.Peaks
-
public abstract class Peaks extends Object
- Author:
- Simon Dixon, updated by Azim Ahmadzadeh and Dustin Kempton, Data Mining Lab, Georgia State University
-
-
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 arraystatic LinkedList<Integer>
findPeaks(double[] data, int width, double threshold)
General peak picking method for finding local maxima in an arraystatic LinkedList<Integer>
findPeaks(double[] data, int width, double threshold, double decayRate, boolean isRelative)
General peak picking method for finding local maxima in an arraystatic 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)
-
-
-
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 datapeaks
- list of peak indexeswidth
- 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 datawidth
- minimum distance between peaksthreshold
- 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 datawidth
- minimum distance between peaksthreshold
- minimum value of peaksdecayRate
- how quickly previous peaks are forgottenisRelative
- 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 datahop
- spacing of data pointsn
- length of linear regressionslope
- 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)
-
-