Plot¶
Bases: BaseClass
Class for plotting data interactively and optionally save part of the figure.
Displays the data using MNE's plot() method. If save options are
provided, a screenshot of the figure is saved to disk.
MNE-functions used: mne.io.Raw.plot, mne.viz.plot_sensors, mne.time_frequency.Spectrum.plot, mne.time_frequency.Spectrum.plot_topo, mne.time_frequency.Spectrum.plot_topomap
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
Raw | Epochs
|
Input data. |
required |
plot_types
|
PlotTypes | None
|
Types of plots to make; use | to specify multiple plot types (eg. PlotTypes.PLOT|PlotTypes.SPECTRUM_TOPO) |
PLOT
|
save_folder
|
str | None
|
Folder in which to save the plot. If None, the figure is not saved. |
None
|
save_postfix
|
str | None
|
Postfix appended to the plot filename. |
None
|
save_overwrite
|
bool
|
Whether to overwrite files with the same name. |
False
|
**kwargs
|
Additional keyword arguments passed to MNE's |
{}
|
Attributes:
| Name | Type | Description |
|---|---|---|
processed |
Raw | Epochs
|
Output data (signal data unchanged; metadata may be modified via the interactive plot). |
Wrapper around several plot-functions:
- Plot raw data (
PLOT) - Plot sensors positions (
SENSORS) - Plot power or amplitude spectra (
SPECTRUM_PLOT) - Plot power spectral density, separately for each channel (
SPECTRUM_TOPO) - Plot scalp topography of PSD for chosen frequency bands (
SPECTRUM_TOPO_MAP)
Example settings for config file¶
Example settings in correct format for the config file.
Plot:
_biopap_module: <class 'biopap.modules.plot.Plot'>
plot_types: 8
save_folder: './examples/data/plots'
save_postfix: 'participant1'
save_overwrite: False
The value of plot_types translates to actual types thus:
PLOT= 1SENSORS= 2SPECTRUM_PLOT= 4SPECTRUM_TOPO= 8SPECTRUM_TOPO_MAP= 16
To generate different types at the same time, you can add the values. For instance, plot_types: 11
translates to PLOT, SENSORS, and SPECTRUM_TOPO, because 11 equals 1 + 2 + 8.