pub fn apply_transmission(
midpoint: f64,
window_length: f64,
k: f64,
mz: Vec<f64>,
) -> Vec<f64>
Expand description
Apply ion transmission function to mz values
Arguments:
midpoint
- center of the stepwindow_length
- length of the stepk
- steepness of the stepmz
- mz values
Returns:
Vec<f64>
- transmission probability for each mz value
ยงExamples
use mscore::timstof::quadrupole::apply_transmission;
let mz = vec![100.0, 150.0, 170.0];
let transmission = apply_transmission(150.0, 50.0, 1.0, mz).iter().map(
|&x| (x * 100.0).round() / 100.0).collect::<Vec<f64>>();
assert_eq!(transmission, vec![0.0, 1.0, 1.0]);