再次提交
This commit is contained in:
@ -18,7 +18,7 @@ pub fn sg_smooth(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
|
||||
smoothmethod::savgol(data, window, order)
|
||||
}
|
||||
#[tauri::command]
|
||||
pub fn Gaussian_filter_high(data: Vec<f64>, sigma: f64) -> Vec<f64> {
|
||||
pub fn gaussian_filter_high(data: Vec<f64>, sigma: f64) -> Vec<f64> {
|
||||
sharpmethod::high_pass_gaussian_filter(data, sigma)
|
||||
}
|
||||
|
||||
|
||||
@ -5,9 +5,9 @@ use std::error::Error;
|
||||
|
||||
use find_peaks::PeakFinder;
|
||||
|
||||
pub fn interpolate_spline<T: Copy + Into<f64>,>(x_T: Vec<T>, y_T: Vec<T>, step: f64) -> Result<Vec<(f64, f64)>, Box<dyn Error>> {
|
||||
let x: Vec<f64> = x_T.iter().map(|&x| x.into()).collect();
|
||||
let y: Vec<f64> = y_T.iter().map(|&y| y.into()).collect();
|
||||
pub fn interpolate_spline<T: Copy + Into<f64>,>(x_t: Vec<T>, y_t: Vec<T>, step: f64) -> Result<Vec<(f64, f64)>, Box<dyn Error>> {
|
||||
let x: Vec<f64> = x_t.iter().map(|&x| x.into()).collect();
|
||||
let y: Vec<f64> = y_t.iter().map(|&y| y.into()).collect();
|
||||
|
||||
if x.len() != y.len() {
|
||||
return Err("x and y must have the same length".into());
|
||||
@ -39,9 +39,9 @@ pub fn interpolate_spline<T: Copy + Into<f64>,>(x_T: Vec<T>, y_T: Vec<T>, step:
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
pub fn interpolate_spline_at_points<T: Copy + Into<f64>>(x_T: Vec<T>, y_T: Vec<T>, x_target: Vec<f64>) -> Result<Vec<(f64)>, Box<dyn Error>> {
|
||||
let x: Vec<f64> = x_T.iter().map(|&x| x.into()).collect();
|
||||
let y: Vec<f64> = y_T.iter().map(|&y| y.into()).collect();
|
||||
pub fn interpolate_spline_at_points<T: Copy + Into<f64>>(x_t: Vec<T>, y_t: Vec<T>, x_target: Vec<f64>) -> Result<Vec<(f64)>, Box<dyn Error>> {
|
||||
let x: Vec<f64> = x_t.iter().map(|&x| x.into()).collect();
|
||||
let y: Vec<f64> = y_t.iter().map(|&y| y.into()).collect();
|
||||
|
||||
if x.len() != y.len() {
|
||||
return Err("x and y must have the same length".into());
|
||||
|
||||
Reference in New Issue
Block a user