[Mne_analysis] Artifact rejection on select channels

Mainak Jas mainakjas at gmail.com
Wed Mar 1 12:41:40 EST 2017
Search archives:

Hi Ghislaine,

You can select the subset of channels using pick_channels and use it for
artifact rejection. In the end, you could combine the data in the modified
channels and the original channels by concatenating them in numpy and by
using EpochsArray. It will require a few lines of python code. Something
along the lines of:

>>> epochs_subset = epochs.copy().pick_channels(...)
>>> # run artifact rejection
>>> X_clean = epochs_subset.get_data()
>>> X_rest = epochs.pick_channels(...).get_data()  # pick the rest of the
channels
>>> epochs = EpochsArray(np.concatenate((X_clean, X_rest), axis=0),
epochs.info)

I'm sure it doesn't work out of the box, so you may have to change the
code. Don't hesitate to let us know if you get stuck at any point.

Mainak

On Wed, Mar 1, 2017 at 2:40 PM, Ghislain d'Entremont <
ghislaindentremont at gmail.com> wrote:

> Hi,
>
> I want to run artifact rejection on a specific subset of channels without
> modifying my epoch object otherwise (i.e. the other channels).
>
> Thanks,
>
> *Ghislain d'Entremont*
> BSc, Neuroscience, Honors
> Dalhousie University
> tel: 902-802-5671 <(902)%20802-5671> (text)
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170301/e5b1bfaf/attachment.html 


More information about the Mne_analysis mailing list