bemobil_mne.viz.plot_PSD#
- bemobil_mne.viz.plot_PSD(inst_dict, fmin, fmax, baseline_dict=None, picks=None, combine=False, ci=True, dB=True)[source]#
Plot power spectral density (PSD) for given events.
- Parameters:
- inst_dict
dict Dictionary of mne.Epochs objects, grouped by condition, e.g., {“condition”: mne.Epochs}.
- fmin
float Minimum frequency to include in the PSD.
- fmax
float Maximum frequency to include in the PSD.
- baseline_dict
dict|None An optional dictionary using the same keys as the inst_dict to specify baselines e.g., {“condition”: mne.Epochs} or {“condition”: mne.Spectrum}.
- picks
listofstrorNone,optional List of channel names to include. If None, all channels are used.
- combinebool |
optional If True, average PSDs over channels and show a single plot. If False, plot each channel separately. Defaults to False.
- ci
float| bool |callable()|None Confidence band around each PSD. If
FalseorNoneno confidence band is drawn. Iffloat,cimust be between 0 and 1, and will set the threshold for a parametric estimation of the confidence band;Trueis equivalent to setting a threshold of 0.95 (i.e., the 95% confidence band is drawn). If a callable, it must take a single array (n_observations x n_times) as input and return upper and lower confidence margins (2 x n_times). Defaults toTrue.- dBbool |
None If True (default), plot PSD in decibels (10*log10(V²/Hz)). If False, plot in linear units (V²/Hz).
- inst_dict
- Returns:
- fig
matplotlib.figure.Figure The resulting figure containing the PSD plots for each event and channel.
- fig
See also
mne.Evoked.compute_psdFor more information on the PSD computation.
mne.viz.evoked._get_ci_function_pceFor computing confidence intervals.