Expand description
Signal processing utilities for EEG data
This crate provides common signal processing operations needed for EEG analysis:
- FFT computation
- Band power extraction
- Filtering
- Windowing
It is designed to work with samples buffered through elata-eeg-hal.
§Example
use elata_eeg_signal::{band_power, bands};
let signal = vec![0.0; 256];
let sample_rate = 256.0;
let alpha_power = band_power(&signal, sample_rate, bands::ALPHA);
assert!(alpha_power >= 0.0);Modules§
- bands
- Standard EEG frequency bands (in Hz)
Structs§
- Band
Powers - Power values for all standard EEG bands
- Biquad
Filter - Second-order IIR filter (biquad)
Enums§
- Window
- Windowing functions
Functions§
- apply_
window - Apply a window function to a signal (in-place)
- band_
power - Compute power in a specific frequency band
- band_
powers - Compute power in all standard EEG bands
- bandpass_
filter - Apply a bandpass filter to a signal
- fft
- Compute FFT of a real-valued signal
- fft_
frequencies - Compute frequencies corresponding to FFT bins
- highpass_
filter - Apply a highpass filter to a signal
- lowpass_
filter - Apply a lowpass filter to a signal
- magnitude_
spectrum - Compute magnitude spectrum from FFT output
- notch_
filter - Apply a notch filter (e.g., for 50/60Hz line noise removal)
- power_
spectrum - Compute power spectrum (magnitude squared) from FFT output
- relative_
band_ power - Compute relative power in a specific band (as fraction of total power)