# Set several channels as bad channel manually

**URL:** <https://mne.discourse.group/t/set-several-channels-as-bad-channel-manually/1375>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [November 27, 2017, 12:15pm UTC](https://mne.discourse.group/t/set-several-channels-as-bad-channel-manually/1375 "2017-11-27T12:15:37Z")\
**Posts on this page:** 2\
**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:** [November 27, 2017, 12:15pm UTC](https://mne.discourse.group/t/set-several-channels-as-bad-channel-manually/1375/1 "2017-11-27T12:15:37Z")

</div>

Hi,  
I'm new to mne. I run the following code line:

data\_before\_interp = loadmat('data\_before\_spherical\_interpolation.mat')['data']

# Create montage\_pure out of Pure data on Emotive  
loc\_pure = loadmat('loc\_pure.mat')['loc\_pure'] # the units here are [decimeter]  
ch\_pure = ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8',  
'T8', 'FC6', 'F4', 'F8', 'AF4']  
montage\_pure = mne.channels.read\_montage(kind="emotive\_loc\_pure",  
ch\_names=ch\_pure, path='C:\\Users\\igal\Desktop')  
loc\_pure = montage\_pure.pos # the units here are [meter].  
read\_montage converts all units into meter  
ch\_pure = montage\_pure.ch\_names

# Sampling rate of the Emotive set  
sfreq = 126.897 # Hz

# Create the info structure needed by MNE (choose one of the three  
options: montage\_pure or montage\_pure\_fixed or montage\_1020). Note:  
each has its own ch\_names  
info = mne.create\_info(ch\_names=ch\_pure, sfreq=sfreq, ch\_types="eeg")

# Finally, create the Raw object  
raw = mne.io.RawArray(data\_before\_interp, info)  
raw.set\_montage(montage=montage\_pure)

Now, I would like to \*manually\* define the bad channels and then run the  
raw.interpolate\_bads.  
Is it possible to define the bad channel manually?

Thanks in advance,

\<[https://www.linkedin.com/in/igal-nazar/](https://www.linkedin.com/in/igal-nazar/)\>\*Igal Nazar\*  
R&D Engineer

igal at [brainster-tech.com](http://brainster-tech.com)  
+ 972 52 6701713  
\<[https://www.brainster-tech.com/](https://www.brainster-tech.com/)\>  
\<[https://www.brainster-tech.com/](https://www.brainster-tech.com/)\> \<[https://blog.brainster-tech.com/](https://blog.brainster-tech.com/)\>  
\<[https://www.linkedin.com/company/brainster](https://www.linkedin.com/company/brainster)\>  
\<[https://www.youtube.com/channel/UCZWPcShTiLkNqxIJPdrh7Kg](https://www.youtube.com/channel/UCZWPcShTiLkNqxIJPdrh7Kg)\>  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20171127/8f6a1491/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171127/8f6a1491/attachment-0001.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:** [November 27, 2017, 12:26pm UTC](https://mne.discourse.group/t/set-several-channels-as-bad-channel-manually/1375/2 "2017-11-27T12:26:55Z")

</div>

Hi,

just list the names of the bad channels in info['bads']. For example:

info['bads'] = ['EEG1', 'EEG5']

best,  
Marijn.
