# Problem with mne.pick\_types

**URL:** <https://mne.discourse.group/t/problem-with-mne-pick-types/809>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 27, 2014, 9:53am UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809 "2014-08-27T09:53:22Z")\
**Posts on this page:** 12\
**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 27, 2014, 9:53am UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/1 "2014-08-27T09:53:22Z")

</div>

Hi all,

I have used mne.pick\_types as follows:

picks = mne.pick\_types(evoked.info,selection=selection)

where selection includes 36 channel names.  
However, picks is an array with only 35 elements.  
I wonder what could be wrong there?

Regards,  
Maria  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140827/2b25bb6a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/2b25bb6a/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 27, 2014, 9:56am UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/2 "2014-08-27T09:56:13Z")

</div>

Hi Maria,

Do you have one bad channel? Take a look at evoked.info['bads']  
pick types automatically excludes those.

-Denis

2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> Hi all,
> 
> I have used mne.pick\_types as follows:
> 
> picks = mne.pick\_types(evoked.info,selection=selection)
> 
> where selection includes 36 channel names.  
> However, picks is an array with only 35 elements.  
> I wonder what could be wrong there?
> 
> Regards,  
> Maria
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> 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/20140827/e2611359/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/e2611359/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 27, 2014, 10:11am UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/3 "2014-08-27T10:11:54Z")

</div>

I have one bad channel but it is not included in selection. Can it however  
cause problems?

-Maria

Here are the outputs:  
evoked.info['bads']  
Out[54]: [u'MEG 2511']

but

In [53]: selection  
Out[53]:  
['MEG 0133',  
'MEG 0212',  
'MEG 0223',  
'MEG 1313',  
'MEG 1322',  
'MEG 1443',  
'MEG 0132',  
'MEG 0213',  
'MEG 0222',  
'MEG 1312',  
'MEG 1323',  
'MEG 1442',  
'MEG 1513',  
'MEG 0242',  
'MEG 0233',  
'MEG 1343',  
'MEG 1332',  
'MEG 2613',  
'MEG 1512',  
'MEG 0243',  
'MEG 0232',  
'MEG 1343',  
'MEG 1333',  
'MEG 2612',  
'MEG 1523',  
'MEG 1612',  
'MEG 1623',  
'MEG 2413',  
'MEG 2422',  
'MEG 2643',  
'MEG 1522',  
'MEG 1613',  
'MEG 1622',  
'MEG 2412',  
'MEG 2423',  
'MEG 2642']

2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
denis.engemann at gmail.com\>:

> Hi Maria,
> 
> Do you have one bad channel? Take a look at evoked.info['bads']  
> pick types automatically excludes those.
> 
> -Denis
> 
> 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> > Hi all,
> > 
> > I have used mne.pick\_types as follows:
> > 
> > picks = mne.pick\_types(evoked.info,selection=selection)
> > 
> > where selection includes 36 channel names.  
> > However, picks is an array with only 35 elements.  
> > I wonder what could be wrong there?
> > 
> > Regards,  
> > Maria
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > 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/20140827/ad4bac8b/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/ad4bac8b/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 27, 2014, 12:02pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/4 "2014-08-27T12:02:13Z")

</div>

I manged to solve this already.

-Maria

2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> I have one bad channel but it is not included in selection. Can it however  
> cause problems?
> 
> -Maria
> 
> Here are the outputs:  
> evoked.info['bads']  
> Out[54]: [u'MEG 2511']
> 
> but
> 
> In [53]: selection  
> Out[53]:  
> ['MEG 0133',  
> 'MEG 0212',  
> 'MEG 0223',  
> 'MEG 1313',  
> 'MEG 1322',  
> 'MEG 1443',  
> 'MEG 0132',  
> 'MEG 0213',  
> 'MEG 0222',  
> 'MEG 1312',  
> 'MEG 1323',  
> 'MEG 1442',  
> 'MEG 1513',  
> 'MEG 0242',  
> 'MEG 0233',  
> 'MEG 1343',  
> 'MEG 1332',  
> 'MEG 2613',  
> 'MEG 1512',  
> 'MEG 0243',  
> 'MEG 0232',  
> 'MEG 1343',  
> 'MEG 1333',  
> 'MEG 2612',  
> 'MEG 1523',  
> 'MEG 1612',  
> 'MEG 1623',  
> 'MEG 2413',  
> 'MEG 2422',  
> 'MEG 2643',  
> 'MEG 1522',  
> 'MEG 1613',  
> 'MEG 1622',  
> 'MEG 2412',  
> 'MEG 2423',  
> 'MEG 2642']
> 
> 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> denis.engemann at gmail.com\>:
> 
> Hi Maria,
> 
> > Do you have one bad channel? Take a look at evoked.info['bads']  
> > pick types automatically excludes those.
> > 
> > -Denis
> > 
> > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > 
> > > Hi all,
> > > 
> > > I have used mne.pick\_types as follows:
> > > 
> > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > 
> > > where selection includes 36 channel names.  
> > > However, picks is an array with only 35 elements.  
> > > I wonder what could be wrong there?
> > > 
> > > Regards,  
> > > Maria
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > 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/20140827/3d251850/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/3d251850/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 27, 2014, 12:05pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/5 "2014-08-27T12:05:01Z")

