Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Pupil Deconvolution (port from pyeparse) #12505

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

scott-huberty
Copy link
Contributor

Reference issue

This PR implements the last feature proposed for my GSoC in #11879 that I didn't get to over the summer.

What does this implement/fix?

This basically ports the pupil deconvolution code from (the unmaintained?) https://github.com/pyeparse/pyeparse , and which was used for @larsoner and @drammock 's pupil deconvolution paper in 2016.

Additional information

I made some minor changes to the code and docstring to work with MNE's API and follow MNE conventions (and make the code more modern i.e. use format specifiers instead of percent specifiers).

To check that the ported code in this branch behaves similarly to the code in pyeparse, I re-ran the scripts to deconvolve the data and generate figure 3 in Dan and Eric's paper (The original scripts used the deconvolution method from pyeparse, and I updated the scripts to use the MNE API in this branch:

Library Figure 3
Pyeparse Pyeparse
MNE MNE

Possible Alternatives

I have not opened an issue for deconvolution specifically, so if there are concerns about merging this into MNE or other ideas, don't hesitate to share.

This basically ports the code from pyeparse, with slight updates to work with mne and match mne and modern python conventions.
@scott-huberty scott-huberty changed the title Feature: Pupil Deconvolution (port from prepares) Feature: Pupil Deconvolution (port from pyeparse) Mar 19, 2024
Copy link
Member

@mscheltienne mscheltienne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nitpick, questions, but it looks great, don't forget to add a changelog entry!
Thanks @scott-huberty

doc/references.bib Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/tests/test_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
mne/preprocessing/eyetracking/_pupillometry.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants