• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python mne.make_field_map函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mne.make_field_map函数的典型用法代码示例。如果您正苦于以下问题:Python make_field_map函数的具体用法?Python make_field_map怎么用?Python make_field_map使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了make_field_map函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_plot_evoked_field

def test_plot_evoked_field():
    """Test plotting evoked field."""
    evoked = read_evokeds(evoked_fname, condition='Left Auditory',
                          baseline=(-0.2, 0.0))
    evoked = pick_channels_evoked(evoked, evoked.ch_names[::10])  # speed
    for t in ['meg', None]:
        with pytest.warns(RuntimeWarning, match='projection'):
            maps = make_field_map(evoked, trans_fname, subject='sample',
                                  subjects_dir=subjects_dir, n_jobs=1,
                                  ch_type=t)
        evoked.plot_field(maps, time=0.1)
开发者ID:kambysese,项目名称:mne-python,代码行数:11,代码来源:test_3d.py


示例2: test_plot_evoked_field

def test_plot_evoked_field():
    trans_fname = op.join(data_dir, 'MEG', 'sample',
                          'sample_audvis_raw-trans.fif')
    evoked = io.read_evokeds(evoked_fname, condition='Left Auditory',
                               baseline=(-0.2, 0.0))
    evoked = pick_channels_evoked(evoked, evoked.ch_names[::10])  # speed
    for t in ['meg', None]:
        maps = make_field_map(evoked, trans_fname=trans_fname,
                              subject='sample', subjects_dir=subjects_dir,
                              n_jobs=1, ch_type=t)

        evoked.plot_field(maps, time=0.1)
开发者ID:anywave,项目名称:aw-export-fif,代码行数:12,代码来源:test_viz.py


示例3: test_plot_evoked_field

def test_plot_evoked_field():
    """Test plotting evoked field
    """
    trans_fname = op.join(data_dir, "MEG", "sample", "sample_audvis_raw-trans.fif")
    evoked = read_evokeds(evoked_fname, condition="Left Auditory", baseline=(-0.2, 0.0))
    evoked = pick_channels_evoked(evoked, evoked.ch_names[::10])  # speed
    for t in ["meg", None]:
        maps = make_field_map(
            evoked, trans_fname=trans_fname, subject="sample", subjects_dir=subjects_dir, n_jobs=1, ch_type=t
        )

        evoked.plot_field(maps, time=0.1)
开发者ID:rgoj,项目名称:mne-python,代码行数:12,代码来源:test_viz.py


示例4: test_plot_evoked_field

def test_plot_evoked_field():
    """Test plotting evoked field
    """
    evoked = read_evokeds(evoked_fname, condition='Left Auditory',
                          baseline=(-0.2, 0.0))
    evoked = pick_channels_evoked(evoked, evoked.ch_names[::10])  # speed
    for t in ['meg', None]:
        with warnings.catch_warnings(record=True):  # bad proj
            maps = make_field_map(evoked, trans_fname, subject='sample',
                                  subjects_dir=subjects_dir, n_jobs=1,
                                  ch_type=t)
        evoked.plot_field(maps, time=0.1)
开发者ID:MartinBaBer,项目名称:mne-python,代码行数:12,代码来源:test_3d.py


示例5: test_plot_evoked_field

def test_plot_evoked_field(backends_3d):
    """Test plotting evoked field."""
    backend_name = get_3d_backend()
    evoked = read_evokeds(evoked_fname, condition='Left Auditory',
                          baseline=(-0.2, 0.0))
    evoked = pick_channels_evoked(evoked, evoked.ch_names[::10])  # speed
    for t in ['meg', None]:
        with pytest.warns(RuntimeWarning, match='projection'):
            maps = make_field_map(evoked, trans_fname, subject='sample',
                                  subjects_dir=subjects_dir, n_jobs=1,
                                  ch_type=t)
        fig = evoked.plot_field(maps, time=0.1)
        if backend_name == 'mayavi':
            import mayavi  # noqa: F401 analysis:ignore
            assert isinstance(fig, mayavi.core.scene.Scene)