</div>

Hi,

2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> I manged to solve this already.

now I'm curious, what was the problem?

-Denis

> -Maria
> 
> 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> I have one bad channel but it is not included in selection. Can it however
> 
> > cause problems?
> > 
> > -Maria
> > 
> > Here are the outputs:  
> > evoked.info['bads']  
> > Out[54]: [u'MEG 2511']
> > 
> > but
> > 
> > In [53]: selection  
> > Out[53]:  
> > ['MEG 0133',  
> > 'MEG 0212',  
> > 'MEG 0223',  
> > 'MEG 1313',  
> > 'MEG 1322',  
> > 'MEG 1443',  
> > 'MEG 0132',  
> > 'MEG 0213',  
> > 'MEG 0222',  
> > 'MEG 1312',  
> > 'MEG 1323',  
> > 'MEG 1442',  
> > 'MEG 1513',  
> > 'MEG 0242',  
> > 'MEG 0233',  
> > 'MEG 1343',  
> > 'MEG 1332',  
> > 'MEG 2613',  
> > 'MEG 1512',  
> > 'MEG 0243',  
> > 'MEG 0232',  
> > 'MEG 1343',  
> > 'MEG 1333',  
> > 'MEG 2612',  
> > 'MEG 1523',  
> > 'MEG 1612',  
> > 'MEG 1623',  
> > 'MEG 2413',  
> > 'MEG 2422',  
> > 'MEG 2643',  
> > 'MEG 1522',  
> > 'MEG 1613',  
> > 'MEG 1622',  
> > 'MEG 2412',  
> > 'MEG 2423',  
> > 'MEG 2642']
> > 
> > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > denis.engemann at gmail.com\>:
> > 
> > Hi Maria,
> > 
> > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > pick types automatically excludes those.
> > > 
> > > -Denis
> > > 
> > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > 
> > > > Hi all,
> > > > 
> > > > I have used mne.pick\_types as follows:
> > > > 
> > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > 
> > > > where selection includes 36 channel names.  
> > > > However, picks is an array with only 35 elements.  
> > > > I wonder what could be wrong there?
> > > > 
> > > > Regards,  
> > > > Maria
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > 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.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> 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/20140827/9233c27a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/9233c27a/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 27, 2014, 4:02pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/6 "2014-08-27T16:02:12Z")

</div>

There was one channel two times in selection...

However, it seems to cause a problem if some of the channels in selection  
is bad.  
I would like to plot a subset of channels from each data file in a loop as  
follows:

picks = mne.pick\_types(evoked.info,selection=selection)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
evoked\_raw.data[picks[idx]])  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1

Is it somehow possible to, for example, plot a blank plot if there is a bad  
channel in selection?

-Maria

2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
denis.engemann at gmail.com\>:

