PSD Confidence Interval

Hello everyone,

I am using the function epochs.plot_psd () to visualise the power spectrum density of my data. Does anyone know what should I do to add and visualise the confidence interval?

Hello @Res,

when you call epochs.plot_psd(average=True), the mean +/- standard deviation will be shown.

If you pass area_mode='range', i.e., epochs.plot_psd(average=True, area_mode='range'), you’ll get the mean and the entire range of the data.

There is currently no way to specify an area_mode that would allow for plotting of CIs (or any other statistics). If you need this for your work, please feel free to open an issue with a feature request on our GitHub issue tracker – or even better, if you feel confident, make a pull request with this enhancement! Ideally, we would accept a function passed as area_mode; and this function could then calculate the “data limits” in whichever way it likes.

1 Like

Thank you for the clarification!