Пример #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

# Add the detected artifact indices to ica.exclude
ica.exclude += [ecg_source_idx, eog_source_idx]

# Restore sensor space data
epochs_ica = ica.pick_sources_epochs(epochs, include=None)
Пример #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

# Add the detected artifact indices to ica.exclude
ica.exclude += [ecg_source_idx, eog_source_idx]

# Restore sensor space data
epochs_ica = ica.pick_sources_epochs(epochs, include=None)