pub struct MobilityCalibrator {
pub ndelay: f64,
pub dv_start: f64,
pub ttrans: f64,
pub c0m: f64,
pub c1m: f64,
pub vmin: f64,
pub vmax: f64,
pub slope: f64,
}Expand description
Ion-mobility axis calibration (Bruker “model type 2”, the only TIMS model).
Two steps, both exact ports of PAPPSO timsframebase.cpp:
- scan -> trapping voltage:
V = dv_start + slope*(scan - ttrans - ndelay)withslope = (dv_end - dv_start) / ncycles. V must lie in [vmin,vmax]. - voltage -> inverse mobility:
1/K0 = 1 / (C0m + C1m / V).
Coefficient meaning (columns of the TimsCalibration table, ModelType 2):
C0=ndelay— scan offset (delay), subtracted before scaling.C1=ncycles— number of TIMS cycles; sets the voltage-vs-scan slope.C2=dv_start— trapping voltage at the start of the ramp.C3=dv_end— trapping voltage at the end of the ramp.C4=ttrans— transit time in cycles, subtracted before scaling.C5— unused by the mobility formula (polynomial grade flag).C6=C0m— additive constant of the mobility reciprocal.C7=C1m— voltage-scaled term of the mobility reciprocal.C8=vmin— lower voltage validity bound.C9=vmax— upper voltage validity bound.
Fields§
§ndelay: f64§dv_start: f64§ttrans: f64§c0m: f64§c1m: f64§vmin: f64§vmax: f64§slope: f64Implementations§
Source§impl MobilityCalibrator
impl MobilityCalibrator
Sourcepub fn new(
c0: f64,
c1: f64,
c2: f64,
c3: f64,
c4: f64,
_c5: f64,
c6: f64,
c7: f64,
c8: f64,
c9: f64,
) -> Self
pub fn new( c0: f64, c1: f64, c2: f64, c3: f64, c4: f64, _c5: f64, c6: f64, c7: f64, c8: f64, c9: f64, ) -> Self
Build from raw TimsCalibration C0..C9 (ModelType must be 2).
Sourcepub fn scan_to_one_over_k0(&self, scan: u32) -> f64
pub fn scan_to_one_over_k0(&self, scan: u32) -> f64
scan index -> 1/K0 (inverse reduced ion mobility).
Sourcepub fn one_over_k0_to_scan(&self, one_over_k0: f64) -> u32
pub fn one_over_k0_to_scan(&self, one_over_k0: f64) -> u32
1/K0 -> nearest scan index (exact algebraic inverse, then round).
Trait Implementations§
Source§impl Clone for MobilityCalibrator
impl Clone for MobilityCalibrator
Source§fn clone(&self) -> MobilityCalibrator
fn clone(&self) -> MobilityCalibrator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MobilityCalibrator
impl RefUnwindSafe for MobilityCalibrator
impl Send for MobilityCalibrator
impl Sync for MobilityCalibrator
impl Unpin for MobilityCalibrator
impl UnsafeUnpin for MobilityCalibrator
impl UnwindSafe for MobilityCalibrator
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.