[Mne_analysis] Problem with mne.pick_types

Maria Hakonen maria.hakonen at gmail.com
Wed Aug 27 12:02:12 EDT 2014
Search archives:

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)

                idx = 0
                for ax_row in axes:
                        for ax in ax_row:
                                ax.plot(evoked_raw.times,
evoked_raw.data[picks[idx]])
                                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
>>>>> 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.
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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.
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> 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.
>>
>>
>
> _______________________________________________
> 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/20140827/29d384da/attachment.html 


More information about the Mne_analysis mailing list