> Hi,
> 
> 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> I manged to solve this already.
> 
> > 
> 
> now I'm curious, what was the problem?
> 
> -Denis
> 
> > -Maria
> > 
> > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > 
> > I have one bad channel but it is not included in selection. Can it
> > 
> > > however cause problems?
> > > 
> > > -Maria
> > > 
> > > Here are the outputs:  
> > > evoked.info['bads']  
> > > Out[54]: [u'MEG 2511']
> > > 
> > > but
> > > 
> > > In [53]: selection  
> > > Out[53]:  
> > > ['MEG 0133',  
> > > 'MEG 0212',  
> > > 'MEG 0223',  
> > > 'MEG 1313',  
> > > 'MEG 1322',  
> > > 'MEG 1443',  
> > > 'MEG 0132',  
> > > 'MEG 0213',  
> > > 'MEG 0222',  
> > > 'MEG 1312',  
> > > 'MEG 1323',  
> > > 'MEG 1442',  
> > > 'MEG 1513',  
> > > 'MEG 0242',  
> > > 'MEG 0233',  
> > > 'MEG 1343',  
> > > 'MEG 1332',  
> > > 'MEG 2613',  
> > > 'MEG 1512',  
> > > 'MEG 0243',  
> > > 'MEG 0232',  
> > > 'MEG 1343',  
> > > 'MEG 1333',  
> > > 'MEG 2612',  
> > > 'MEG 1523',  
> > > 'MEG 1612',  
> > > 'MEG 1623',  
> > > 'MEG 2413',  
> > > 'MEG 2422',  
> > > 'MEG 2643',  
> > > 'MEG 1522',  
> > > 'MEG 1613',  
> > > 'MEG 1622',  
> > > 'MEG 2412',  
> > > 'MEG 2423',  
> > > 'MEG 2642']
> > > 
> > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > denis.engemann at gmail.com\>:
> > > 
> > > Hi Maria,
> > > 
> > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > pick types automatically excludes those.
> > > > 
> > > > -Denis
> > > > 
> > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > 
> > > > > Hi all,
> > > > > 
> > > > > I have used mne.pick\_types as follows:
> > > > > 
> > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > 
> > > > > where selection includes 36 channel names.  
> > > > > However, picks is an array with only 35 elements.  
> > > > > I wonder what could be wrong there?
> > > > > 
> > > > > Regards,  
> > > > > Maria
> > > > > 
> > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > 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.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > 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/20140827/29d384da/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/29d384da/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 27, 2014, 4:46pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/7 "2014-08-27T16:46:55Z")

</div>

Or could it alternatively be possible to plot also the bad channels?

I have:

picks = mne.pick\_types(evoked\_raw.info,selection=selection)

I think that this shouldn't exclude bads because I have not exclude='bads'.

However, picks doesn't include the channels in selection that are marked as  
bad.

In the reference of mne.picks\_type it is said:

exclude : list of string | str

List of channels to exclude. If empty do not exclude any (default). If  
?bads?, exclude channels in info[?bads?]

-Maria

2014-08-27 19:02 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> There was one channel two times in selection...
> 
> However, it seems to cause a problem if some of the channels in selection  
> is bad.  
> I would like to plot a subset of channels from each data file in a loop as  
> follows:
> 
> picks = mne.pick\_types(evoked.info,selection=selection)
> 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
> evoked\_raw.data[picks[idx]])  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1
> 
> Is it somehow possible to, for example, plot a blank plot if there is a  
> bad channel in selection?
> 
> -Maria
> 
> 2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
> denis.engemann at gmail.com\>:
> 
> Hi,
> 
> > 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > 
> > I manged to solve this already.
> > 
> > > 
> > 
> > now I'm curious, what was the problem?
> > 
> > -Denis
> > 
> > > -Maria
> > > 
> > > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > 
> > > I have one bad channel but it is not included in selection. Can it
> > > 
> > > > however cause problems?
> > > > 
> > > > -Maria
> > > > 
> > > > Here are the outputs:  
> > > > evoked.info['bads']  
> > > > Out[54]: [u'MEG 2511']
> > > > 
> > > > but
> > > > 
> > > > In [53]: selection  
> > > > Out[53]:  
> > > > ['MEG 0133',  
> > > > 'MEG 0212',  
> > > > 'MEG 0223',  
> > > > 'MEG 1313',  
> > > > 'MEG 1322',  
> > > > 'MEG 1443',  
> > > > 'MEG 0132',  
> > > > 'MEG 0213',  
> > > > 'MEG 0222',  
> > > > 'MEG 1312',  
> > > > 'MEG 1323',  
> > > > 'MEG 1442',  
> > > > 'MEG 1513',  
> > > > 'MEG 0242',  
> > > > 'MEG 0233',  
> > > > 'MEG 1343',  
> > > > 'MEG 1332',  
> > > > 'MEG 2613',  
> > > > 'MEG 1512',  
> > > > 'MEG 0243',  
> > > > 'MEG 0232',  
> > > > 'MEG 1343',  
> > > > 'MEG 1333',  
> > > > 'MEG 2612',  
> > > > 'MEG 1523',  
> > > > 'MEG 1612',  
> > > > 'MEG 1623',  
> > > > 'MEG 2413',  
> > > > 'MEG 2422',  
> > > > 'MEG 2643',  
> > > > 'MEG 1522',  
> > > > 'MEG 1613',  
> > > > 'MEG 1622',  
> > > > 'MEG 2412',  
> > > > 'MEG 2423',  
> > > > 'MEG 2642']
> > > > 
> > > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > > denis.engemann at gmail.com\>:
> > > > 
> > > > Hi Maria,
> > > > 
> > > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > > pick types automatically excludes those.
> > > > > 
> > > > > -Denis
> > > > > 
> > > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > 
> > > > > > Hi all,
> > > > > > 
> > > > > > I have used mne.pick\_types as follows:
> > > > > > 
> > > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > > 
> > > > > > where selection includes 36 channel names.  
> > > > > > However, picks is an array with only 35 elements.  
> > > > > > I wonder what could be wrong there?
> > > > > > 
> > > > > > Regards,  
> > > > > > Maria
> > > > > > 
> > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > 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.
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > 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/20140827/3694b0b4/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/3694b0b4/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 27, 2014, 4:51pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/8 "2014-08-27T16:51:32Z")

