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

ENH: Fine calibration support for more MEG systems #12966

Merged
merged 7 commits into from
Nov 16, 2024
Merged

Conversation

larsoner
Copy link
Member

I recently tried running fine calibration calculation on a non-Neuromag system. It did not work. This PR makes it so it works much better for other systems.

@larsoner larsoner added this to the 1.9 milestone Nov 14, 2024
@larsoner
Copy link
Member Author

@drammock is this PR okay with you? It now contains a workaround for scikit-learn/scikit-learn#30268 (comment) that is causing pip-pre to fail

@@ -43,6 +44,9 @@ def compute_fine_calibration(
origin=(0.0, 0.0, 0.0),
cross_talk=None,
calibration=None,
*,
angle_limit=5.0,
err_limit=5.0,
Copy link
Member

Choose a reason for hiding this comment

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

AFAICT err_limit isn't validated anywhere, there should at least be some check that it is non-negative right?

if system == "kit":
raw = read_raw_kit(sqd_path, mrk_path, elp_path, hsp_path)
angle_limit = 170
err_limit = 500
Copy link
Member

Choose a reason for hiding this comment

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

err_limit is 500% for kit, and 6000% for CTF?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think because these are actually not great segments to be processing!

@larsoner larsoner enabled auto-merge (squash) November 16, 2024 00:52
@larsoner larsoner merged commit f45b51b into mne-tools:main Nov 16, 2024
28 checks passed
@larsoner larsoner deleted the fc branch November 16, 2024 02:13
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.

2 participants