sci_find_peaks/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum FindPeaksError {
5 #[error("Input data cannot be empty")]
6 EmptyInput,
7
8 #[error("Distance must be >= 1, got {0}")]
9 InvalidDistance(usize),
10
11 #[error("Window length (wlen) must be > 1, got {0}")]
12 InvalidWindowLength(usize),
13
14 #[error("Relative height must be >= 0.0, got {0}")]
15 InvalidRelHeight(f64),
16
17 #[error("Data contains NaN values, which are not supported")]
18 NaNValuesDetected,
19}