tensorpac.utils.PSD

class tensorpac.utils.PSD(x, sf)[source]

Power Spectrum Density for electrophysiological brain data.

Parameters
xarray_like

Array of data of shape (n_epochs, n_times)

sffloat

The sampling frequency.

__init__(x, sf)[source]

Init.

Methods

__init__(x, sf)

Init.

plot([f_min, f_max, confidence, interp, …])

Plot the PSD.

plot_st_psd([f_min, f_max, log, grid, …])

Single-trial PSD plot.

show()

Display the PSD figure.

Attributes

freqs

Get the frequency vector.

psd

Get the psd value.

plot(f_min=None, f_max=None, confidence=95, interp=None, log=False, grid=True, fz_title=18, fz_labels=15)[source]

Plot the PSD.

Parameters
f_min, f_max(int, float) | None

Frequency bounds to use for plotting

confidence(int, float) | None

Light gray confidence interval. If None, no interval will be displayed

interpint | None

Line interpolation integer. For example, if interp is 10 the number of points is going to be multiply by 10

logbool | False

Use a log scale representation

gridbool | True

Add a grid to the plot

fz_titleint | 18

Font size for the title

fz_labelsint | 15

Font size the x/y labels

Returns
axMatplotlib axis

The matplotlib axis that contains the figure

plot_st_psd(f_min=None, f_max=None, log=False, grid=True, fz_title=18, fz_labels=15, fz_cblabel=15, **kw)[source]

Single-trial PSD plot.

Parameters
f_min, f_max(int, float) | None

Frequency bounds to use for plotting

logbool | False

Use a log scale representation

gridbool | True

Add a grid to the plot

fz_titleint | 18

Font size for the title

fz_labelsint | 15

Font size the x/y labels

fz_cblabelint | 15

Font size the colorbar label labels

Returns
axMatplotlib axis

The matplotlib axis that contains the figure

show()[source]

Display the PSD figure.

property freqs

Get the frequency vector.

property psd

Get the psd value.