开发者ID:adykstra,项目名称:mne-python,代码行数:15,代码来源:test_3d.py


示例6: BSD

This process can be computationally intensive.
"""

# Authors: Eric Larson <[email protected]>
#          Denis A. Engemann <[email protected]>
#          Alexandre Gramfort <[email protected]>

# License: BSD (3-clause)

print(__doc__)

from mne.datasets import sample
from mne import make_field_map, read_evokeds

data_path = sample.data_path()
subjects_dir = data_path + '/subjects'
evoked_fname = data_path + '/MEG/sample/sample_audvis-ave.fif'
trans_fname = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'
# If trans_fname is set to None then only MEG estimates can be visualized

condition = 'Left Auditory'
evoked = read_evokeds(evoked_fname, condition=condition, baseline=(-0.2, 0.0))

# Compute the field maps to project MEG and EEG data to MEG helmet
# and scalp surface
maps = make_field_map(evoked, trans_fname=trans_fname, subject='sample',
                      subjects_dir=subjects_dir, n_jobs=1)

# explore several points in time
[evoked.plot_field(maps, time=time) for time in [0.09, .11]]
开发者ID:katcharewich,项目名称:mne-python,代码行数:30,代码来源:plot_meg_eeg_fields_3d.py


示例7: data

title = 'MNE sample data (condition : %s)'
evoked_l_aud.plot_topo(title=title % evoked_l_aud.comment)
colors = 'yellow', 'green', 'red', 'blue'
mne.viz.plot_evoked_topo(evoked, color=colors,
                         title=title % 'Left/Right Auditory/Visual')

###############################################################################
# Visualizing field lines in 3D
# -----------------------------
#
# We now compute the field maps to project MEG and EEG data to MEG helmet
# and scalp surface.
#
# To do this we'll need coregistration information. See
# :ref:`tut_forward` for more details.
#
# Here we just illustrate usage.

subjects_dir = data_path + '/subjects'
trans_fname = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'

maps = mne.make_field_map(evoked_l_aud, trans=trans_fname, subject='sample',
                          subjects_dir=subjects_dir, n_jobs=1)

# explore several points in time
field_map = evoked_l_aud.plot_field(maps, time=.1)

###############################################################################
# .. note::
#     If trans_fname is set to None then only MEG estimates can be visualized.
开发者ID:EmanuelaLiaci,项目名称:mne-python,代码行数:30,代码来源:plot_visualize_evoked.py


示例8:

plt.show()

# estimate noise covarariance
noise_cov = mne.compute_covariance(epochs, tmax=0, method='shrunk',
                                   rank=None)

###############################################################################
# Visualize fields on MEG helmet

# The transformation here was aligned using the dig-montage. It's included in
# the spm_faces dataset and is named SPM_dig_montage.fif.
trans_fname = data_path + ('/MEG/spm/SPM_CTF_MEG_example_faces1_3D_'
                           'raw-trans.fif')

maps = mne.make_field_map(evoked[0], trans_fname, subject='spm',
                          subjects_dir=subjects_dir, n_jobs=1)

evoked[0].plot_field(maps, time=0.170)

###############################################################################
# Look at the whitened evoked daat

evoked[0].plot_white(noise_cov)

###############################################################################
# Compute forward model

src = data_path + '/subjects/spm/bem/spm-oct-6-src.fif'
bem = data_path + '/subjects/spm/bem/spm-5120-5120-5120-bem-sol.fif'
forward = mne.make_forward_solution(contrast.info, trans_fname, src, bem)
开发者ID:jhouck,项目名称:mne-python,代码行数:30,代码来源:spm_faces_dataset.py


示例9: read_evoked

args = parser.parse_args()

##script for creating average field map

data_path = "/home/custine/MEG/data/krns_kr3/9367/s5/"
evoked_fname = data_path + "ave_projon/9367_s5_Noun_Place_All-ave.fif"
subjects_dir = "/mnt/file1/binder/KRNS/anatomies/surfaces/"
trans_fname = "/mnt/file1/binder/KRNS/anatomies/surfaces/9367/mri/T1-neuromag/sets/COR-custine-140827-120918.fif"
# If trans_fname is set to None then only MEG estimates can be visualized

condition = 1
evoked = read_evoked(evoked_fname, baseline=(-0.2, 0.0))

# Compute the field maps to project MEG and EEG data to MEG helmet
# and scalp surface
maps = make_field_map(evoked, trans_fname=trans_fname, subject="9367", subjects_dir=subjects_dir, n_jobs=1)

# explore several points in time
[evoked.plot_field(maps, time=time) for time in [0.09, 0.11]]

evoked.save(
    "/home/custine/MEG/data/krns_kr3/9367/s5/results/fieldmaps/9367_s5_"
    + str(args.ave_name)
    + "_All-"
    + "-"
    + str(args.time1)
    + "-"
    + str(args.time2)
    + "-ave.fif"
)
# evoked.save(data_path + args.prefix+'-'+str(args.set)+'-'+str(args.time1)+'-'+str(args.time2)+'-ave.fif')
开发者ID:CandidaUstine,项目名称:MCW_MEG,代码行数:31,代码来源:makeFieldMaps.py


示例10:

# we plot only the ``left_auditory``, and then we plot them all in the same
# figure for comparison. Click on the individual plots to open them bigger.
left_auditory.plot_topo()
colors = 'yellow', 'green', 'red', 'blue'
mne.viz.plot_evoked_topo(evoked, color=colors)

###############################################################################
# Visualizing field lines in 3D
# -----------------------------
#
# We now compute the field maps to project MEG and EEG data to MEG helmet
# and scalp surface.
#
# To do this we'll need coregistration information. See
# :ref:`tut_forward` for more details.
#
# Here we just illustrate usage.

subjects_dir = data_path + '/subjects'
trans_fname = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'

maps = mne.make_field_map(left_auditory, trans=trans_fname, subject='sample',
                          subjects_dir=subjects_dir, n_jobs=1)

# explore several points in time
field_map = left_auditory.plot_field(maps, time=.1)

###############################################################################
# .. note::
#       If trans_fname is set to None then only MEG estimates can be visualized
开发者ID:mbillingr,项目名称:mne-python,代码行数:30,代码来源:plot_visualize_evoked.py


示例11: print

from mne.datasets import sample
from mne import make_field_map, read_evokeds

print(__doc__)

data_path = sample.data_path()
subjects_dir = data_path + '/subjects'
evoked_fname = data_path + '/MEG/sample/sample_audvis-ave.fif'
trans_fname = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'
# If trans_fname is set to None then only MEG estimates can be visualized

condition = 'Left Auditory'
evoked = read_evokeds(evoked_fname, condition=condition, baseline=(-0.2, 0.0))

# Compute the field maps to project MEG and EEG data to MEG helmet
# and scalp surface
maps = make_field_map(evoked, trans_fname, subject='sample',
                      subjects_dir=subjects_dir, n_jobs=1)

# Plot MEG and EEG fields in the helmet and scalp surface in the same figure.
evoked.plot_field(maps, time=0.11)

# Compute the MEG fields in the scalp surface
evoked.pick_types(meg=True, eeg=False)
maps_head = make_field_map(evoked, trans_fname, subject='sample',
                           subjects_dir=subjects_dir, n_jobs=1,
                           meg_surf='head')

# Plot MEG fields both in scalp surface and the helmet in the same figure.
evoked.plot_field([maps_head[0], maps[1]], time=0.11)
开发者ID:ImmanuelSamuel,项目名称:mne-python,代码行数:30,代码来源:plot_meg_eeg_fields_3d.py



注:本文中的mne.make_field_map函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mne.make_fixed_length_events函数代码示例发布时间:2022-05-27
下一篇:
Python mne.make_ad_hoc_cov函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap