Struct mzsignal::reprofile::PeakSetReprofiler
source · pub struct PeakSetReprofiler {
pub mz_grid: Vec<f64>,
pub mz_start: f64,
pub mz_end: f64,
}
Expand description
A probabilistic peak shape re-construction spectrum intensity averager over a shared m/z axis.
Fields§
§mz_grid: Vec<f64>
The evenly spaced m/z axis over which peaks are re-estimated
mz_start: f64
The lowest m/z in the spectrum. If an input spectrum has lower m/z values, they will be ignored.
mz_end: f64
The highest m/z in the spectrum. If an input spectrum has higher m/z values, they will be ignored.
Implementations§
source§impl<'passing, 'transient: 'passing, 'lifespan: 'transient> PeakSetReprofiler
impl<'passing, 'transient: 'passing, 'lifespan: 'transient> PeakSetReprofiler
pub fn new(mz_start: f64, mz_end: f64, dx: f64) -> PeakSetReprofiler
sourcepub fn build_peak_shape_models<T>(
&self,
peaks: &'lifespan [T],
shape: PeakShape
) -> Vec<PeakShapeModel<'lifespan>>
pub fn build_peak_shape_models<T>( &self, peaks: &'lifespan [T], shape: PeakShape ) -> Vec<PeakShapeModel<'lifespan>>
Create an array of PeakShapeModel
s from an array of structs that can convert
into them, using shape
for the type of peak shape.
sourcepub fn reprofile_from_models(
&'lifespan self,
models: &[PeakShapeModel<'transient>]
) -> ArrayPair<'lifespan>
pub fn reprofile_from_models( &'lifespan self, models: &[PeakShapeModel<'transient>] ) -> ArrayPair<'lifespan>
Create a new spectrum from models
over the shared m/z axis
sourcepub fn reprofile<T: Into<PeakShapeModel<'transient>> + Clone>(
&'lifespan self,
peaks: &'lifespan [T]
) -> ArrayPair<'lifespan>
pub fn reprofile<T: Into<PeakShapeModel<'transient>> + Clone>( &'lifespan self, peaks: &'lifespan [T] ) -> ArrayPair<'lifespan>
Create a new spectrum from peaks
after creating PeakShapeModel
s of them
over the shared m/z axis
sourcepub fn reprofile_from_centroids<T>(
&'lifespan self,
peaks: &'lifespan [T],
fwhm: f32
) -> ArrayPair<'lifespan>where
T: AsPeakShapeModel<'passing, 'passing>,
pub fn reprofile_from_centroids<T>(
&'lifespan self,
peaks: &'lifespan [T],
fwhm: f32
) -> ArrayPair<'lifespan>where
T: AsPeakShapeModel<'passing, 'passing>,
Create a new spectrum from peaks
after creating PeakShapeModel
s of them
over the shared m/z axis using a uniform peak width parameter fwhm
Trait Implementations§
source§impl Clone for PeakSetReprofiler
impl Clone for PeakSetReprofiler
source§fn clone(&self) -> PeakSetReprofiler
fn clone(&self) -> PeakSetReprofiler
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PeakSetReprofiler
impl Debug for PeakSetReprofiler
source§impl Default for PeakSetReprofiler
impl Default for PeakSetReprofiler
source§fn default() -> PeakSetReprofiler
fn default() -> PeakSetReprofiler
source§impl MZGrid for PeakSetReprofiler
impl MZGrid for PeakSetReprofiler
fn mz_grid(&self) -> &[f64]
fn create_intensity_array(&self) -> Vec<f32>
fn create_intensity_array_of_size(&self, size: usize) -> Vec<f32>
fn find_offset(&self, mz: f64) -> usize
fn points_between(&self, start_mz: f64, end_mz: f64) -> usize
fn copy_mz_array(&self) -> Vec<f64>
Auto Trait Implementations§
impl Freeze for PeakSetReprofiler
impl RefUnwindSafe for PeakSetReprofiler
impl Send for PeakSetReprofiler
impl Sync for PeakSetReprofiler
impl Unpin for PeakSetReprofiler
impl UnwindSafe for PeakSetReprofiler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.