</div>

Hi Maria,

it seems you found a 'bug' in the documentation. If you hit  
'mne.pick\_types? in and IPython terminal you can see that 'exclude'  
defaults to bads.  
I guess that would explain your problem?

-Denis

2014-08-27 18:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> Or could it alternatively be possible to plot also the bad channels?
> 
> I have:
> 
> picks = mne.pick\_types(evoked\_raw.info,selection=selection)
> 
> I think that this shouldn't exclude bads because I have not exclude='bads'.
> 
> However, picks doesn't include the channels in selection that are marked  
> as bad.
> 
> In the reference of mne.picks\_type it is said:
> 
> exclude : list of string | str
> 
> List of channels to exclude. If empty do not exclude any (default). If  
> ?bads?, exclude channels in info[?bads?]
> 
> -Maria
> 
> 2014-08-27 19:02 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> There was one channel two times in selection...
> 
> > However, it seems to cause a problem if some of the channels in selection  
> > is bad.  
> > I would like to plot a subset of channels from each data file in a loop  
> > as follows:
> > 
> > picks = mne.pick\_types(evoked.info,selection=selection)
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
> > evoked\_raw.data[picks[idx]])  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1
> > 
> > Is it somehow possible to, for example, plot a blank plot if there is a  
> > bad channel in selection?
> > 
> > -Maria
> > 
> > 2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
> > denis.engemann at gmail.com\>:
> > 
> > Hi,
> > 
> > > 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > 
> > > I manged to solve this already.
> > > 
> > > > 
> > > 
> > > now I'm curious, what was the problem?
> > > 
> > > -Denis
> > > 
> > > > -Maria
> > > > 
> > > > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > 
> > > > I have one bad channel but it is not included in selection. Can it
> > > > 
> > > > > however cause problems?
> > > > > 
> > > > > -Maria
> > > > > 
> > > > > Here are the outputs:  
> > > > > evoked.info['bads']  
> > > > > Out[54]: [u'MEG 2511']
> > > > > 
> > > > > but
> > > > > 
> > > > > In [53]: selection  
> > > > > Out[53]:  
> > > > > ['MEG 0133',  
> > > > > 'MEG 0212',  
> > > > > 'MEG 0223',  
> > > > > 'MEG 1313',  
> > > > > 'MEG 1322',  
> > > > > 'MEG 1443',  
> > > > > 'MEG 0132',  
> > > > > 'MEG 0213',  
> > > > > 'MEG 0222',  
> > > > > 'MEG 1312',  
> > > > > 'MEG 1323',  
> > > > > 'MEG 1442',  
> > > > > 'MEG 1513',  
> > > > > 'MEG 0242',  
> > > > > 'MEG 0233',  
> > > > > 'MEG 1343',  
> > > > > 'MEG 1332',  
> > > > > 'MEG 2613',  
> > > > > 'MEG 1512',  
> > > > > 'MEG 0243',  
> > > > > 'MEG 0232',  
> > > > > 'MEG 1343',  
> > > > > 'MEG 1333',  
> > > > > 'MEG 2612',  
> > > > > 'MEG 1523',  
> > > > > 'MEG 1612',  
> > > > > 'MEG 1623',  
> > > > > 'MEG 2413',  
> > > > > 'MEG 2422',  
> > > > > 'MEG 2643',  
> > > > > 'MEG 1522',  
> > > > > 'MEG 1613',  
> > > > > 'MEG 1622',  
> > > > > 'MEG 2412',  
> > > > > 'MEG 2423',  
> > > > > 'MEG 2642']
> > > > > 
> > > > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > > > denis.engemann at gmail.com\>:
> > > > > 
> > > > > Hi Maria,
> > > > > 
> > > > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > > > pick types automatically excludes those.
> > > > > > 
> > > > > > -Denis
> > > > > > 
> > > > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > 
> > > > > > > Hi all,
> > > > > > > 
> > > > > > > I have used mne.pick\_types as follows:
> > > > > > > 
> > > > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > > > 
> > > > > > > where selection includes 36 channel names.  
> > > > > > > However, picks is an array with only 35 elements.  
> > > > > > > I wonder what could be wrong there?
> > > > > > > 
> > > > > > > Regards,  
> > > > > > > Maria
> > > > > > > 
> > > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > > 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.
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > 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.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> 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/20140827/820f773a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/820f773a/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 27, 2014, 5:09pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/9 "2014-08-27T17:09:20Z")

