# High-frequency noise in source waveform after filtering

**URL:** <https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784>\
**Category:** Support & Discussions\
**Tags:** ﻿source-localization, meg, eeg\
**Created:** [February 11, 2025, 11:31am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784 "2025-02-11T11:31:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![laura](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/laura/32/79_2.png) [@laura](https://mne.discourse.group/u/laura)\
**Post date:** [February 11, 2025, 11:31am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/1 "2025-02-11T11:31:32Z")

</div>

Hi,

I am doing source analysis with MEG/EEG data and came across some weird behavior where I couldn’t find the problem yet:

When extracting the time courses from a label (doesn’t matter which one), the time courses of 4 out of 19 participants show some high frequency noise, despite a .05-20 Hz bandpass filter. The attached screenshot shows one affected (left) and one normal participant.

 ![Bildschirmfoto vom 2025-02-10 14-16-41](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/3/31f127c661bc229e589afd278eed828a25f591a6.png)

I use the same script for each participant and the raw and epochs.info show the desired 20Hz lowpass filter. When I plot the evokeds, it still looks clean, but the time course extracted from the stc is noisy.  
I tried combining files (raw, epochs, fwd, cov…) from a noisy and a normal subject to narrow down the origin and it seems to be the epochs.  
However, with epochs.plot() they look similar, so the noise is not obvious here. And the infos look similar regarding the settings.

Any idea, where this is coming from or how I could solve this?  
I can obviously filter the extracted waveform, but I would like to understand what’s causing this.

I’m using MNE 1.8 on Ubuntu 24.04

Best,  
Laura

P.S: I am happy to share data or code, but I wasn’t sure which part of the code would be helpful, as the same code produces different results depending on subject and the full code is quite long.

Here are the two exampe epochs.info:

> **epochsNoise.info**  
> Out[164]:  
> \< Info | 21 non-empty values  
> acq\_pars: ACQch001 111001 ACQch002 111002 ACQch003 111003 ACQch004 111004 …  
> bads:   
> ch\_names: MEG 001, MEG 002, MEG 003, MEG 004, MEG 005, MEG 006, MEG 010, …  
> chs: 118 Gradiometers, 7 Stimulus, 64 EEG, 1 ECG  
> custom\_ref\_applied: False  
> description: These data were measured with Neuromag-122  
> dev\_head\_t: MEG device → head transform  
> dig: 150 items (3 Cardinal, 4 HPI, 64 EEG, 79 Extra)  
> events: 1 item (list)  
> experimenter: eeg  
> file\_id: 4 items (dict)  
> highpass: 0.1 Hz  
> hpi\_meas: 1 item (list)  
> hpi\_results: 1 item (list)  
> lowpass: 20.0 Hz  
> meas\_date: 2022-02-21 08:02:24 UTC  
> meas\_id: 4 items (dict)  
> nchan: 190  
> proj\_id: 1 item (ndarray)  
> proj\_name: aep  
> projs: planar-Raw-0.000-1370.655-PCA-01: on, planar- …  
> sfreq: 1000.0 Hz  
> subject\_info: 3 items (dict)
> 
> > 
> 
> **epochsSmooth.info**  
> Out[165]:  
> \<Info | 21 non-empty values  
> acq\_pars: ACQch001 111001 ACQch002 111002 ACQch003 111003 ACQch004 111004 …  
> bads:   
> ch\_names: MEG 001, MEG 002, MEG 003, MEG 004, MEG 005, MEG 006, MEG 010, …  
> chs: 118 Gradiometers, 7 Stimulus, 64 EEG, 1 ECG  
> custom\_ref\_applied: False  
> description: These data were measured with Neuromag-122  
> dev\_head\_t: MEG device → head transform  
> dig: 150 items (3 Cardinal, 4 HPI, 64 EEG, 79 Extra)  
> events: 1 item (list)  
> experimenter: eeg  
> file\_id: 4 items (dict)  
> highpass: 0.1 Hz  
> hpi\_meas: 1 item (list)  
> hpi\_results: 1 item (list)  
> lowpass: 20.0 Hz  
> meas\_date: 2023-08-02 04:22:52 UTC  
> meas\_id: 4 items (dict)  
> nchan: 190  
> proj\_id: 1 item (ndarray)  
> proj\_name: aep  
> projs: planar-Raw-0.000-1363.050-PCA-01: on, planar- …  
> sfreq: 1000.0 Hz  
> subject\_info: 3 items (dict)
> 
> >

---

<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:** [February 11, 2025, 11:42am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/2 "2025-02-11T11:42:26Z")

</div>

Hi,

It’s difficult to really say by looking at these plots but I am not so sure the “high frequency noise” falls outside the beta band.

Maybe you’ve tried this already, but personally I would plot a PSD before and after filtering, and also I would try lowering the low-pass cutoff to see if/when the noise disappears.

Cheers,

---

<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:** [February 11, 2025, 12:12pm UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/3 "2025-02-11T12:12:29Z")

</div>

Not sure if this is related, but are amplitudes in the range of 10-12 expected? What is the unit? µV?

---

<div class="post-metadata">

**Author:** ![britta-wstnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/britta-wstnr/32/3538_2.png) [@britta-wstnr](https://mne.discourse.group/u/britta-wstnr)\
**Post date:** [February 11, 2025, 12:23pm UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/4 "2025-02-11T12:23:52Z")

</div>

> [@laura](#):
>
> When I plot the evokeds, it still looks clean, but the time course extracted from the stc is noisy.

Chiming in here - Which source recon method do you use? Can you show us the sensor and source time courses of a dataset with this problem?  
Edit to add: and is this true for all of the source time courses or only in specific regions/labels?

---

<div class="post-metadata">

**Author:** ![laura](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/laura/32/79_2.png) [@laura](https://mne.discourse.group/u/laura)\
**Post date:** [February 11, 2025, 1:46pm UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/5 "2025-02-11T13:46:44Z")

</div>

Thank you for your replies!

Following @sotpapad suggestions, I checked the PSDs again and the confirmed that the filter worked as suggested. They also looked highly similar for noise and normal subjects.  
I tried the filtering with a 15Hz cut-off which resolved the issue. So I wanted to find the “threshold”-frequency, where this works.  
It turns out that just re-filtering with 0.05-20Hz now also solved the issue (I could have sworn that I tried that before).  
But: the PSD for the original epochs (filtered once) and the double-filtered once look virtually identical. The screenshot shows this for one condition.

 ![Bildschirmfoto vom 2025-02-11 14-16-24](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/8/87aee6208a2bf728daac8e5cd650c5aa5e66fcff.jpeg)

So I guess, we can say that my problem is solved and no one has to invest a lot of time.  
But since I still don’t understand it, ideas are still welcome 😃

@cbrnr This should be in Am and is the range that we usually find in our experiments, so nothing uncommon as far as I can judge.

@britta-wstnr I am using MNE with a mean\_flip to extract the time course. This happened for different ROIs. I attached screenshots with the evoked.plot and randomly spaced traces in the stc.plot()  
There you can see that some regions are more affected by the high-frequency noise than others, but it’s generallys there for all traces.

 ![Bildschirmfoto vom 2025-02-11 14-36-05](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/5/5f58fe017e3d93743737a66e95e83d8ae1ccc967.png)  
 ![Bildschirmfoto vom 2025-02-11 14-44-06](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/a/afa0d7376ed9e56497b3fd91532d2386abed8f5f.png)

Thanks again to everyone!  
I’ll stick to double-filtering for now, but I am curious if anyone has another idea.

Best,  
Laura

---

<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:** [February 11, 2025, 2:11pm UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/6 "2025-02-11T14:11:00Z")

</div>

Good that you solved it, a bit weird though.

I have seen similar “problems” using notebooks when some variables are kept in memory and do not behave as expected after changing some parameters.

---

<div class="post-metadata">

**Author:** ![britta-wstnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/britta-wstnr/32/3538_2.png) [@britta-wstnr](https://mne.discourse.group/u/britta-wstnr)\
**Post date:** [February 11, 2025, 2:15pm UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/7 "2025-02-11T14:15:17Z")

</div>

🕵️‍♂️ I’m intrigued.  
I see that you use EEG and MEG, presumably combining them. I wonder if you get some unexpected effects from that … Any chance that you have looked at the EEG-only and MEG-only source recons for the affected data sets?

---

<div class="post-metadata">

**Author:** ![laura](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/laura/32/79_2.png) [@laura](https://mne.discourse.group/u/laura)\
**Post date:** [February 12, 2025, 8:39am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/8 "2025-02-12T08:39:23Z")

</div>

That’s a good idea, I’m using a notebook… more powerful than the previous desktop machine, but this experiment also has a lot of conditions, so memory demands are certainly high.

But the incorrectly applied filter should still show in the psd and epochs plot, right? 🤔

---

<div class="post-metadata">

**Author:** ![laura](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/laura/32/79_2.png) [@laura](https://mne.discourse.group/u/laura)\
**Post date:** [February 12, 2025, 8:40am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/9 "2025-02-12T08:40:53Z")

</div>

> 🕵️‍♂️ I’m intrigued.

Love that 😃  
I haven’t looked at MEG and EEG separately yet, but I will do and let you know.

---

<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:** [February 12, 2025, 9:55am UTC](https://mne.discourse.group/t/high-frequency-noise-in-source-waveform-after-filtering/10784/10 "2025-02-12T09:55:31Z")

</div>

It should. In order to be sure I would create a simplified notebook and run each cell only once for a “clean” subject. Then, restart the notebook and re-run everything for a “noisy” subject. If the problem is fixed chances are something did not execute as expected before. If it persists something weird is happening and will require more debugging.
