public class SpectrumUtil extends Object
Constructor and Description |
---|
SpectrumUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
getIntensityLimit(Spectrum spectrum,
AnnotationParameters.IntensityThresholdType intensityThresholdType,
double thresholdValue)
Returns the limit in intensity according to the given threshold.
|
static int |
getNPeaksAboveThreshold(Spectrum spectrum,
int startIndex,
int endIndex,
double intensityThreshold)
Returns the number of peaks between the start index (inclusive) and the end index (exclusive) above the intensity threshold (inclusive).
|
static double[][] |
getPeaksAboveIntensityThreshold(Spectrum spectrum,
AnnotationParameters.IntensityThresholdType intensityThresholdType,
double thresholdValue)
Returns the peaks above intensity threshold as an array of double (mz,
intensity).
|
static int[] |
getWindowIndexes(Spectrum spectrum,
double mzMin,
double mzMax)
Returns the start (inclusive) and end (exclusive) indexes of the peaks between mzMin (inclusive) and mzMax (exclusive).
|
public static double getIntensityLimit(Spectrum spectrum, AnnotationParameters.IntensityThresholdType intensityThresholdType, double thresholdValue)
spectrum
- The spectrum.intensityThresholdType
- The type of intensity threshold.thresholdValue
- The threshold value.public static double[][] getPeaksAboveIntensityThreshold(Spectrum spectrum, AnnotationParameters.IntensityThresholdType intensityThresholdType, double thresholdValue)
spectrum
- The spectrum.intensityThresholdType
- The type of intensity threshold.thresholdValue
- The threshold value.public static int[] getWindowIndexes(Spectrum spectrum, double mzMin, double mzMax)
spectrum
- The spectrum to inspect.mzMin
- The inclusive lower boundary to use.mzMax
- The exclusive upper boundary to use.public static int getNPeaksAboveThreshold(Spectrum spectrum, int startIndex, int endIndex, double intensityThreshold)
spectrum
- The spectrum.startIndex
- The start index (inclusive).endIndex
- The end index (exclusive).intensityThreshold
- The intensity threshold (inclusive).Copyright © 2021. All rights reserved.