</div>

Is it somehow possible to include the bads if they are in selection?

-Maria

2014-08-27 19:51 GMT+03:00 Denis-Alexander Engemann \<  
denis.engemann at gmail.com\>:

> Hi Maria,
> 
> it seems you found a 'bug' in the documentation. If you hit  
> 'mne.pick\_types? in and IPython terminal you can see that 'exclude'  
> defaults to bads.  
> I guess that would explain your problem?
> 
> -Denis
> 
> 2014-08-27 18:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> Or could it alternatively be possible to plot also the bad channels?
> 
> > I have:
> > 
> > picks = mne.pick\_types(evoked\_raw.info,selection=selection)
> > 
> > I think that this shouldn't exclude bads because I have not  
> > exclude='bads'.
> > 
> > However, picks doesn't include the channels in selection that are marked  
> > as bad.
> > 
> > In the reference of mne.picks\_type it is said:
> > 
> > exclude : list of string | str
> > 
> > List of channels to exclude. If empty do not exclude any (default). If  
> > ?bads?, exclude channels in info[?bads?]
> > 
> > -Maria
> > 
> > 2014-08-27 19:02 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > 
> > There was one channel two times in selection...
> > 
> > > However, it seems to cause a problem if some of the channels in  
> > > selection is bad.  
> > > I would like to plot a subset of channels from each data file in a loop  
> > > as follows:
> > > 
> > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > 
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
> > > evoked\_raw.data[picks[idx]])  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1
> > > 
> > > Is it somehow possible to, for example, plot a blank plot if there is a  
> > > bad channel in selection?
> > > 
> > > -Maria
> > > 
> > > 2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
> > > denis.engemann at gmail.com\>:
> > > 
> > > Hi,
> > > 
> > > > 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > 
> > > > I manged to solve this already.
> > > > 
> > > > > 
> > > > 
> > > > now I'm curious, what was the problem?
> > > > 
> > > > -Denis
> > > > 
> > > > > -Maria
> > > > > 
> > > > > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > 
> > > > > I have one bad channel but it is not included in selection. Can it
> > > > > 
> > > > > > however cause problems?
> > > > > > 
> > > > > > -Maria
> > > > > > 
> > > > > > Here are the outputs:  
> > > > > > evoked.info['bads']  
> > > > > > Out[54]: [u'MEG 2511']
> > > > > > 
> > > > > > but
> > > > > > 
> > > > > > In [53]: selection  
> > > > > > Out[53]:  
> > > > > > ['MEG 0133',  
> > > > > > 'MEG 0212',  
> > > > > > 'MEG 0223',  
> > > > > > 'MEG 1313',  
> > > > > > 'MEG 1322',  
> > > > > > 'MEG 1443',  
> > > > > > 'MEG 0132',  
> > > > > > 'MEG 0213',  
> > > > > > 'MEG 0222',  
> > > > > > 'MEG 1312',  
> > > > > > 'MEG 1323',  
> > > > > > 'MEG 1442',  
> > > > > > 'MEG 1513',  
> > > > > > 'MEG 0242',  
> > > > > > 'MEG 0233',  
> > > > > > 'MEG 1343',  
> > > > > > 'MEG 1332',  
> > > > > > 'MEG 2613',  
> > > > > > 'MEG 1512',  
> > > > > > 'MEG 0243',  
> > > > > > 'MEG 0232',  
> > > > > > 'MEG 1343',  
> > > > > > 'MEG 1333',  
> > > > > > 'MEG 2612',  
> > > > > > 'MEG 1523',  
> > > > > > 'MEG 1612',  
> > > > > > 'MEG 1623',  
> > > > > > 'MEG 2413',  
> > > > > > 'MEG 2422',  
> > > > > > 'MEG 2643',  
> > > > > > 'MEG 1522',  
> > > > > > 'MEG 1613',  
> > > > > > 'MEG 1622',  
> > > > > > 'MEG 2412',  
> > > > > > 'MEG 2423',  
> > > > > > 'MEG 2642']
> > > > > > 
> > > > > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > > > > denis.engemann at gmail.com\>:
> > > > > > 
> > > > > > Hi Maria,
> > > > > > 
> > > > > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > > > > pick types automatically excludes those.
> > > > > > > 
> > > > > > > -Denis
> > > > > > > 
> > > > > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > > 
> > > > > > > > Hi all,
> > > > > > > > 
> > > > > > > > I have used mne.pick\_types as follows:
> > > > > > > > 
> > > > > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > > > > 
> > > > > > > > where selection includes 36 channel names.  
> > > > > > > > However, picks is an array with only 35 elements.  
> > > > > > > > I wonder what could be wrong there?
> > > > > > > > 
> > > > > > > > Regards,  
> > > > > > > > Maria
> > > > > > > > 
> > > > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > > > 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.
> > > > > 
> > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > 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.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > 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/20140827/f44a311a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/f44a311a/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 27, 2014, 5:16pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/10 "2014-08-27T17:16:01Z")

