# Raw Object's low/highpass only updates when picks=None

**URL:** <https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082>\
**Category:** Support & Discussions\
**Tags:** eeg, frequency-filter\
**Created:** [April 8, 2025, 11:36am UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082 "2025-04-08T11:36:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonNir1](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jonnir1/32/4209_2.png) [@JonNir1](https://mne.discourse.group/u/JonNir1)\
**Post date:** [April 8, 2025, 11:36am UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/1 "2025-04-08T11:36:02Z")

</div>

The documentation for `raw.filter()` specifies that the `raw.info["highpass"]` and `raw.info["lowpass"]` fields only update when calling filter with `picks=None`. Indeed, attempting to set these values manually (e.g. `raw.info["lowpass"] = 7`) raises an error: `RuntimeError: highpass cannot be set directly. Please use method inst.filter() instead.`

I would like to challenge this behavior.

I’m interested in filtering both `eeg` and `eog` channels. The former are `data channels` whereas the latter are not (why?). If I used `picks=None` I would only filter `eeg` channels, so I **have to use** `picks=['eeg', 'eog']` when calling `filter()`. However, I also want the `Info` object to store the high/lowpass filters I’m using (for example, when I later call `ica.fit(raw)`, it prints a warning because it thinks my `raw` object isn’t filtered).

I’m fairly new to MNE, so not sure if you prefer this type of discussions here or as a new “issue” on your github. If so, I can just post it there instead. But I am interested in hearing your opinion 🙂

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [April 8, 2025, 12:11pm UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/2 "2025-04-08T12:11:54Z")

</div>

MNE is a package for neurophysiological data analysis, so this might explain why it treats only neurophysiological signals as [data channels](https://mne.tools/stable/documentation/glossary.html#term-data-channels). While filtering both EEG and EOG channels is a perfectly valid use case, MNE stores only a single `raw.info["highpass"]` and `raw.info["lowpass"]` value for _all_ channels. Therefore, the assumption seems to be that all data channels share the same filter settings.

I’m curious what others think about this.

And yes, I think posting questions like this in the forum is the preferred approach.

---

<div class="post-metadata">

**Author:** ![JonNir1](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jonnir1/32/4209_2.png) [@JonNir1](https://mne.discourse.group/u/JonNir1)\
**Post date:** [April 8, 2025, 2:04pm UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/3 "2025-04-08T14:04:06Z")

</div>

the current behavior will not set a value for `raw.info["lowpass"]` even when you specify `picks="all"`, according to the documentation. Only if `picks=None` will this value be set, which now makes me wonder if the equivalent `picks="data"` also sets this value (I can’t check now, but will update).

I believe a preferred solution would be to add a keyword argument that controls whether this field is set or not. But lets wait for others to weigh in.

---

<div class="post-metadata">

**Author:** ![sotpapad](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sotpapad/32/2184_2.png) [@sotpapad](https://mne.discourse.group/u/sotpapad)\
**Post date:** [April 8, 2025, 6:27pm UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/4 "2025-04-08T18:27:27Z")

</div>

`picks="data"` includes `bad channels` unlike `picks="all"` or `picks=None`, therefore the behavior shouldn’t be the same.

If `picks=None` is equivalent to `picks="all"` (as stated in the documentation) then either the part of the documentation you are referring to is incomplete on this point and needs to be changed, or there is a bug in the evaluation logic of `picks`.

I think the question pertaining to your use case is whether when you have a “superset” of data and non-data channels the measurement info is/should be updated or not. From the warning you are mentioning I take it that it doesn’t, right? Looking at [how picks are selected](https://github.com/mne-tools/mne-python/blob/maint/1.9/mne/filter.py#L2908) I would expected it work (`picks=["eeg", "eog"]` are a superset of `picks=None`). However, it seems you are falling into the case of not updating a subset of channels, not sure why… Possibly something to do with some excluded channels? 🤔

---

<div class="post-metadata">

**Author:** ![JonNir1](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jonnir1/32/4209_2.png) [@JonNir1](https://mne.discourse.group/u/JonNir1)\
**Post date:** [April 10, 2025, 10:38am UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/5 "2025-04-10T10:38:34Z")

</div>

I have other non-data (`stim`/`misc`) channels, but none of the `eeg` and `eog` are excluded at that point of the pipeline. I do have “bad data” annotations, but this shouldn’t have an effect, should it?

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [April 10, 2025, 1:50pm UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/6 "2025-04-10T13:50:08Z")

</div>

Is there a specific reason why you want to process different channel types simultaneously? Otherwise, I suggest that you create separate objects for EEG and EOG channels and process them separately. Alternatively, it sounds as if you want to treat EOG channels as “EEG-like” (e.g., for ICA), so you could set their type to EEG.

---

<div class="post-metadata">

**Author:** ![JonNir1](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jonnir1/32/4209_2.png) [@JonNir1](https://mne.discourse.group/u/JonNir1)\
**Post date:** [April 16, 2025, 9:00am UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/7 "2025-04-16T09:00:11Z")

</div>

Setting EOG channels to have EEG type is a workaround, but it “feels” wrong…  
And why wouldn’t I process different channel types simultaneously? specifically filtering - I would expect that one applies the same high-pass/notch filter to all “electrical” channels (EOG, EEG, etc.), no?  
In any case, this has become a thread on _user story_ for a specific _edge case_ and so I leave it to MNE’s product/engineering to discuss… My specific case has multiple workarounds as @cbrnr mentioned.  
Thanks!

---

<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:** [April 23, 2025, 9:01am UTC](https://mne.discourse.group/t/raw-objects-low-highpass-only-updates-when-picks-none/11082/8 "2025-04-23T09:01:02Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
