Object for rendering HTML.
None | strName of the file containing the info dictionary.
NoneThe path to the directory containing the FreeSurfer subjects
reconstructions. If None, defaults to the SUBJECTS_DIR environment
variable.
str | NoneSubject name.
strTitle of the report.
None | strName of the file containing the noise covariance.
None | tuple of length 2The time interval to consider as “baseline” when applying baseline
correction. If None, do not apply baseline correction.
If a tuple (a, b), the interval is between a and b
(in seconds), including the endpoints.
If a is None, the beginning of the data is used; and if b
is None, it is set to the end of the interval.
If (None, None), the entire time interval is used.
Note
The baseline (a, b) includes both endpoints, i.e. all
timepoints t such that a <= t <= b.
Correction is applied in the following way to each channel:
Calculate the mean signal of the baseline period.
Subtract this mean from the entire time period.
For Epochs, this algorithm is run on each epoch individually.
Defaults to None, i.e. no baseline correction.
Default image format to use (default is 'png').
'svg' uses vector graphics, so fidelity is higher but can increase
file size and browser image rendering time as well.
New in version 0.15.
dictIf True, include PSD plots for raw files. Can be False (default) to
omit, True to plot, or a dict to pass as kwargs to
mne.io.Raw.plot_psd().
New in version 0.17.
Whether to include topographic plots of SSP projectors, if present in
the data. Defaults to False.
New in version 0.21.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
Notes
See Getting started with mne.Report for an introduction to using mne.Report.
New in version 0.8.0.
None | strName of the file containing the info dictionary.
NoneThe path to the directory containing the FreeSurfer subjects
reconstructions. If None, defaults to the SUBJECTS_DIR environment
variable.
str | NoneSubject name.
strTitle of the report.
None | strName of the file containing the noise covariance.
None | tuple of length 2The time interval to consider as “baseline” when applying baseline
correction. If None, do not apply baseline correction.
If a tuple (a, b), the interval is between a and b
(in seconds), including the endpoints.
If a is None, the beginning of the data is used; and if b
is None, it is set to the end of the interval.
If (None, None), the entire time interval is used.
Note
The baseline (a, b) includes both endpoints, i.e. all
timepoints t such that a <= t <= b.
Correction is applied in the following way to each channel:
Calculate the mean signal of the baseline period.
Subtract this mean from the entire time period.
For Epochs, this algorithm is run on each epoch individually.
Defaults to None, i.e. no baseline correction.
strDefault image format to use.
New in version 0.15.
dictIf True, include PSD plots for raw files. Can be False (default) to
omit, True to plot, or a dict to pass as kwargs to
mne.io.Raw.plot_psd().
New in version 0.17.
Whether to include topographic plots of SSP projectors, if present in
the data. Defaults to False.
New in version 0.21.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
htmllist of strA list of HTML representations for all content elements.
list of strDictionary containing elements included in head.
list of strList of file names rendered.
list of strList of sections.
strlanguage setting for the HTML file.
Methods
|
Return the number of files processed by the report. |
|
Render a visualization of the boundary element model (BEM) surfaces. |
|
Add a code snippet (e.g., an analysis script) to the report. |
|
Add covariance to the report. |
|
Add custom CSS to the report. |
|
Add custom JavaScript to the report. |
|
Add |
|
Add events to the report. |
|
Add |
|
Add figures to the report. |
|
Add a forward solution. |
|
Add HTML content to the report. |
|
Add (a fitted) |
|
Add an image (e.g., PNG or JPEG pictures) to the report. |
|
Add an inverse operator. |
|
Render (SSP) projection vectors. |
|
Add |
|
Add a |
|
Add a MNE-Python system information to the report. |
|
Add a coregistration visualization to the report. |
|
Render all the files in the folder. |
|
Remove elements from the report. |
|
Save the report and optionally open it in browser. |
Return the number of files processed by the report.
intThe number of files processed.
Render a visualization of the boundary element model (BEM) surfaces.
strThe FreeSurfer subject name.
strThe title corresponding to the BEM image.
NoneThe path to the directory containing the FreeSurfer subjects
reconstructions. If None, defaults to the SUBJECTS_DIR environment
variable.
intUse this decimation factor for generating MRI/BEM images (since it can be time consuming).
intThe width of the MRI images (in pixels). Larger values will have clearer surface lines, but will create larger HTML files. Typically a factor of 2 more than the number of MRI voxels along each dimension (typically 512, default) is reasonable.
int | NoneThe number of jobs to run in parallel. If -1, it is set
to the number of CPU cores. Requires the joblib package.
None (default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1 (sequential execution) unless the call is performed under
a joblib.parallel_backend() context manager that sets another
value for n_jobs.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_bem:
Add a code snippet (e.g., an analysis script) to the report.
str | pathlib.PathThe code to add to the report as a string, or the path to a file
as a pathlib.Path object.
Note
Paths must be passed as pathlib.Path object, since
strings will be treated as literal code.
strThe title corresponding to the code.
strThe programming language of code. This will be used for syntax
highlighting. Can be 'auto' to try to auto-detect the language.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_code:
Add covariance to the report.
CovarianceThe Covariance to add to the report.
InfoThe Info corresponding to cov.
strThe title corresponding to the Covariance object.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_covariance:
Add custom CSS to the report.
strStyle definitions to add to the report. The content of this string
will be embedded between HTML <style> and </style> tags.
Notes
New in version 0.23.
Add custom JavaScript to the report.
strJavaScript code to add to the report. The content of this string
will be embedded between HTML <script> and </script> tags.
Notes
New in version 0.23.
Add Epochs to the report.
EpochsThe epochs to add to the report.
strThe title to add.
floatIf a float, the duration of data to use for creation of PSD plots, in seconds. PSD will be calculated on as many epochs as required to cover at least this duration. Epochs will be picked across the entire time range in equally-spaced distance.
Note
In rare edge cases, we may not be able to create a grid of equally-spaced epochs that cover the entire requested time range. In these situations, a warning will be emitted, informing you about the duration that’s actually being used.
If True, add PSD plots based on all epochs. If False,
do not add PSD plots.
NoneWhether to add SSP projector plots if projectors are present in
the data. If None, use projs from Report creation.
dict | NoneKeyword arguments to pass to the topomap-generating functions.
strThe drop reasons to ignore when creating the drop log bar plot.
All epochs for which a drop reason listed here appears in
epochs.drop_log will be excluded from the drop log plot.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_epochs:
Add events to the report.
array, shape (n_events, 3)An MNE-Python events array.
strThe title corresponding to the events.
dictA dictionary mapping event names (keys) to event codes (values).
floatThe sampling frequency used while recording.
intThe first sample point in the recording. This corresponds to
raw.first_samp on files created with Elekta/Neuromag systems.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_events:
Add Evoked objects to the report.
Evoked | list of EvokedThe evoked data to add to the report. Multiple Evoked
objects – as returned from mne.read_evokeds – can be passed as
a list.
str | list of str | NoneThe titles corresponding to the evoked data. If None, the
content of evoked.comment from each evoked will be used as
title.
Covariance | NoneA noise covariance matrix. If provided, will be used to whiten
the evokeds. If None, will fall back to the cov_fname
provided upon report creation.
NoneWhether to add SSP projector plots if projectors are present in
the data. If None, use projs from Report creation.
int | NoneThe number of equidistant time points to render. If None,
will render each Evoked at 21 time points, unless the data
contains fewer time points, in which case all will be rendered.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
dict | NoneKeyword arguments to pass to the topomap-generating functions.
int | NoneThe number of jobs to run in parallel. If -1, it is set
to the number of CPU cores. Requires the joblib package.
None (default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1 (sequential execution) unless the call is performed under
a joblib.parallel_backend() context manager that sets another
value for n_jobs.
Notes
New in version 0.24.0.
Examples using add_evokeds:
Add figures to the report.
matplotlib.figure.Figure | Figure3D | array | array-like of matplotlib.figure.Figure | array-like of Figure3D | array-like of arrayOne or more figures to add to the report. All figures must be an
instance of matplotlib.figure.Figure,
mne.viz.Figure3D, or numpy.ndarray. If
multiple figures are passed, they will be added as “slides”
that can be navigated using buttons and a slider element.
strThe title corresponding to the figure(s).
str | array-like of str | NoneThe caption(s) to add to the figure(s).
NoneThe image format to be used for the report, can be 'png',
'svg', or 'gif'.
None (default) will use the default specified during Report
instantiation.
str | strTags to add for later interactive filtering. Must not contain spaces.
str | NoneThe name of the section (or content block) to add the content to. This feature is useful for grouping multiple related content elements together under a single, collapsible section. Each content element will retain its own title and functionality, but not appear separately in the table of contents. Hence, using sections is a way to declutter the table of contents, and to easy navigation of the report.
New in version 1.1.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_figure:
Add a forward solution.
Forward | path-likeThe forward solution to add to the report.
strThe title corresponding to forward solution.
str | NoneThe name of the FreeSurfer subject forward belongs to. If
provided, the sensitivity maps of the forward solution will
be visualized. If None, will use the value of subject
passed on report creation. If supplied, also pass subjects_dir.
NoneThe FreeSurfer SUBJECTS_DIR.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_forward:
Add HTML content to the report.
strThe HTML content to add.
strThe title corresponding to html.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_html:
Add (a fitted) ICA to the report.
mne.preprocessing.ICAThe fitted ICA to add.
strThe title to add.
mne.io.Raw | mne.Epochs | NoneThe data to use for visualization of the effects of ICA cleaning.
To only plot the ICA component topographies, explicitly pass
None.
int | list of int | slice | NoneIndices of the independent components (ICs) to visualize.
If an integer, represents the index of the IC to pick.
Multiple ICs can be selected using a list of int or a slice.
The indices are 0-indexed, so picks=1 will
pick the second IC: ICA001. If None, plot all components. This only affects
the behavior of the component topography and properties plots.
mne.Evoked | NoneEvoked signal based on ECG and EOG epochs, respectively. If passed, will be used to visualize the effects of artifact rejection.
array of float | list of array of float | NoneThe scores produced by mne.preprocessing.ICA.find_bads_ecg()
and mne.preprocessing.ICA.find_bads_eog(), respectively.
If passed, will be used to visualize the scoring for each ICA
component.
int | NoneThe number of jobs to run in parallel. If -1, it is set
to the number of CPU cores. Requires the joblib package.
None (default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1 (sequential execution) unless the call is performed under
a joblib.parallel_backend() context manager that sets another
value for n_jobs.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_ica:
Add an image (e.g., PNG or JPEG pictures) to the report.
The image to add.
strTitle corresponding to the images.
str | NoneIf not None, the caption to add to the image.
str | strTags to add for later interactive filtering. Must not contain spaces.
str | NoneThe name of the section (or content block) to add the content to. This feature is useful for grouping multiple related content elements together under a single, collapsible section. Each content element will retain its own title and functionality, but not appear separately in the table of contents. Hence, using sections is a way to declutter the table of contents, and to easy navigation of the report.
New in version 1.1.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_image:
Add an inverse operator.
InverseOperator | path-likeThe inverse operator to add to the report.
strThe title corresponding to the inverse operator object.
str | NoneThe name of the FreeSurfer subject inverse_op belongs to. If
provided, the source space the inverse solution is based on will
be visualized. If None, will use the value of subject
passed on report creation. If supplied, also pass subjects_dir
and trans.
NoneThe FreeSurfer SUBJECTS_DIR.
Transform | NoneThe head -> MRI transformation for subject.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_inverse_operator:
Render (SSP) projection vectors.
Info | path-likeAn Info structure or the path of a file containing one. This
is required to create the topographic plots.
mne.Projection | path-like | NoneThe projection vectors to add to the report. Can be the path to a
file that will be loaded via mne.read_proj. If None, the
projectors are taken from info['projs'].
strThe title corresponding to the Projection object.
dict | NoneKeyword arguments to pass to the topomap-generating functions.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_projs:
Add Raw objects to the report.
RawThe data to add to the report.
strThe title corresponding to the raw object.
NoneWhether to add PSD plots. Overrides the raw_psd parameter
passed when initializing the Report. If None, use
raw_psd from Report creation.
NoneWhether to add SSP projector plots if projectors are present in
the data. If None, use projs from Report creation.
intWhether to add butterfly plots of the data. Can be useful to
spot problematic channels. If True, 10 equally-spaced 1-second
segments will be plotted. If an integer, specifies the number of
1-second segments to plot. Larger numbers may take a considerable
amount of time if the data contains many sensors. You can disable
butterfly plots altogether by passing False.
dict | NoneScaling factors for the traces. If a dictionary where any
value is 'auto', the scaling factor is set to match the 99.5th
percentile of the respective data. If 'auto', all scalings (for all
channel types) are set to 'auto'. If any values are 'auto' and the
data is not preloaded, a subset up to 100 MB will be loaded. If None,
defaults to:
dict(mag=1e-12, grad=4e-11, eeg=20e-6, eog=150e-6, ecg=5e-4,
emg=1e-3, ref_meg=1e-12, misc=1e-3, stim=1,
resp=1, chpi=1e-4, whitened=1e2)
Note
A particular scaling value s corresponds to half of the visualized
signal range around zero (i.e. from 0 to +s or from 0 to
-s). For example, the default scaling of 20e-6 (20µV) for EEG
signals means that the visualized range will be 40 µV (20 µV in the
positive direction and 20 µV in the negative direction).
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
dict | NoneKeyword arguments to pass to the topomap-generating functions.
Notes
New in version 0.24.0.
Examples using add_raw:
Add a SourceEstimate (STC) to the report.
SourceEstimateThe SourceEstimate to add to the report.
strThe title to add.
str | NoneThe name of the FreeSurfer subject the STC belongs to. The name is
not stored with the STC data and therefore needs to be specified.
If None, will use the value of subject passed on report
creation.
NoneThe FreeSurfer SUBJECTS_DIR.
int | NoneThe number of equidistant time points to render. If None,
will render stc at 51 time points, unless the data
contains fewer time points, in which case all will be rendered.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
dictDictionary of keyword arguments to pass to
mne.SourceEstimate.plot. Only used when plotting in 3D
mode.
Notes
New in version 0.24.0.
Examples using add_stc:
Add a MNE-Python system information to the report.
This is a convenience method that captures the output of
mne.sys_info and adds it to the report.
strThe title to assign.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Add a coregistration visualization to the report.
TransformThe head -> MRI transformation to render.
InfoThe Info corresponding to trans.
strThe title to add.
str | NoneThe name of the FreeSurfer subject the trans`` belong to. The
name is not stored with the trans and therefore needs to be
specified. If None, will use the value of subject passed on
report creation.
NoneThe FreeSurfer SUBJECTS_DIR.
float | NoneThe level of opacity to apply to the head surface. If a float, must
be between 0 and 1 (inclusive), where 1 means fully opaque. If
None, will use the MNE-Python default value.
str | strTags to add for later interactive filtering. Must not contain spaces.
If True, content already present that has the same title will be
replaced. Defaults to False, which will cause duplicate entries in the
table of contents if an entry for title already exists.
Notes
New in version 0.24.0.
Examples using add_trans:
A list of HTML representations for all content elements.
Render all the files in the folder.
strPath to the folder containing data whose HTML report will be created.
None | str | list of strFilename pattern(s) to include in the report.
For example, [\*raw.fif, \*ave.fif] will include Raw
as well as Evoked files. If None, include all supported
file formats.
Changed in version 0.23: Include supported non-FIFF files by default.
int | NoneThe number of jobs to run in parallel. If -1, it is set
to the number of CPU cores. Requires the joblib package.
None (default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1 (sequential execution) unless the call is performed under
a joblib.parallel_backend() context manager that sets another
value for n_jobs.
intUse this decimation factor for generating MRI/BEM images (since it can be time consuming).
If True, sort the content based on tags in the order:
raw -> events -> epochs -> evoked -> covariance -> coregistration
-> bem -> forward-solution -> inverse-operator -> source-estimate.
New in version 0.24.0.
strWhat to do if a file cannot be rendered. Can be ‘ignore’, ‘warn’ (default), or ‘raise’.
NoneThe image format to be used for the report, can be 'png',
'svg', or 'gif'.
None (default) will use the default specified during Report
instantiation.
New in version 0.15.
If True (default), try to render the BEM.
New in version 0.16.
int | NoneThe number of equidistant time points to render for Evoked
and SourceEstimate data, respectively. If None,
will render each Evoked at 21 and each SourceEstimate
at 51 time points, unless the respective data contains fewer time
points, in which call all will be rendered.
New in version 0.24.0.
Whether to render butterfly plots for (decimated) Raw
data.
New in version 0.24.0.
dictDictionary of keyword arguments to pass to
mne.SourceEstimate.plot. Only used when plotting in 3D
mode.
New in version 0.24.0.
dict | NoneKeyword arguments to pass to the topomap-generating functions.
New in version 0.24.0.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
Examples using parse_folder:
Remove elements from the report.
The element to remove is searched for by its title. Optionally, tags may be specified as well to narrow down the search to elements that have the supplied tags.
strThe title of the element(s) to remove.
New in version 0.24.0.
str | str | NoneIf supplied, restrict the operation to elements with the supplied tags.
New in version 0.24.0.
Controls the behavior if multiple elements match the search
criteria. If False (default) only the element last added to the
report will be removed. If True, all matches will be removed.
New in version 0.24.0.
Save the report and optionally open it in browser.
NoneOutput filename. If the name ends with .h5 or .hdf5, the
report is saved in HDF5 format, so it can later be loaded again
with open_report(). For any other suffix, the report will be
saved in HTML format. If None and Report.parse_folder()
was not called, the report is saved as report.html in the
current working directory. If None and
Report.parse_folder() was used, the report is saved as
report.html inside the data_path supplied to
Report.parse_folder().
Whether to open the rendered HTML report in the default web browser after saving. This is ignored when writing an HDF5 file.
If True (default False), overwrite the destination file if it exists.
If True, sort the content based on tags before saving in the
order:
raw -> events -> epochs -> evoked -> covariance -> coregistration
-> bem -> forward-solution -> inverse-operator -> source-estimate.
New in version 0.24.0.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
strThe file name to which the report was saved.
Examples using save:
All tags currently used in the report.
mne.Report#