pub enum RefPeakDataLevel<'a, C: CentroidLike, D: DeconvolutedCentroidLike> {
Missing,
RawData(&'a BinaryArrayMap),
Centroid(&'a MZPeakSetType<C>),
Deconvoluted(&'a MassPeakSetType<D>),
}Expand description
An variant for dispatching to different strategies of computing common statistics of different levels of peak data.
Variants§
Missing
No signal data is present
RawData(&'a BinaryArrayMap)
Raw BinaryArrayMap exists
Centroid(&'a MZPeakSetType<C>)
A m/z centroid peak list exists
Deconvoluted(&'a MassPeakSetType<D>)
A neutral mass peak list exists
Implementations§
Source§impl<C: CentroidLike, D: DeconvolutedCentroidLike> RefPeakDataLevel<'_, C, D>
impl<C: CentroidLike, D: DeconvolutedCentroidLike> RefPeakDataLevel<'_, C, D>
Sourcepub fn base_peak(&self) -> CentroidPeak
pub fn base_peak(&self) -> CentroidPeak
Compute the base peak of a spectrum
Sourcepub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
pub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
Find the point coordinate within the peak layer’s coordinate system.
NOTE: The Self::Deconvoluted layer uses the neutral mass coordinate system compared to the others, it should
be explicitly tested against.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Find the number of points in a profile spectrum, or the number of peaks for a centroid spectrum
Sourcepub fn iter(&self) -> PeakDataIterDispatch<'_, C, D> ⓘ
pub fn iter(&self) -> PeakDataIterDispatch<'_, C, D> ⓘ
Iterate over MZPoint data encoded in the peak data.
NOTE: Values are produced in the order they are stored, so the data are not guaranteed to be ordered by m/z.
Sourcepub fn get(&self, i: usize) -> Option<MZPoint>
pub fn get(&self, i: usize) -> Option<MZPoint>
Get the ith point in the peak data.
NOTE: There is no guarantee that values are stored in m/z order.
Sourcepub fn fetch_summaries(&self) -> SpectrumSummary
pub fn fetch_summaries(&self) -> SpectrumSummary
Compute summary information about the peak data’s m/z range, base peak, total ion current, and number of data points