make large rotation penalty optional in chpi function#8770
Merged
larsoner merged 3 commits intomne-tools:mainfrom Mar 2, 2021
Merged
make large rotation penalty optional in chpi function#8770larsoner merged 3 commits intomne-tools:mainfrom
larsoner merged 3 commits intomne-tools:mainfrom
Conversation
larsoner
reviewed
Jan 22, 2021
Member
larsoner
left a comment
There was a problem hiding this comment.
Should we expose this publicly somehow / somewhere, too? Ideally things wouldn't break for you if I later went through and modified this function (e.g., if I had pushed such a variable name in the future). If we made some public interface we could avoid the coverage drop / lack of testing. A simple test comparing that, for reasonable data, the two match is probably good enough.
mne/chpi.py
Outdated
|
|
||
|
|
||
| def _fit_coil_order_dev_head_trans(dev_pnts, head_pnts): | ||
| def _fit_coil_order_dev_head_trans(dev_pnts, head_pnts, pen_large_rots=True): |
Member
There was a problem hiding this comment.
maybe just bias=True is clear enough?
Contributor
Author
|
I don't have a strong opinion on making this public. In reality its a utility method that probably belongs in |
* upstream/main: MAINT: Skip matplotlib pre for now (mne-tools#8973) FIX: Brain lights (mne-tools#8972) MNT: Migrate VTK Widgets (mne-tools#8862) Fix (mne-tools#8971) Fix indexing dipoles read from a bdip file (mne-tools#8963)
Member
|
Thanks @bloyl ! |
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Mar 2, 2021
* upstream/main: MAINT: Revert conda azure change (mne-tools#8978) make large rotation penalty optional in chpi function (mne-tools#8770) Fix: Wrong channel-adjacency-matrix for Neuromag122 (mne-tools#8891) [MRG] Add optional different ways of averaging EpochsTFR (mne-tools#8879) DOC, STY: fix dataframe scrolling (mne-tools#8977)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@larsoner
The utility of
_fit_coil_order_dev_head_transallowed for computing the device head transforms when the ordering of the HPIs indigdidn't match the ordering in the device cords.At some point the cost function was modified to strongly favor small rotations. While often what you want, it isn't always what you want. for instance when running a phantom to check that the HPIs are still working after a PM visit.
This PR just makes this penalty optional.