pub struct ScanDescriptor {
pub ms_level: u8,
pub retention_time: f64,
pub isolation: Option<IsolationWindow>,
pub peaks: Vec<(f64, f32)>,
}Expand description
One vendor-neutral scan: a peak list plus acquisition metadata.
Intentionally has no ion-mobility dimension — it is the Bruker∩Thermo∩SCIEX common denominator. IMS-bearing Bruker frames are handled by the Bruker writer, which can flatten or carry mobility separately.
Fields§
§ms_level: u8§retention_time: f64§isolation: Option<IsolationWindow>Present for MS2 (the precursor isolation window).
peaks: Vec<(f64, f32)>(m/z, intensity) pairs; need not be sorted (writers sort).
Implementations§
Source§impl ScanDescriptor
impl ScanDescriptor
Sourcepub fn from_rendered_event(
ev: &RenderedEvent,
collision_energy: f64,
) -> Result<ScanDescriptor, String>
pub fn from_rendered_event( ev: &RenderedEvent, collision_energy: f64, ) -> Result<ScanDescriptor, String>
Convert a rendered event into a writer-ready descriptor (P6e-2 glue).
collision_energy is the window’s applied CE (eV/NCE) — it is NOT carried
on crate::sim::projector::RenderedEvent’s isolation (which is m/z-only),
so the driver supplies it. A crate::sim::projector::RenderedEvent::MobilityFrame
is not writable to a scan-based (Thermo) file. Peak m/z and intensity are
validated finite and the intensity is range-checked into f32 (claudex):
a non-finite or f32-overflowing value is a hard error rather than a NaN/inf
silently authored into the packet.
Trait Implementations§
Source§impl Clone for ScanDescriptor
impl Clone for ScanDescriptor
Source§fn clone(&self) -> ScanDescriptor
fn clone(&self) -> ScanDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScanDescriptor
impl RefUnwindSafe for ScanDescriptor
impl Send for ScanDescriptor
impl Sync for ScanDescriptor
impl Unpin for ScanDescriptor
impl UnsafeUnpin for ScanDescriptor
impl UnwindSafe for ScanDescriptor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.