Hi,
I was wondering which MNE method would be most suitable to calculate the alpha band power from an EEG signal in real time and use it as an input to a biofeedback game. Iād want to use a 500 ms or 1000 ms window for the FFT calculation and update the game display every 500 ms based on the alpha band power value that is calculated. I keep coming across recommendations to use a āshort termā or āshort timeā FFT, but descriptions of this method suggest that is not suitable for processing data in real time, and the parameters of the MNE ātime_frequency.stftā method also seem to suggest this. As far as I can tell, the STFT is designed to generate a single spectrogram (plotting power x frequency x time) over an extended sampling period comprising many windows, rather than reporting a power value for each window as the data for that window are captured in real time. The MNE ātime_frequency.stftā method takes an ān_timesā parameter that seems to refer to the number of samples in a data set larger than the FFT window, suggesting that it is also not intended for real time data processing. Moreover, the STFT seems to automatically select an array of small frequency bins, rather than allowing me to specify the alpha band. The most suitable MNE method Iāve been able to find so far is āEpochs.compute_psdā, as this allows me to specify a frequency band. It ties me into using Welchās method (or multitaper), which in principle is fine as some averaging across windows will reduce the variability of the power values, but there doesnāt seem to be much scope for averaging across windows, since the minimum recommended window for alpha is 250 ms and I need to report values every 500 ms. As you can see, Iām not sure where to go with this and any advice would be welcome.
Many thanks,
Richard