当前位置: 首页>>代码示例>>Python>>正文


Python io.read_raw_fif方法代码示例

本文整理汇总了Python中mne.io.read_raw_fif方法的典型用法代码示例。如果您正苦于以下问题:Python io.read_raw_fif方法的具体用法?Python io.read_raw_fif怎么用?Python io.read_raw_fif使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mne.io的用法示例。


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

示例1: test_coil_type

# 需要导入模块: from mne import io [as 别名]
# 或者: from mne.io import read_raw_fif [as 别名]
def test_coil_type():
    """Test the correct coil type is retrieved."""
    data_path = testing.data_path()
    raw_fname = op.join(data_path, 'MEG', 'sample',
                        'sample_audvis_trunc_raw.fif')
    raw = read_raw_fif(raw_fname)
    assert coil_type(raw.info, 0) == 'meggradplanar'
    assert coil_type(raw.info, 2) == 'megmag'
    assert coil_type(raw.info, 306) == 'misc'
    assert coil_type(raw.info, 315) == 'eeg'
    raw.info['chs'][0]['coil_type'] = 1234
    assert coil_type(raw.info, 0) == 'n/a' 
开发者ID:mne-tools,项目名称:mne-bids,代码行数:14,代码来源:test_pick.py

示例2: load_fif

# 需要导入模块: from mne import io [as 别名]
# 或者: from mne.io import read_raw_fif [as 别名]
def load_fif(file_path, **kwargs):
    """
    File loader function for .fif and .raw.fif extension files.
    Redirects to the mne.io.read_raw_fif function.

    Loads all channels, non-needed channels are dropped in the extract function.
    See utime.io.extractors.psg_extractors

    Returns:
        mne.io.Raw fif data array
    """
    from mne.io import read_raw_fif
    with mne_no_log_context():
        raw = read_raw_fif(file_path)
    return raw 
开发者ID:perslev,项目名称:U-Time,代码行数:17,代码来源:psg_file_loaders.py

示例3: init_data

# 需要导入模块: from mne import io [as 别名]
# 或者: from mne.io import read_raw_fif [as 别名]
def init_data():
    data_path = sample.data_path()
    raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif'
    fname_inv = data_path + '/MEG/sample/sample_audvis-meg-oct-6-meg-inv.fif'
    tmin, tmax, event_id = -0.2, 0.5, 1

    # Setup for reading the raw data
    raw = io.read_raw_fif(raw_fname)
    events = mne.find_events(raw, stim_channel='STI 014')
    inverse_operator = read_inverse_operator(fname_inv)

    # Setting the label
    label = mne.read_label(data_path + '/MEG/sample/labels/Aud-lh.label')

    include = []
    raw.info['bads'] += ['MEG 2443', 'EEG 053']  # bads + 2 more

    # picks MEG gradiometers
    picks = mne.pick_types(raw.info, meg=True, eeg=False, eog=True,
                           stim=False, include=include, exclude='bads')

    # Load condition 1
    event_id = 1
    # Use linear detrend to reduce any edge artifacts
    epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks,
                        baseline=(None, 0), reject=dict(grad=4000e-13, eog=150e-6),
                        preload=True, detrend=1)
    return epochs, inverse_operator, label 
开发者ID:pelednoam,项目名称:mmvt,代码行数:30,代码来源:source_estimate_power.py


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