本文整理汇总了Python中mne.fiff.Raw.close方法的典型用法代码示例。如果您正苦于以下问题:Python Raw.close方法的具体用法?Python Raw.close怎么用?Python Raw.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.fiff.Raw
的用法示例。
在下文中一共展示了Raw.close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_save
# 需要导入模块: from mne.fiff import Raw [as 别名]
# 或者: from mne.fiff.Raw import close [as 别名]
def test_save():
""" Test saving raw"""
raw = Raw(fif_fname, preload=True)
assert_raises(ValueError, raw.save, fif_fname)
new_fname = op.join(op.abspath(op.curdir), 'break.fif')
raw.save(op.join(tempdir, new_fname))
new_raw = Raw(op.join(tempdir, new_fname))
assert_raises(ValueError, new_raw.save, new_fname)
new_raw.close()
os.remove(new_fname)
示例2: Raw
# 需要导入模块: from mne.fiff import Raw [as 别名]
# 或者: from mne.fiff.Raw import close [as 别名]
mf_params_defaults = {'input_file': None, 'output_file': None,
'autobad': 'on', 'st': True, 'movecomp': True,
'st_corr': 0.96, 'st_buflen': 16, 'mv_hp': False,
'origin_head': [0,0,40], 'radius_head': None,
'bad': None, 'hpicons': True, 'linefreq': 50.,
'cal': cal_db, 'ctc': ctc_db,
'force': True, 'verbose': True, 'maxfilter_bin': mx_cmd,
'logfile': None}
for subj in anadict.analysis_dict.keys():
in_fname = anadict.analysis_dict[subj]['raw']['FFA']['files'][0] # Any file with HPI will do!
raw = Raw(in_fname)
radius_head, origin_head, origin_devive = fit_sphere_to_headshape(raw.info,ylim=0.070,verbose=VERBOSE)
raw.close()
# This assumes the key does not already exist...
anadict.analysis_dict[subj].update({'tsss_initial': {}})
for task in anadict.analysis_dict[subj]['raw'].keys():
# Start with a fresh copy of the defaults
# needs to be here in case mf_params was altered (empty_room)
mf_params = mf_params_defaults.copy()
# Needs to be reset here if previous task was "empty_room"
mf_params['movecomp'] = mf_params_defaults['movecomp']
mf_params['hpicons'] = mf_params_defaults['hpicons']
mf_params['origin_head'] = origin_head
mf_params['radius_head'] = radius_head