</div>

Have you tried to to pass exclude= when invoking mne.pick\_types?

-Denis

2014-08-27 19:09 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> Is it somehow possible to include the bads if they are in selection?
> 
> -Maria
> 
> 2014-08-27 19:51 GMT+03:00 Denis-Alexander Engemann \<  
> denis.engemann at gmail.com\>:
> 
> Hi Maria,
> 
> > it seems you found a 'bug' in the documentation. If you hit  
> > 'mne.pick\_types? in and IPython terminal you can see that 'exclude'  
> > defaults to bads.  
> > I guess that would explain your problem?
> > 
> > -Denis
> > 
> > 2014-08-27 18:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > 
> > Or could it alternatively be possible to plot also the bad channels?
> > 
> > > I have:
> > > 
> > > picks = mne.pick\_types(evoked\_raw.info,selection=selection)
> > > 
> > > I think that this shouldn't exclude bads because I have not  
> > > exclude='bads'.
> > > 
> > > However, picks doesn't include the channels in selection that are marked  
> > > as bad.
> > > 
> > > In the reference of mne.picks\_type it is said:
> > > 
> > > exclude : list of string | str
> > > 
> > > List of channels to exclude. If empty do not exclude any (default). If  
> > > ?bads?, exclude channels in info[?bads?]
> > > 
> > > -Maria
> > > 
> > > 2014-08-27 19:02 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > 
> > > There was one channel two times in selection...
> > > 
> > > > However, it seems to cause a problem if some of the channels in  
> > > > selection is bad.  
> > > > I would like to plot a subset of channels from each data file in a loop  
> > > > as follows:
> > > > 
> > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > 
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
> > > > evoked\_raw.data[picks[idx]])  
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1
> > > > 
> > > > Is it somehow possible to, for example, plot a blank plot if there is a  
> > > > bad channel in selection?
> > > > 
> > > > -Maria
> > > > 
> > > > 2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
> > > > denis.engemann at gmail.com\>:
> > > > 
> > > > Hi,
> > > > 
> > > > > 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > 
> > > > > I manged to solve this already.
> > > > > 
> > > > > > 
> > > > > 
> > > > > now I'm curious, what was the problem?
> > > > > 
> > > > > -Denis
> > > > > 
> > > > > > -Maria
> > > > > > 
> > > > > > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > 
> > > > > > I have one bad channel but it is not included in selection. Can it
> > > > > > 
> > > > > > > however cause problems?
> > > > > > > 
> > > > > > > -Maria
> > > > > > > 
> > > > > > > Here are the outputs:  
> > > > > > > evoked.info['bads']  
> > > > > > > Out[54]: [u'MEG 2511']
> > > > > > > 
> > > > > > > but
> > > > > > > 
> > > > > > > In [53]: selection  
> > > > > > > Out[53]:  
> > > > > > > ['MEG 0133',  
> > > > > > > 'MEG 0212',  
> > > > > > > 'MEG 0223',  
> > > > > > > 'MEG 1313',  
> > > > > > > 'MEG 1322',  
> > > > > > > 'MEG 1443',  
> > > > > > > 'MEG 0132',  
> > > > > > > 'MEG 0213',  
> > > > > > > 'MEG 0222',  
> > > > > > > 'MEG 1312',  
> > > > > > > 'MEG 1323',  
> > > > > > > 'MEG 1442',  
> > > > > > > 'MEG 1513',  
> > > > > > > 'MEG 0242',  
> > > > > > > 'MEG 0233',  
> > > > > > > 'MEG 1343',  
> > > > > > > 'MEG 1332',  
> > > > > > > 'MEG 2613',  
> > > > > > > 'MEG 1512',  
> > > > > > > 'MEG 0243',  
> > > > > > > 'MEG 0232',  
> > > > > > > 'MEG 1343',  
> > > > > > > 'MEG 1333',  
> > > > > > > 'MEG 2612',  
> > > > > > > 'MEG 1523',  
> > > > > > > 'MEG 1612',  
> > > > > > > 'MEG 1623',  
> > > > > > > 'MEG 2413',  
> > > > > > > 'MEG 2422',  
> > > > > > > 'MEG 2643',  
> > > > > > > 'MEG 1522',  
> > > > > > > 'MEG 1613',  
> > > > > > > 'MEG 1622',  
> > > > > > > 'MEG 2412',  
> > > > > > > 'MEG 2423',  
> > > > > > > 'MEG 2642']
> > > > > > > 
> > > > > > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > > > > > denis.engemann at gmail.com\>:
> > > > > > > 
> > > > > > > Hi Maria,
> > > > > > > 
> > > > > > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > > > > > pick types automatically excludes those.
> > > > > > > > 
> > > > > > > > -Denis
> > > > > > > > 
> > > > > > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > > > 
> > > > > > > > > Hi all,
> > > > > > > > > 
> > > > > > > > > I have used mne.pick\_types as follows:
> > > > > > > > > 
> > > > > > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > > > > > 
> > > > > > > > > where selection includes 36 channel names.  
> > > > > > > > > However, picks is an array with only 35 elements.  
> > > > > > > > > I wonder what could be wrong there?
> > > > > > > > > 
> > > > > > > > > Regards,  
> > > > > > > > > Maria
> > > > > > > > > 
> > > > > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > > > > 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.
> > > > > > 
> > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > 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.
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > 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.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> 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/20140827/a222526b/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/a222526b/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 27, 2014, 5:29pm UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/11 "2014-08-27T17:29:28Z")

