selecting epochs to use in compute_proj_eog

Dear list,

I'm currently trying to correct EOG artifacts on EEG data. To do so, I'm
using "compute_proj_eog". This function first detects where EOG
artifacts are, by using "find_eog_events". However, in some datasets,
"find_eog_events" clearly picks segments that are not EOG. Using
"create_eog_epochs" and plotting the resulting epochs, one can select
which ones? are really EOG artifacts and save them in the epoch object.
But? how can we indicate to "compute_proj_eog" that it should only use
these ones for later correction??? Indeed, "compute_proj_eog" re-run
"find_eog_events", and hence ends-up with all the original segments,
including the ones not corresponding to EOG artifacts.

Is there a way to tell "compute_proj_eog" which segment it should take
into account to build the projector?

??? Thank you in advance for your help!!

??? ??? Best,

??? ??? ??? Boris.

Hi Boris,

You can add the projector manually using something like this:

ssp_blink_proj = mne.compute_proj_epochs(blink_epochs, n_grad=0, n_mag=0,
                                         n_eeg=2, desc_prefix=None,
verbose=None)
raw = raw.add_proj(ssp_blink_proj)

Here "blink_epochs" is your manually curated epochs object, and "raw" is
the raw data you want to apply the projector to. n_grad and n_mag are set
to zero since it's EEG-only data.

-- dan

Daniel McCloy
http://dan.mccloy.info/
Postdoctoral Research Associate
Institute for Learning and Brain Sciences
University of Washington

Hi Dan,

Le 25/09/2017 ? 20:51, Dan McCloy a ?crit?:

Hi Boris,

You can add the projector manually using something like this:

ssp_blink_proj = mne.compute_proj_epochs(blink_epochs, n_grad=0, n_mag=0,
??? n_eeg=2, desc_prefix=None,
verbose=None)
raw = raw.add_proj(ssp_blink_proj)

Thanks very much!! It works perfectly !!!

??? B.