Пример #1
0
# get maximum correlation index for EOG
eog_source_idx = np.abs(eog_scores).argmax()

print '#%i -- ICA component resembling the EOG' % eog_source_idx

# As the subject did not constantly move her eyes, the movement artifacts
# may remain hidden when plotting single epochs.
# Plotting the identified source across epochs reveals
# considerable EOG artifacts.

# get maximum correlation index for EOG
eog_source_idx = np.abs(eog_scores).argmax()

# get sources
sources = ica.get_sources_epochs(epochs, concatenate=True)

pl.figure()
pl.title('Source most correlated with the EOG channel')
pl.plot(sources[eog_source_idx].T)
pl.show()

###############################################################################
# Reject artifact sources and compare results

# join the detected artifact indices
exclude = np.r_[ecg_source_idx, eog_source_idx]

# Restore sources, use 64 PCA components which include the ICA cleaned sources
# plus additional PCA components not supplied to ICA (up to rank 64).
# This allows to control the trade-off between denoising and preserving data.
Пример #2
0
# get maximum correlation index for EOG
eog_source_idx = np.abs(eog_scores).argmax()

print '#%i -- ICA component resembling the EOG' % eog_source_idx

# As the subject did not constantly move her eyes, the movement artifacts
# may remain hidden when plotting single epochs.
# Plotting the identified source across epochs reveals
# considerable EOG artifacts.

# get maximum correlation index for EOG
eog_source_idx = np.abs(eog_scores).argmax()

# get sources
sources = ica.get_sources_epochs(epochs, concatenate=True)

pl.figure()
pl.title('Source most correlated with the EOG channel')
pl.plot(sources[eog_source_idx].T)
pl.show()

###############################################################################
# Reject artifact sources and compare results

# join the detected artifact indices
exclude = np.r_[ecg_source_idx, eog_source_idx]

# Restore sources, use 64 PCA components which include the ICA cleaned sources
# plus additional PCA components not supplied to ICA (up to rank 64).
# This allows to control the trade-off between denoising and preserving data.