Skip to main content

Crate elata_eeg_signal

Crate elata_eeg_signal 

Source
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§

BandPowers
Power values for all standard EEG bands
BiquadFilter
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)