# Extracting data from clusters with bad electrodes

**URL:** <https://mne.discourse.group/t/extracting-data-from-clusters-with-bad-electrodes/11845>\
**Category:** Support & Discussions\
**Tags:** evoked\
**Created:** [June 1, 2026, 12:20pm UTC](https://mne.discourse.group/t/extracting-data-from-clusters-with-bad-electrodes/11845 "2026-06-01T12:20:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anguyen](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/anguyen/32/3472_2.png) [@anguyen](https://mne.discourse.group/u/anguyen)\
**Post date:** [June 1, 2026, 12:20pm UTC](https://mne.discourse.group/t/extracting-data-from-clusters-with-bad-electrodes/11845/1 "2026-06-01T12:20:01Z")

</div>

- MNE version: 1.7.0
- operating system: Windows 10

Hi everyone,

While extracting ERP mean amplitudes, I used to pass explicit channel lists to  
`evoked.pick()`, then computed `evoked.data.mean(axis=1)`.

Some participants had channels in that list marked as bad. `pick()` included them,  
and their artefacted values appeared in `.data` instead of being ignored (as I expected).

I’ve now returned to using evoked.copy().pick(“eeg”, exclude=“bads”) which solves this issue, and I know I may want to interpolate at an earlier point, but in case others like me end up with a specific pick and expected the bads to be ignored, would a warning be relevant? (In either pick and/or data()?)

Example:

```python
cluster = ["F1", "Fz", "F2", "FC1", "FCz", "FC2"] # FC2 marked as bad
evoked_cropped = evoked.copy().pick(cluster).crop(tmin=0.3, tmax=0.4)
mean_amp = evoked_cropped.data.mean(axis=1) * 1e6
# FC2 row included with artefacted value — no warning raised

```

I’m not sure whether this was addressed before though have seen this post

> [@Change in data shape after the picking](https://mne.discourse.group/t/change-in-data-shape-after-the-picking/8702/8):
>
> I believe there was a recent change to picking behavior in that we now include bad channels by default or so…? Could you maybe try with pick(..., exclude="bads")? Or maybe this happens during pick\_types(). I would try with different combinations of exclude="bads" and exclude=() passed to pick\_types() and pick(). I might be entirely mistaken, though.

Thanks

Arthur

---

<div class="post-metadata">

**Author:** ![CarinaFo](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/carinafo/32/746_2.png) [@CarinaFo](https://mne.discourse.group/u/CarinaFo)\
**Post date:** [June 3, 2026, 1:20am UTC](https://mne.discourse.group/t/extracting-data-from-clusters-with-bad-electrodes/11845/2 "2026-06-03T01:20:16Z")

</div>

Hi Arthur,

thanks for bringing this up.  
I agree that a warning would be useful, but let me discuss this with the other maintainers.

JFYI: There has been some [discussion](https://github.com/mne-tools/mne-python/issues/12577) on .picks() and the default behaviour.

I will get back to you after discussing this and let you know if it makes sense to open an issue or a pull request (if you would like to implement that).

Cheers,

Carina

Update:  
I opened a new [issue](https://github.com/mne-tools/mne-python/issues/13946) related to your post. Let us know if you want to work on that proposed refactoring.

We also noticed that you are using an old MNE version (1.7.0). You might want to consider updating to a more recent version (1.12) to get the latest features.

---

<div class="post-metadata">

**Author:** ![anguyen](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/anguyen/32/3472_2.png) [@anguyen](https://mne.discourse.group/u/anguyen)\
**Post date:** [August 18, 2026, 3:27pm UTC](https://mne.discourse.group/t/extracting-data-from-clusters-with-bad-electrodes/11845/3 "2026-08-18T15:27:36Z")

</div>

Hi Carina,

Many thanks! (sorry I seem to have missed the notification!)  
and yes indeed on the version!..

Cheers

Arthur
