alexandrebarachant / muse-lsl

Python script to stream EEG data from the muse 2016 headset
BSD 3-Clause "New" or "Revised" License
627 stars 183 forks source link

possible error in examples/utils.py #104

Open Dutchflag opened 5 years ago

Dutchflag commented 5 years ago

i've been playing around with the neurofeedback example, and i noticed the following.

In line 85 of utils.py, the PSD is calculated. However, without taking the square of the magnitude of the FFT, you get the true theoretical FFT and not the power spectrum. I think the **2 is missing?

jdpigeon commented 5 years ago

Good catch. I think we can update that function soon to provide a true Welch's PSD implementation through scipy.

oori commented 4 years ago

Welch's PSD implementation

@jdpigeon, For reference code and explanation see Compute the average bandpower of an EEG signal or his YASA library's yasa.bandpower function