pub enum TimsDataLoader {
InMemory(TimsInMemoryLoader),
Lazy(TimsLazyLoder),
}Variants§
InMemory(TimsInMemoryLoader)
Lazy(TimsLazyLoder)
Implementations§
Source§impl TimsDataLoader
impl TimsDataLoader
pub fn new_lazy( bruker_lib_path: &str, data_path: &str, use_bruker_sdk: bool, scan_max_index: u32, im_lower: f64, im_upper: f64, tof_max_index: u32, mz_lower: f64, mz_upper: f64, ) -> Self
pub fn new_in_memory( bruker_lib_path: &str, data_path: &str, use_bruker_sdk: bool, scan_max_index: u32, im_lower: f64, im_upper: f64, tof_max_index: u32, mz_lower: f64, mz_upper: f64, ) -> Self
Sourcepub fn new_lazy_with_calibration(
data_path: &str,
tof_max_index: u32,
mz_lower: f64,
mz_upper: f64,
im_lookup: Vec<f64>,
) -> Self
pub fn new_lazy_with_calibration( data_path: &str, tof_max_index: u32, mz_lower: f64, mz_upper: f64, im_lookup: Vec<f64>, ) -> Self
Create a lazy loader with pre-computed ion mobility calibration lookup table.
This method enables accurate ion mobility calibration with fast parallel extraction. The im_lookup table should be pre-computed using the Bruker SDK.
§Arguments
data_path- Path to the .d foldertof_max_index- Maximum TOF index (from GlobalMetaData)mz_lower- Minimum m/z value (from GlobalMetaData)mz_upper- Maximum m/z value (from GlobalMetaData)im_lookup- Pre-computed scan→1/K0 lookup table
§Returns
A new TimsDataLoader with LookupIndexConverter
Sourcepub fn new_in_memory_with_calibration(
data_path: &str,
tof_max_index: u32,
mz_lower: f64,
mz_upper: f64,
im_lookup: Vec<f64>,
) -> Self
pub fn new_in_memory_with_calibration( data_path: &str, tof_max_index: u32, mz_lower: f64, mz_upper: f64, im_lookup: Vec<f64>, ) -> Self
Create an in-memory loader with pre-computed ion mobility calibration lookup table.
This method enables accurate ion mobility calibration with fast parallel extraction. The im_lookup table should be pre-computed using the Bruker SDK.
§Arguments
data_path- Path to the .d foldertof_max_index- Maximum TOF index (from GlobalMetaData)mz_lower- Minimum m/z value (from GlobalMetaData)mz_upper- Maximum m/z value (from GlobalMetaData)im_lookup- Pre-computed scan→1/K0 lookup table
§Returns
A new TimsDataLoader with LookupIndexConverter
Sourcepub fn new_lazy_with_mz_calibration(
data_path: &str,
tof_intercept: f64,
tof_slope: f64,
im_min: f64,
im_max: f64,
scan_max_index: u32,
) -> Self
pub fn new_lazy_with_mz_calibration( data_path: &str, tof_intercept: f64, tof_slope: f64, im_min: f64, im_max: f64, scan_max_index: u32, ) -> Self
Create a lazy loader with full calibration (both m/z and IM).
This method uses regression-derived m/z calibration coefficients instead of the simple boundary model, providing more accurate m/z conversion.
§Arguments
data_path- Path to the .d foldertof_intercept- Intercept for sqrt(mz) = intercept + slope * toftof_slope- Slope for sqrt(mz) = intercept + slope * tofim_min- Minimum 1/K0 valueim_max- Maximum 1/K0 valuescan_max_index- Maximum scan index
Sourcepub fn new_in_memory_with_mz_calibration(
data_path: &str,
tof_intercept: f64,
tof_slope: f64,
im_min: f64,
im_max: f64,
scan_max_index: u32,
) -> Self
pub fn new_in_memory_with_mz_calibration( data_path: &str, tof_intercept: f64, tof_slope: f64, im_min: f64, im_max: f64, scan_max_index: u32, ) -> Self
Create an in-memory loader with full calibration (both m/z and IM).
This method uses regression-derived m/z calibration coefficients instead of the simple boundary model, providing more accurate m/z conversion.
pub fn get_index_converter(&self) -> &dyn IndexConverter
Sourcepub fn uses_bruker_sdk(&self) -> bool
pub fn uses_bruker_sdk(&self) -> bool
Check if the Bruker SDK is being used for index conversion. The Bruker SDK is NOT thread-safe, so parallel operations that call the index converter must be disabled when using the SDK.
Trait Implementations§
Source§impl TimsData for TimsDataLoader
impl TimsData for TimsDataLoader
fn get_frame(&self, frame_id: u32) -> TimsFrame
fn get_raw_frame(&self, frame_id: u32) -> RawTimsFrame
fn get_slice(&self, frame_ids: Vec<u32>, num_threads: usize) -> TimsSlice
fn get_acquisition_mode(&self) -> AcquisitionMode
fn get_frame_count(&self) -> i32
fn get_data_path(&self) -> &str
Auto Trait Implementations§
impl Freeze for TimsDataLoader
impl RefUnwindSafe for TimsDataLoader
impl Send for TimsDataLoader
impl Sync for TimsDataLoader
impl Unpin for TimsDataLoader
impl UnwindSafe for TimsDataLoader
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> 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.