fooof-tools / fooof

Parameterizing neural power spectra into periodic & aperiodic components.
https://fooof-tools.github.io/
Apache License 2.0
363 stars 98 forks source link

[Question] ERROR regarding Lower-bound peak width limit is < or ~= the frequency resolution: 1.00 <= 1.00 #317

Closed stellafychang closed 7 months ago

stellafychang commented 8 months ago

I got an error when I tried to do group fitting. Below is the error

FOOOF WARNING: Lower-bound peak width limit is < or ~= the frequency resolution: 1.00 <= 1.00 Lower bounds below frequency-resolution have no effect (effective lower bound is the frequency resolution). Too low a limit may lead to overfitting noise as small bandwidth peaks. We recommend a lower bound of approximately 2x the frequency resolution.

My question is how to fix the error? I was thinking of re-extracting psd again with different parameters, but was not sure which approach is most appropriate. Or do I miss anything?

Below is the code for extracting psd

EEG.srate = 250; %EEG sampling rate was at 250 Hz
WINDOW = EEG.srate;
NFFT = EEG.srate;
[psd, freqs] = pwelch(epochChannelData(:,:,epoch_idx), WINDOW, [], NFFT, EEG.srate); 
TomDonoghue commented 8 months ago

Hey @stellafychang - this isn't an error, it's a warning noting that your selected lower bound peak width limit doesn't work very well with your PSD's frequency resolution.

For more information on the settings, see the tutorials, in particular, this one: https://fooof-tools.github.io/fooof/auto_tutorials/plot_04-MoreFOOOF.html

The model still fits if this model is printed. If you wish to address the warning, you can either change the peak width limits, or recompute your power spectrum with a different (higher) frequency resolution.

TomDonoghue commented 7 months ago

Since there isn't an action item here, I'm going to close this issue now. @stellafychang - if you have any questions or follow ups, feel free to add them here and we can follow up from there!