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

Using -trans in maxfilter affects coregistration #216

Closed
cgohil8 opened this issue Aug 23, 2023 · 3 comments · Fixed by #292
Closed

Using -trans in maxfilter affects coregistration #216

cgohil8 opened this issue Aug 23, 2023 · 3 comments · Fixed by #292
Assignees
Labels
bug Something isn't working maxfilter souce recon

Comments

@cgohil8
Copy link
Collaborator

cgohil8 commented Aug 23, 2023

If you use the -trans option during maxfiltering the placement of the polhemus headshape points/fiducials changes in the coregistration. For example:

Coregistering a file called HC08_rest_tsss.fif (maxfiltered without -trans), we get:
Screenshot 2023-08-23 at 18 54 00

The same subject and structural, however, using the HC08_rest_tsss_trans.fif file, we get:
Screenshot 2023-08-23 at 18 54 02

The head is much closer to the MEG sensors.

It appears the meg to head transformation is different in the fif file if you use -trans in maxfiltering, this can be verified with

import mne

# Maxfiltered without -trans
info = mne.io.read_info("HC08_rest_tsss.fif")
trans = mne.transforms._get_trans(info["dev_head_t"], "meg", "head")
print(trans)

# Maxfiltered with -trans
info = mne.io.read_info("HC08_rest_tsss_trans.fif")
trans = mne.transforms._get_trans(info["dev_head_t"], "meg", "head")
print(trans)
@cgohil8 cgohil8 added the bug Something isn't working label Aug 23, 2023
@cgohil8 cgohil8 self-assigned this Aug 23, 2023
@matsvanes
Copy link
Collaborator

Is this still an issue or can we accept that we need to choose to either coregister trans or tsss (and ideally include some documentation on this)

@cgohil8
Copy link
Collaborator Author

cgohil8 commented Aug 30, 2023

Still an issue. Probably not resolvable in the code. The advice is use the _tsss.fif file. This is what's included in the oxford example scripts: https://github.com/OHBA-analysis/osl/tree/examples/examples/oxford.

@matsvanes
Copy link
Collaborator

Add warning in the coreg log that the head position might look off whenever trans is used, but this does not affect the source data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maxfilter souce recon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants