# Automatic spotting of flux jumps on MEG data

**URL:** <https://mne.discourse.group/t/automatic-spotting-of-flux-jumps-on-meg-data/2077>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [February 11, 2020, 12:45pm UTC](https://mne.discourse.group/t/automatic-spotting-of-flux-jumps-on-meg-data/2077 "2020-02-11T12:45:22Z")\
**Posts on this page:** 3\
**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:** [February 11, 2020, 12:45pm UTC](https://mne.discourse.group/t/automatic-spotting-of-flux-jumps-on-meg-data/2077/1 "2020-02-11T12:45:22Z")

</div>

External Email - Use Caution

Dear MNE community,

I am currently working on preprocessing an MEG dataset, and I want to indicate  
the channels where flux jumps occur as 'bad', so that they do not spread to other  
channels when performing maxwell filtering.

So far, I have not been able to find any pre-existing code that performs this task,  
so I've started working from scratch on a method.

Are there established techniques to automatically detect flux jumps?

Best regards,  
Merlin  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200211/3cba4405/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200211/3cba4405/attachment.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:** [February 11, 2020, 2:02pm UTC](https://mne.discourse.group/t/automatic-spotting-of-flux-jumps-on-meg-data/2077/2 "2020-02-11T14:02:23Z")

</div>

External Email - Use Caution

Hi Merlin,

Have a look at the following example:  
[https://mne.tools/stable/auto\_examples/preprocessing/plot\_otp.html#sphx-glr-auto-examples-preprocessing-plot-otp-py](https://mne.tools/stable/auto_examples/preprocessing/plot_otp.html#sphx-glr-auto-examples-preprocessing-plot-otp-py)

Best,  
Dip

---

<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:** [February 11, 2020, 2:10pm UTC](https://mne.discourse.group/t/automatic-spotting-of-flux-jumps-on-meg-data/2077/3 "2020-02-11T14:10:55Z")

</div>

External Email - Use Caution

You can also try autoreject:

[https://autoreject.github.io/auto\_examples/index.html](https://autoreject.github.io/auto_examples/index.html)

Or automatic bad channel detection in MaxFilter, or in a similar  
implementation in this PR:

[https://github.com/mne-tools/mne-python/pull/6940](https://github.com/mne-tools/mne-python/pull/6940)

Eric
