Skip to content

Conversation

@flying-spagetti
Copy link

Reference issue:
Addresses #13538

What does this implement/fix?
As discussed in issue #13538, the calibration plot previously defaulted to tight axis limits around the available data points. This could make it difficult to interpret the calibration quality relative to the actual screen dimensions.

This PR updates the Calibration.plot method in mne/preprocessing/eyetracking/calibration.py. It adds a check for the screen_resolution metadata. If available, it uses these dimensions to set the xlim and ylim of the plot, placing the calibration points in their correct spatial context relative to the full screen.

Additional information
I reproduced this locally using the standard eyelink dataset. I manually injected a (1920, 1080) resolution into the object to verify the fix works as intended.

@scott-huberty
Copy link
Contributor

Thanks @flying-spagetti ! Checkout our contributing guide, You will need to add a change log entry, and looks like you also need to create an account on CircleCI. If you sign in to CircleCi with your GitHub account, then the CI's in this PR will be able to easily verify that there is a CircleCI account associated with your GitHub account, and the checks should run.

@@ -0,0 +1 @@
Fix axis limits in :func:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`. No newline at end of file
Copy link
Contributor

@scott-huberty scott-huberty Dec 23, 2025

Choose a reason for hiding this comment

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

Suggested change
Fix axis limits in :func:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`.
Fix axis limits in :meth:`mne.preprocessing.eyetracking.calibration.Calibration.plot` to use screen resolution if available, by :newcontrib:`Gnaneswar Lopinti`.

(technically it is a method of the class Calibration).

Upon your next commit, the CircleCI Jobs should run! As long as the Pre-commit bot doesn't intercept you with fixes like it did to your last commit.

@flying-spagetti
Copy link
Author

Thanks @scott-huberty for pointing the reference mistake!!
Applied the fix and i hope the CI checks should be good to go now.

@scott-huberty
Copy link
Contributor

Awesome! Look like the failures we are getting now are real! The good news is that the failures appear to be unrelated to this PR.

We might need you to hang tight for a bit until we fix them.

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