From e1c517ccacb1556a619ab74b574bd99c9b0f1ca1 Mon Sep 17 00:00:00 2001 From: Guillaume Favelier Date: Thu, 23 May 2019 17:19:39 +0200 Subject: [PATCH 1/2] Add 3d backend table for overview --- mne/viz/backends/renderer.py | 43 +++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/mne/viz/backends/renderer.py b/mne/viz/backends/renderer.py index b1eba6b95e2..17959fad3dd 100644 --- a/mne/viz/backends/renderer.py +++ b/mne/viz/backends/renderer.py @@ -34,7 +34,48 @@ def set_3d_backend(backend_name): """Set the backend for MNE. The backend will be set as specified and operations will use - that backend + that backend. + + This table shows the capabilities of each backend ('X' for full support, + '-' for partial support, and ' ' for no support): + + +-----------------------------------------------------------------------------+--------+---------+ + | 3D feature supported | mayavi | pyvista | + +=============================================================================+========+=========+ + | Supports Large Data | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | Opacity/Transparency | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | Support geometric glyph | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | Jupyter notebook | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | Interactivity in Jupyter Notebook | X | | + +-----------------------------------------------------------------------------+--------+---------+ + | Smooth shading | X | | + +-----------------------------------------------------------------------------+--------+---------+ + | Subplotting | X | | + +-----------------------------------------------------------------------------+--------+---------+ + | Eye-dome Lighting | | | + +-----------------------------------------------------------------------------+--------+---------+ + | Exports to movie/GIF | | | + +-----------------------------------------------------------------------------+--------+---------+ + + +-----------------------------------------------------------------------------+--------+---------+ + | 3D function supported | mayavi | pyvista | + +=============================================================================+========+=========+ + | plot_evoked_field | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | plot_alignment | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | plot_sparse_source_estimates | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | snapshot_brain_montage | X | X | + +-----------------------------------------------------------------------------+--------+---------+ + | stc.plot | X | | + +-----------------------------------------------------------------------------+--------+---------+ + | plot_field_map | X | | + +-----------------------------------------------------------------------------+--------+---------+ Parameters ---------- From 41872076f1be57977f9f9f7a0723d3ef8eadb9ec Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Thu, 23 May 2019 12:56:28 -0400 Subject: [PATCH 2/2] STY: Cleaner table --- mne/preprocessing/maxwell.py | 73 +++++++++++++++-------------- mne/viz/backends/renderer.py | 90 +++++++++++++++++++----------------- 2 files changed, 86 insertions(+), 77 deletions(-) diff --git a/mne/preprocessing/maxwell.py b/mne/preprocessing/maxwell.py index 1d9f4139d19..9ac9ba4a1bf 100644 --- a/mne/preprocessing/maxwell.py +++ b/mne/preprocessing/maxwell.py @@ -188,41 +188,44 @@ def maxwell_filter(raw, origin='auto', int_order=8, ext_order=3, Compared to the MEGIN MaxFilter™ software, the MNE Maxwell filtering routines currently provide the following features: - +-----------------------------------------------------------------------------+-----+-----------+ - | Feature | MNE | MaxFilter | - +=============================================================================+=====+===========+ - | Maxwell filtering software shielding | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Bad channel reconstruction | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Cross-talk cancellation | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Fine calibration correction (1D) | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Fine calibration correction (3D) | X | | - +-----------------------------------------------------------------------------+-----+-----------+ - | Spatio-temporal SSS (tSSS) | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Coordinate frame translation | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Regularization using information theory | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Movement compensation (raw) | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Movement compensation (:func:`epochs `) | X | | - +-----------------------------------------------------------------------------+-----+-----------+ - | :func:`cHPI subtraction ` | X | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Double floating point precision | X | | - +-----------------------------------------------------------------------------+-----+-----------+ - | Seamless processing of split (``-1.fif``) and concatenated files | X | | - +-----------------------------------------------------------------------------+-----+-----------+ - | Certified for clinical use | | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Automatic bad channel detection | | X | - +-----------------------------------------------------------------------------+-----+-----------+ - | Head position estimation | | X | - +-----------------------------------------------------------------------------+-----+-----------+ + .. table:: + :widths: auto + + +-----------------------------------------------------------------------------+-----+-----------+ + | Feature | MNE | MaxFilter | + +=============================================================================+=====+===========+ + | Maxwell filtering software shielding | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Bad channel reconstruction | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Cross-talk cancellation | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Fine calibration correction (1D) | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Fine calibration correction (3D) | ✓ | | + +-----------------------------------------------------------------------------+-----+-----------+ + | Spatio-temporal SSS (tSSS) | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Coordinate frame translation | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Regularization using information theory | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Movement compensation (raw) | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Movement compensation (:func:`epochs `) | ✓ | | + +-----------------------------------------------------------------------------+-----+-----------+ + | :func:`cHPI subtraction ` | ✓ | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Double floating point precision | ✓ | | + +-----------------------------------------------------------------------------+-----+-----------+ + | Seamless processing of split (``-1.fif``) and concatenated files | ✓ | | + +-----------------------------------------------------------------------------+-----+-----------+ + | Certified for clinical use | | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Automatic bad channel detection | | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ + | Head position estimation | | ✓ | + +-----------------------------------------------------------------------------+-----+-----------+ Epoch-based movement compensation is described in [1]_. diff --git a/mne/viz/backends/renderer.py b/mne/viz/backends/renderer.py index 17959fad3dd..42a541722b7 100644 --- a/mne/viz/backends/renderer.py +++ b/mne/viz/backends/renderer.py @@ -36,51 +36,57 @@ def set_3d_backend(backend_name): The backend will be set as specified and operations will use that backend. - This table shows the capabilities of each backend ('X' for full support, - '-' for partial support, and ' ' for no support): - - +-----------------------------------------------------------------------------+--------+---------+ - | 3D feature supported | mayavi | pyvista | - +=============================================================================+========+=========+ - | Supports Large Data | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | Opacity/Transparency | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | Support geometric glyph | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | Jupyter notebook | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | Interactivity in Jupyter Notebook | X | | - +-----------------------------------------------------------------------------+--------+---------+ - | Smooth shading | X | | - +-----------------------------------------------------------------------------+--------+---------+ - | Subplotting | X | | - +-----------------------------------------------------------------------------+--------+---------+ - | Eye-dome Lighting | | | - +-----------------------------------------------------------------------------+--------+---------+ - | Exports to movie/GIF | | | - +-----------------------------------------------------------------------------+--------+---------+ - - +-----------------------------------------------------------------------------+--------+---------+ - | 3D function supported | mayavi | pyvista | - +=============================================================================+========+=========+ - | plot_evoked_field | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | plot_alignment | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | plot_sparse_source_estimates | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | snapshot_brain_montage | X | X | - +-----------------------------------------------------------------------------+--------+---------+ - | stc.plot | X | | - +-----------------------------------------------------------------------------+--------+---------+ - | plot_field_map | X | | - +-----------------------------------------------------------------------------+--------+---------+ - Parameters ---------- backend_name : str - The 3d backend to select. + The 3d backend to select. See Notes for the capabilities of each + backend. + + Notes + ----- + This table shows the capabilities of each backend ("✓" for full support, + and "-" for partial support): + + .. table:: + :widths: auto + + +--------------------------------------+--------+---------+ + | 3D function: | mayavi | pyvista | + +======================================+========+=========+ + | :func:`plot_source_estimates` | ✓ | | + +--------------------------------------+--------+---------+ + | :func:`plot_alignment` | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | :func:`plot_sparse_source_estimates` | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | :func:`plot_evoked_field` | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | :func:`snapshot_brain_montage` | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | :func:`plot_evoked_field` | ✓ | | + +--------------------------------------+--------+---------+ + +--------------------------------------+--------+---------+ + | **3D feature:** + + +--------------------------------------+--------+---------+ + | Large data | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | Opacity/transparency | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | Support geometric glyph | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | Jupyter notebook | ✓ | ✓ | + +--------------------------------------+--------+---------+ + | Interactivity in Jupyter notebook | ✓ | | + +--------------------------------------+--------+---------+ + | Smooth shading | ✓ | | + +--------------------------------------+--------+---------+ + | Subplotting | ✓ | | + +--------------------------------------+--------+---------+ + | Eye-dome lighting | | | + +--------------------------------------+--------+---------+ + | Exports to movie/GIF | | | + +--------------------------------------+--------+---------+ + """ _check_option('backend_name', backend_name, VALID_3D_BACKENDS) global MNE_3D_BACKEND