Class SelectByPeakThreshold


  • public class SelectByPeakThreshold
    extends Object
    Utility class for evaluating peaks in a dataset based on threshold conditions. The thresholds can be specified as scalar values or arrays, and peaks that meet the threshold criteria are selected.
    • Constructor Detail

      • SelectByPeakThreshold

        public SelectByPeakThreshold()
    • Method Detail

      • call

        public static SelectThresholdOutput call​(double[] x,
                                                 int[] peaks,
                                                 Either.OfTwo<Double,​double[]> tmin,
                                                 Either.OfTwo<Double,​double[]> tmax)
        Evaluates which peaks in the input array fulfill the threshold condition. The method determines whether the differences between the peak value and its adjacent values (left and right) lie within the specified minimum and maximum thresholds.
        Parameters:
        x - a 1-D array of values from which peaks are indexed.
        peaks - an array of indices representing the positions of the peaks in x.
        tmin - the minimum threshold, specified as either:
        • A scalar value to be applied uniformly to all peaks.
        • An array of thresholds, where each value corresponds to a specific peak.
        • Null, indicating no minimum threshold is applied.
        tmax - the maximum threshold, specified as either:
        • A scalar value to be applied uniformly to all peaks.
        • An array of thresholds, where each value corresponds to a specific peak.
        • Null, indicating no maximum threshold is applied.
        Returns:
        a SelectThresholdOutput object containing:
        • A boolean array indicating which peaks fulfill the threshold condition.
        • The left and right thresholds for each peak.