transfreq.viz
.plot_coefficients¶
- transfreq.viz.plot_coefficients(psds, freqs, ch_names, theta_range=None, alpha_range=None, mode='2d', order='standard', showfig=True, ax=None)¶
Plot alpha and theta coefficients
- Parameters:
- psds: array, shape (N_sensors, N_freqs)
power spectral matrix
- freqs: array, shape (N_freqs,)
frequencies at which the psds is computed
- ch_names: None | list of strings (default None)
name of the channels (must be ordered as they are in psds)
- theta_range: tuple | list | array (default (5,7))
theta range to compute alpha coefficients (eg: (5,7), [5,7], np.array([5,7]))
- alpha_range: tuple | list | array (default (ap-1,ap+1))
alpha range to compute theta coefficients (eg: (9,11), [9,11], np.array([9,11]))
- mode: ‘1d’ or ‘2d’ (default ‘2d’)
If ‘1d’ the ratio between the alpha tha theta coefficients will be shown, if ‘2d’ alpha and theta coefficients ar displayed on the plane
- order: ‘standard’ or ‘sorted’ (default ‘standard’)
Way to plot the coefficients (only when mode=’1d’, otherwise is not considered)
- showfig: bool (default True)
if True figure will be showed, if False figure will not be showed
- ax: instance of Axes | None
Axes to plot into. If None, axes will be created.
- Returns:
- fig: instance of Figure
Figure representing the coefficients