mod smoothmethod; mod spectraltools; mod sharpmethod; #[tauri::command] pub fn interpolate_spline(x: Vec, y: Vec, step: f64) ->Vec<(f64, f64)>{ spectraltools::interpolate_spline(x, y, step).unwrap() } #[tauri::command] pub fn interpolate_spline_at_points(x: Vec, y: Vec, x_target: Vec) -> Vec{ spectraltools::interpolate_spline_at_points(x, y, x_target).unwrap() } #[tauri::command] pub fn sg_smooth(data: Vec, window: usize, order: usize) -> Vec { smoothmethod::savgol(data, window, order) } #[tauri::command] pub fn gaussian_filter_high(data: Vec, sigma: f64) -> Vec { sharpmethod::high_pass_gaussian_filter(data, sigma) } #[tauri::command] pub fn find_peek(data: Vec, minheigh: f64) -> Vec<(u32, f64)> { spectraltools::find_peek(data, minheigh) } #[tauri::command] pub fn compute_weave_coeff(x: Vec, y: Vec) -> Vec { spectraltools::compute_weave_coeff(x, y) } pub fn polynomial_smooth_u32(y: &[u32], degree: usize) -> Vec { smoothmethod::polynomial_smooth_u32(y, degree) } pub fn polynomial_smooth_u16(y: Vec, degree: usize) -> Vec { smoothmethod::polynomial_smooth_u16(&y, degree) }