public class SpectrumData extends Object
Modifier and Type | Field and Description |
---|---|
protected float[] |
intensityList
The intensity list.
|
protected float[] |
leftHwhmList
The left hwhm list.
|
protected double[] |
mzList
The mz list.
|
protected int |
peaksCount |
protected float[] |
rightHwhmList
The right hwhm list.
|
Constructor and Description |
---|
SpectrumData(double[] mzList,
float[] intensityList)
Instantiates a new spectrum data.
|
SpectrumData(double[] mzList,
float[] intensityList,
float[] lHwhmList,
float[] rHwhmList)
Instantiates a new spectrum data.
|
Modifier and Type | Method and Description |
---|---|
void |
addSpectrumData(SpectrumData spectrumData)
Adds the spectrum data.
|
float[] |
getIntensityList()
Gets the intensity list.
|
float[] |
getLeftHwhmList()
Gets the left hwhm list.
|
double |
getMaxMz()
Gets the max mz.
|
double |
getMinMz()
Gets the min mz.
|
double[] |
getMzList()
Gets the mz list.
|
Peak |
getNearestPeak(double mz,
double mzTolPPM,
ILcContext lcContext)
assuming mzList is sorted
|
int |
getNearestPeakIndex(double value) |
int |
getPeakIndex(double value,
double ppmTol) |
int |
getPeaksCount()
Gets the peaks count.
|
float[] |
getRightHwhmList()
Gets the right hwhm list.
|
boolean |
isEmpty()
Checks if is empty.
|
SpectrumData |
mzRangeFilter(double mzMin,
double mzMax)
Mz range filter.
|
void |
resizeDataArrays(int newLength)
Resize data arrays.
|
Peak[] |
toPeaks(ILcContext lcContext)
To peaks.
|
protected double[] mzList
protected float[] intensityList
protected float[] leftHwhmList
protected float[] rightHwhmList
protected int peaksCount
public SpectrumData(double[] mzList, float[] intensityList, float[] lHwhmList, float[] rHwhmList)
mzList
- the mz listintensityList
- the intensity listlHwhmList
- the l hwhm listrHwhmList
- the r hwhm listpublic SpectrumData(double[] mzList, float[] intensityList)
mzList
- the mz listintensityList
- the intensity listpublic int getPeaksCount()
public double[] getMzList()
public float[] getIntensityList()
public float[] getLeftHwhmList()
public float[] getRightHwhmList()
public Peak[] toPeaks(ILcContext lcContext)
public void addSpectrumData(SpectrumData spectrumData)
spectrumData
- the spectrum datapublic void resizeDataArrays(int newLength)
newLength
- the new lengthpublic double getMinMz()
public double getMaxMz()
public boolean isEmpty()
public Peak getNearestPeak(double mz, double mzTolPPM, ILcContext lcContext)
public int getNearestPeakIndex(double value)
public int getPeakIndex(double value, double ppmTol)
public SpectrumData mzRangeFilter(double mzMin, double mzMax)
mzMin
- the mz minmzMax
- the mz maxCopyright © 2019. All rights reserved.