本文整理汇总了Python中mne.io.RawArray.plot方法的典型用法代码示例。如果您正苦于以下问题:Python RawArray.plot方法的具体用法?Python RawArray.plot怎么用?Python RawArray.plot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.io.RawArray
的用法示例。
在下文中一共展示了RawArray.plot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from mne.io import RawArray [as 别名]
# 或者: from mne.io.RawArray import plot [as 别名]
n_signal = eeg_signal.shape[0] # the number of signals
n_sample = eeg_signal.shape[1] # dimension of each signal
# Normalize the data to be run
b = eeg_signal
b = ((b.T - np.mean(b, axis=1)) / np.std(b, axis=1)).T
# Define the parameters
# 128 kernels with size of 201
size_kernel = [2, 61]
# size_kernel = [2, 51]
ch_names = ['EEG%03d' % i for i in range(n_signal)]
info = create_info(ch_names, sfreq=sfreq, ch_types='eeg')
raw = RawArray(eeg_signal * 1e-6, info)
raw.plot(scalings=dict(eeg='auto'), duration=300)
# Optim options
max_it = 200 # the number of iterations
tol = np.float64(1e-3) # the stop threshold for the algorithm
# RUN THE ALGORITHM
[d, z, Dz, list_obj_val, list_obj_val_filter, list_obj_val_z, reconstr_err] = \
CSC.learn_conv_sparse_coder(b, size_kernel, max_it, tol, random_state=42)
plt.figure()
plt.plot(d[0, :])
plt.plot(d[1, :])
plt.show()
end = time.clock()
示例2: test_plot_misc_auto
# 需要导入模块: from mne.io import RawArray [as 别名]
# 或者: from mne.io.RawArray import plot [as 别名]
def test_plot_misc_auto():
"""Test plotting of data with misc auto scaling."""
data = np.random.RandomState(0).randn(1, 1000)
raw = RawArray(data, create_info(1, 1000., 'misc'))
raw.plot()
plt.close('all')