pub struct Centroided<S: SpectrumSource> { /* private fields */ }Expand description
Wraps a SpectrumSource, centroiding every profile-mode spectrum it
yields. Spectra already tagged ScanMode::Centroid pass through
unchanged (idempotent).
Implementations§
Source§impl<S: SpectrumSource> Centroided<S>
impl<S: SpectrumSource> Centroided<S>
Sourcepub fn new(inner: S) -> Self
pub fn new(inner: S) -> Self
Wrap inner, picking every local-maximum peak regardless of height.
Sourcepub fn with_min_intensity(self, min_intensity: f32) -> Self
pub fn with_min_intensity(self, min_intensity: f32) -> Self
Discard picked peaks below min_intensity (a simple noise floor).
Trait Implementations§
Source§impl<S: SpectrumSource> SpectrumSource for Centroided<S>
impl<S: SpectrumSource> SpectrumSource for Centroided<S>
Source§fn run_metadata(&self) -> RunMetadata
fn run_metadata(&self) -> RunMetadata
Run-level metadata. Cheap to call; vendors typically build this once.
Source§fn iter_spectra<'a>(
&'a mut self,
) -> Box<dyn Iterator<Item = SpectrumRecord> + 'a>
fn iter_spectra<'a>( &'a mut self, ) -> Box<dyn Iterator<Item = SpectrumRecord> + 'a>
Iterate every spectrum the file contains. Spectra the parser cannot
decode should be skipped silently; the writer trusts whatever the
iterator yields. Read more
Source§fn iter_chromatograms<'a>(
&'a mut self,
) -> Box<dyn Iterator<Item = ChromatogramRecord> + 'a>
fn iter_chromatograms<'a>( &'a mut self, ) -> Box<dyn Iterator<Item = ChromatogramRecord> + 'a>
Iterate chromatogram traces (TIC, BPC, SRM). Defaults to an empty
iterator; most parsers do not synthesize chromatograms.
Source§fn spectrum_count_hint(&self) -> Option<usize>
fn spectrum_count_hint(&self) -> Option<usize>
Total number of spectra the source will yield, when known cheaply.
Used by the mzML writer to populate
<spectrumList count="...">. If
None, the writer falls back to buffering spectrum offsets and
patching the count at the end.Auto Trait Implementations§
impl<S> Freeze for Centroided<S>where
S: Freeze,
impl<S> RefUnwindSafe for Centroided<S>where
S: RefUnwindSafe,
impl<S> Send for Centroided<S>where
S: Send,
impl<S> Sync for Centroided<S>where
S: Sync,
impl<S> Unpin for Centroided<S>where
S: Unpin,
impl<S> UnsafeUnpin for Centroided<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Centroided<S>where
S: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more