This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from: https://github.com/mne-tools/mne-python/blob/main/tools/circleci_download.sh | |
import mne | |
print(mne.datasets.sample.data_path(update_path=True)) | |
print(mne.datasets.fetch_fsaverage(verbose=True)) | |
print(mne.datasets.spm_face.data_path(update_path=True)) | |
print(mne.datasets.somato.data_path(update_path=True)) | |
print(mne.datasets.eegbci.load_data(1, [3, 6, 10, 14], update_path=True)) | |
print(mne.datasets.eegbci.load_data(2, [3], update_path=True)) | |
print(mne.datasets.eegbci.load_data(3, [3], update_path=True)) | |
print(mne.datasets.eegbci.load_data(4, [3], update_path=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vtk as _vtk | |
renderWindow = _vtk.vtkRenderWindow() | |
renderWindow.SetOffScreenRendering(True) | |
renderWindow.Render() | |
extension_name = "_ES3" | |
if renderWindow.SupportsOpenGL(): | |
caps = renderWindow.ReportCapabilities() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from OpenGL.GL import (glGetIntegerv, glGetStringi, GL_NUM_EXTENSIONS, | |
GL_EXTENSIONS) | |
from OpenGL.GLUT import glutInit, glutCreateWindow | |
glutInit() | |
wind = glutCreateWindow("Check OpenGL ES3") | |
num_extensions = glGetIntegerv(GL_NUM_EXTENSIONS, 0) | |
extensions = list() | |
for i in range(num_extensions.value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pyvista as pv | |
from matplotlib.colors import ListedColormap | |
def add_vertex(plotter, point): | |
vertex = pv.Sphere(center=point) | |
plotter.add_mesh( | |
mesh=vertex, | |
color='white', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyvista as pv | |
import numpy as np | |
from matplotlib.colors import ListedColormap | |
plotter = pv.Plotter( | |
point_smoothing=True, | |
line_smoothing=True, | |
polygon_smoothing=True, | |
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pyvista | |
from pyvista import examples | |
from matplotlib.colors import ListedColormap | |
# BEGIN: Inspired by Vispy | |
# https://github.com/vispy/vispy | |
_rgb2xyz_norm = np.array([[0.43395276, 0.212671, 0.01775791], | |
[0.37621941, 0.71516, 0.10947652], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
.. _tut_viz_stcs: | |
Visualize source time courses | |
============================= | |
This tutorial focuses on visualization of stcs. | |
.. contents:: Table of Contents | |
:local: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyvista as pv | |
import numpy as np | |
from pyvista import examples | |
mesh = examples.download_dragon() | |
p = pv.BackgroundPlotter() | |
# describe the movement | |
class Animate(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyvista as pv | |
import vtk | |
def foo(bar): | |
pass | |
def disable_tube(slider): | |
tr = slider.GetEventTranslator() |
NewerOlder