# How to specify a channel as being EOG or ECG?

**URL:** <https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 3, 2016, 4:40pm UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054 "2016-08-03T16:40:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 3, 2016, 4:40pm UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054/1 "2016-08-03T16:40:36Z")

</div>

Dear all,  
I have a problem with my ECG and EOG channels,  
in the acquisition software the channels 61, 62 and 63 were not specified  
as being EOG EOG and ECG channels. So they were recorded as being  
"classical" EEG channels.

Now I'm trying to solve this issue. In raw.info[chs] I tried to change  
"coil\_type", "coord\_frame" and "kind" values.  
Then, when I plot the raw data, the channel 63 still does not look like the  
classical ECG we usually observe.

Do you have any idea of what I should do to characterize my channels  
61-62-63 as being EOG and ECG?

Thanks a lot,

Beno?t  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160803/9561e997/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160803/9561e997/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 3, 2016, 5:14pm UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054/2 "2016-08-03T17:14:34Z")

</div>

Dear Beno?t,

Have you tried raw.set\_channel\_types? Something like:

raw.set\_channel\_types({'EEG61': 'eog'})

should do the trick for you.

Mainak

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 4, 2016, 8:39am UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054/3 "2016-08-04T08:39:35Z")

</div>

Thanks for your answer,  
but actually it returns an error:  
" File  
"/home/bm243969/anaconda2/lib/python2.7/site-packages/mne/channels/channels.py",  
line 196, in \_check\_set  
&nbsp;&nbsp;&nbsp;&nbsp;% (ch['ch\_name'], proj['desc']))

RuntimeError: Cannot change channel type for channel EEG061 in projector  
"Average EEG reference"

Beno?t

2016-08-03 19:14 GMT+02:00 Mainak Jas \<mainakjas at gmail.com\>:

> Dear Beno?t,
> 
> Have you tried raw.set\_channel\_types? Something like:
> 
> raw.set\_channel\_types({'EEG61': 'eog'})
> 
> should do the trick for you.
> 
> Mainak
> 
> > Dear all,  
> > I have a problem with my ECG and EOG channels,  
> > in the acquisition software the channels 61, 62 and 63 were not specified  
> > as being EOG EOG and ECG channels. So they were recorded as being  
> > "classical" EEG channels.
> > 
> > Now I'm trying to solve this issue. In raw.info[chs] I tried to change  
> > "coil\_type", "coord\_frame" and "kind" values.  
> > Then, when I plot the raw data, the channel 63 still does not look like  
> > the classical ECG we usually observe.
> > 
> > Do you have any idea of what I should do to characterize my channels  
> > 61-62-63 as being EOG and ECG?
> > 
> > Thanks a lot,
> > 
> > Beno?t
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](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  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](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.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](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  
> [MyComplianceReport.com: Compliance and Ethics Reporting](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/20160804/8f1944c8/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160804/8f1944c8/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 4, 2016, 9:35am UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054/4 "2016-08-04T09:35:41Z")

</div>

> Thanks for your answer,  
> but actually it returns an error:  
> " File  
> "/home/bm243969/anaconda2/lib/python2.7/site-packages/mne/channels/channels.py",  
> line 196, in \_check\_set  
> &nbsp;&nbsp;&nbsp;&nbsp;% (ch['ch\_name'], proj['desc']))
> 
> RuntimeError: Cannot change channel type for channel EEG061 in projector  
> "Average EEG reference"

the EEG average ref proj has already been applied to your data. Use proj=False  
somewhere or add\_eeg\_ref=False in read\_raw\_fif.

HTH  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 4, 2016, 1:10pm UTC](https://mne.discourse.group/t/how-to-specify-a-channel-as-being-eog-or-ecg/1054/5 "2016-08-04T13:10:33Z")

</div>

I added add\_eeg\_ref=False in read\_raw\_fif and then used  
raw.set\_channel\_types.  
It works well and after filtering my ECG channel it's way nicer.  
It still doesn't look like a classical ECG and no correlation is found when  
I do the ICA  
(but it's ok for EOG).  
I will have to remove components correlated to ECG manually.

Thanks for your help,

Beno?t

2016-08-04 11:35 GMT+02:00 Alexandre Gramfort \<  
alexandre.gramfort at telecom-paristech.fr\>:

> \> Thanks for your answer,  
> \> but actually it returns an error:  
> \> " File  
> \> "/home/bm243969/anaconda2/lib/python2.7/site-packages/mne/  
> channels/channels.py",  
> \> line 196, in \_check\_set  
> \> % (ch['ch\_name'], proj['desc']))  
> \>  
> \> RuntimeError: Cannot change channel type for channel EEG061 in projector  
> \> "Average EEG reference"
> 
> the EEG average ref proj has already been applied to your data. Use  
> proj=False  
> somewhere or add\_eeg\_ref=False in read\_raw\_fif.
> 
> HTH  
> Alex  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](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](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/20160804/787e1ff9/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160804/787e1ff9/attachment.html)