</div>

Unfortunately, that didn't solve the problem.

-Maria

2014-08-27 20:16 GMT+03:00 Denis-Alexander Engemann \<  
denis.engemann at gmail.com\>:

> Have you tried to to pass exclude= when invoking mne.pick\_types?
> 
> -Denis
> 
> 2014-08-27 19:09 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> Is it somehow possible to include the bads if they are in selection?
> 
> > -Maria
> > 
> > 2014-08-27 19:51 GMT+03:00 Denis-Alexander Engemann \<  
> > denis.engemann at gmail.com\>:
> > 
> > Hi Maria,
> > 
> > > it seems you found a 'bug' in the documentation. If you hit  
> > > 'mne.pick\_types? in and IPython terminal you can see that 'exclude'  
> > > defaults to bads.  
> > > I guess that would explain your problem?
> > > 
> > > -Denis
> > > 
> > > 2014-08-27 18:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > 
> > > Or could it alternatively be possible to plot also the bad channels?
> > > 
> > > > I have:
> > > > 
> > > > picks = mne.pick\_types(evoked\_raw.info,selection=selection)
> > > > 
> > > > I think that this shouldn't exclude bads because I have not  
> > > > exclude='bads'.
> > > > 
> > > > However, picks doesn't include the channels in selection that are  
> > > > marked as bad.
> > > > 
> > > > In the reference of mne.picks\_type it is said:
> > > > 
> > > > exclude : list of string | str
> > > > 
> > > > List of channels to exclude. If empty do not exclude any (default). If  
> > > > ?bads?, exclude channels in info[?bads?]
> > > > 
> > > > -Maria
> > > > 
> > > > 2014-08-27 19:02 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > 
> > > > There was one channel two times in selection...
> > > > 
> > > > > However, it seems to cause a problem if some of the channels in  
> > > > > selection is bad.  
> > > > > I would like to plot a subset of channels from each data file in a  
> > > > > loop as follows:
> > > > > 
> > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > 
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = 0  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax\_row in axes:  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ax in ax\_row:  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ax.plot(evoked\_raw.times,  
> > > > > evoked\_raw.data[picks[idx]])  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx += 1
> > > > > 
> > > > > Is it somehow possible to, for example, plot a blank plot if there is  
> > > > > a bad channel in selection?
> > > > > 
> > > > > -Maria
> > > > > 
> > > > > 2014-08-27 15:05 GMT+03:00 Denis-Alexander Engemann \<  
> > > > > denis.engemann at gmail.com\>:
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > > 2014-08-27 14:02 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > 
> > > > > > I manged to solve this already.
> > > > > > 
> > > > > > > 
> > > > > > 
> > > > > > now I'm curious, what was the problem?
> > > > > > 
> > > > > > -Denis
> > > > > > 
> > > > > > > -Maria
> > > > > > > 
> > > > > > > 2014-08-27 13:11 GMT+03:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> > > > > > > 
> > > > > > > I have one bad channel but it is not included in selection. Can it
> > > > > > > 
> > > > > > > > however cause problems?
> > > > > > > > 
> > > > > > > > -Maria
> > > > > > > > 
> > > > > > > > Here are the outputs:  
> > > > > > > > evoked.info['bads']  
> > > > > > > > Out[54]: [u'MEG 2511']
> > > > > > > > 
> > > > > > > > but
> > > > > > > > 
> > > > > > > > In [53]: selection  
> > > > > > > > Out[53]:  
> > > > > > > > ['MEG 0133',  
> > > > > > > > 'MEG 0212',  
> > > > > > > > 'MEG 0223',  
> > > > > > > > 'MEG 1313',  
> > > > > > > > 'MEG 1322',  
> > > > > > > > 'MEG 1443',  
> > > > > > > > 'MEG 0132',  
> > > > > > > > 'MEG 0213',  
> > > > > > > > 'MEG 0222',  
> > > > > > > > 'MEG 1312',  
> > > > > > > > 'MEG 1323',  
> > > > > > > > 'MEG 1442',  
> > > > > > > > 'MEG 1513',  
> > > > > > > > 'MEG 0242',  
> > > > > > > > 'MEG 0233',  
> > > > > > > > 'MEG 1343',  
> > > > > > > > 'MEG 1332',  
> > > > > > > > 'MEG 2613',  
> > > > > > > > 'MEG 1512',  
> > > > > > > > 'MEG 0243',  
> > > > > > > > 'MEG 0232',  
> > > > > > > > 'MEG 1343',  
> > > > > > > > 'MEG 1333',  
> > > > > > > > 'MEG 2612',  
> > > > > > > > 'MEG 1523',  
> > > > > > > > 'MEG 1612',  
> > > > > > > > 'MEG 1623',  
> > > > > > > > 'MEG 2413',  
> > > > > > > > 'MEG 2422',  
> > > > > > > > 'MEG 2643',  
> > > > > > > > 'MEG 1522',  
> > > > > > > > 'MEG 1613',  
> > > > > > > > 'MEG 1622',  
> > > > > > > > 'MEG 2412',  
> > > > > > > > 'MEG 2423',  
> > > > > > > > 'MEG 2642']
> > > > > > > > 
> > > > > > > > 2014-08-27 12:56 GMT+03:00 Denis-Alexander Engemann \<  
> > > > > > > > denis.engemann at gmail.com\>:
> > > > > > > > 
> > > > > > > > Hi Maria,
> > > > > > > > 
> > > > > > > > > Do you have one bad channel? Take a look at evoked.info['bads']  
> > > > > > > > > pick types automatically excludes those.
> > > > > > > > > 
> > > > > > > > > -Denis
> > > > > > > > > 
> > > > > > > > > 2014-08-27 11:53 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>  
> > > > > > > > > :
> > > > > > > > > 
> > > > > > > > > > Hi all,
> > > > > > > > > > 
> > > > > > > > > > I have used mne.pick\_types as follows:
> > > > > > > > > > 
> > > > > > > > > > picks = mne.pick\_types(evoked.info,selection=selection)
> > > > > > > > > > 
> > > > > > > > > > where selection includes 36 channel names.  
> > > > > > > > > > However, picks is an array with only 35 elements.  
> > > > > > > > > > I wonder what could be wrong there?
> > > > > > > > > > 
> > > > > > > > > > Regards,  
> > > > > > > > > > Maria
> > > > > > > > > > 
> > > > > > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > > > > > 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.
> > > > > > > 
> > > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > > 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.
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > 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.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > 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/20140827/a2a432de/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140827/a2a432de/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 30, 2014, 9:02am UTC](https://mne.discourse.group/t/problem-with-mne-pick-types/809/12 "2014-08-30T09:02:59Z")

</div>

Hi all,

I took a look at Maria's script. It turns out that the bad channels were  
not picked in Raw, which is why they couldn't be picked downstream in the  
Epochs and Evoked objects. Picking 'bads' in Raw solved the problem.

Mainak
