Reading an STC file

STC files contain activations on cortex ie. source reconstructions

# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD-3-Clause
import matplotlib.pyplot as plt

import mne
from mne.datasets import sample

print(__doc__)

data_path = sample.data_path()
fname = data_path + '/MEG/sample/sample_audvis-meg'

stc = mne.read_source_estimate(fname)

n_vertices, n_samples = stc.data.shape
print("stc data size: %s (nb of vertices) x %s (nb of samples)"
      % (n_vertices, n_samples))

# View source activations
plt.plot(stc.times, stc.data[::100, :].T)
plt.xlabel('time (ms)')
plt.ylabel('Source amplitude')
plt.show()
read stc

Out:

stc data size: 7498 (nb of vertices) x 25 (nb of samples)

Total running time of the script: ( 0 minutes 3.757 seconds)

Estimated memory usage: 9 MB

Gallery generated by Sphinx-Gallery