非官方中文翻译
本页译自 MNE-Python 官方文档:
查看英文原文 ↗。
文档版权归 MNE Developers 所有(BSD-3-Clause)。
说明
转到末尾下载完整示例代码。
读取 STC 文件#
STC 文件包含皮层上的激活,即源重建结果
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.
import matplotlib.pyplot as plt
import mne
from mne.datasets import sample
print(__doc__)
data_path = sample.data_path()
meg_path = data_path / "MEG" / "sample"
fname = meg_path / "sample_audvis-meg"
stc = mne.read_source_estimate(fname)
n_vertices, n_samples = stc.data.shape
print(f"stc data size: {n_vertices} (nb of vertices) x {n_samples} (nb of samples)")
# View source activations
plt.plot(stc.times, stc.data[::100, :].T)
plt.xlabel("time (ms)")
plt.ylabel("Source amplitude")
plt.show()

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