1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! EEG Analysis Models
//!
//! This crate provides analysis models that process EEG data from the HAL.
//! Currently implemented models:
//!
//! - **Alpha Bump Detection**: Detects changes in alpha band power, indicating
//! transitions between relaxed (eyes closed) and alert (eyes open) states.
//!
//! - **Alpha Peak Model**: Finds the dominant frequency within the alpha band
//! (8-13 Hz) and reports its power and signal-to-noise ratio.
//!
//! - **Calmness Model**: Computes a continuous calmness score based on the
//! ratio of relaxation-associated frequencies (alpha, theta) to
//! alertness-associated frequencies (beta).
//!
//! # Usage
//!
//! ```no_run
//! use elata_eeg_models::{Model, AlphaBumpDetector, AlphaPeakModel, CalmnessModel};
//! use elata_eeg_hal::SampleBuffer;
//!
//! // Create models
//! let mut alpha_detector = AlphaBumpDetector::new(256);
//! let mut alpha_peak = AlphaPeakModel::new(256);
//! let mut calmness = CalmnessModel::new(256);
//!
//! // Process data (assuming buffer is filled from a device)
//! let buffer = SampleBuffer::new(256, 4);
//! // ... fill buffer ...
//!
//! // Get analysis results
//! // let alpha_result = alpha_detector.process(&buffer);
//! // let alpha_peak_result = alpha_peak.process(&buffer);
//! // let calmness_result = calmness.process(&buffer);
//! ```
pub use ;
pub use ;
pub use ;
pub use ;