pub fn deviation_scalar( data: &[f64], period: usize, devtype: usize, ) -> Result<Vec<f64>, DeviationError>