mne-tools / mne-tools/mne-python

MNE 1.12.1, pupil data no longer being baseline-corrected

Open
#13,898 4 comments 0 reactions 1 assignee View on GitHub

@scott-huberty is already working on this.

Since Jul 1, 2026.

BUG
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Description of the problem

In MNE 1.11, when epoching raw eyelink data, both ypos_right and pupil_right channels are baseline-corrected with the specified baseline interval.
In 1.12.1, ypos_right is still interpolated but pupil_right channel is not correction - neither eyetracking channels were baseline-corrected, I made this mistake because mne.preprocessing.eyetracking.convert_units re-centres gaze data but not pupil

Probably has to do with eyelink channels not recognised as data channels? I couldn't locate the problem from source codes so can only guess

Steps to reproduce
baseline_period = (-0.2,0)
trial_duration=(-0.2, 0.8)


events, event_idx = mne.events_from_annotations(raw=el_data, event_id=event_id)
epochs = mne.Epochs(raw=el_data, events=events, event_id=event_idx, tmin=trial_duration[0], tmax=trial_duration[1], 
                        baseline=baseline_period, reject_by_annotation=auto_reject_trial, preload=True, on_missing='warn')
Link to data

No response

Expected results

This one was taken from a different analysis of the same set of data, using MNE 1.11

Image
Actual results

Here's result from 1.12

Image
Additional information

Platform Windows-11-10.0.26200-SP0
Python 3.14.4 | packaged by conda-forge | (main, Apr 8 2026, 02:08:03) [MSC v.1944 64 bit (AMD64)]
Executable C:\Users\tc3n24\AppData\Local\anaconda3\envs\mne\python.exe
CPU Intel(R) Core(TM) Ultra 5 135U (14 cores)
Memory 15.5 GiB
Core

  • mne 1.12.1 (latest release)
  • numpy 2.4.3 (MKL 2026.0-Product with 12 threads)
  • scipy 1.17.1
  • matplotlib 3.10.9 (backend=module://matplotlib_inline.backend_inline)

Numerical (optional)

  • sklearn 1.8.0
  • pandas 3.0.2
  • unavailable numba, nibabel, nilearn, dipy, openmeeg, cupy, h5io, h5py

Visualization (optional)

  • qtpy 2.4.3 (PyQt6=6.11.0)
  • pyqtgraph 0.14.0
  • mne-qt-browser 0.7.4
  • ipywidgets 8.1.8
  • unavailable pyvista, pyvistaqt, vtk, ipympl, trame_client, trame_server, trame_vtk, trame_vuetify

Ecosystem (optional)

  • mne-icalabel 0.8.1
  • defusedxml 0.7.1
  • unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-bids-pipeline, neo, eeglabio, edfio, curryreader, mffpy, pybv, pymef, antio

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.