public class Spectrum extends ExperimentObject
Modifier and Type | Field and Description |
---|---|
double[] |
intensity
The array of the intensities of the peaks.
|
double[] |
mz
The array of the m/z of the peaks.
|
Precursor |
precursor
The precursor if any.
|
NO_KEY
Constructor and Description |
---|
Spectrum()
Empty default constructor.
|
Spectrum(Precursor precursor,
double[] mz,
double[] intensities)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getMaxIntensity()
Returns the max intensity value.
|
double |
getMaxMz()
Returns the max mz value.
|
double |
getMinMz()
Returns the min mz value.
|
int |
getNPeaks()
Returns the number of peaks.
|
String |
getPeakListAsString()
Returns the peak list as an array list formatted as text, e.g.
|
Precursor |
getPrecursor()
Returns the precursor.
|
double |
getTotalIntensity()
Returns the total intensity of the spectrum.
|
boolean |
isSameAs(Spectrum otherSpectrum)
Returns a boolean indicating whether the spectrum is identical to the
other spectrum.
|
String |
toString() |
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public Precursor precursor
public double[] mz
public double[] intensity
public Spectrum()
public Spectrum(Precursor precursor, double[] mz, double[] intensities)
precursor
- The precursor.mz
- The array of mz of the peaks.intensities
- The array of intensities of the peaks.public String getPeakListAsString()
public double getTotalIntensity()
public double getMaxIntensity()
public double getMaxMz()
public double getMinMz()
public Precursor getPrecursor()
public int getNPeaks()
public boolean isSameAs(Spectrum otherSpectrum)
otherSpectrum
- The other spectrum.Copyright © 2021. All rights reserved.