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 : add support for landmarks as dict in write_anat and kind param … #955

Merged
merged 5 commits into from Feb 13, 2022

Conversation

agramfort
Copy link
Member

…in get_head_mri_trans

this is to be able to have landmarks eg for different sessions for coregistration

@agramfort agramfort requested review from hoechenberger and sappelhoff and removed request for hoechenberger February 7, 2022 15:26
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

LGTM in principle, and seems okay from a BIDS point of view (https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/02-magnetoencephalography.html).

I am missing a changelog entry, and maybe (optional) some example.

mne_bids/read.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #955 (6ee3318) into main (7284226) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
+ Coverage   94.40%   94.51%   +0.10%     
==========================================
  Files          25       25              
  Lines        3559     3573      +14     
==========================================
+ Hits         3360     3377      +17     
+ Misses        199      196       -3     
Impacted Files Coverage Δ
mne_bids/read.py 96.11% <100.00%> (+0.26%) ⬆️
mne_bids/write.py 96.49% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7284226...6ee3318. Read the comment docs.

doc/whats_new.rst Outdated Show resolved Hide resolved
mne_bids/read.py Outdated Show resolved Hide resolved
mne_bids/read.py Show resolved Hide resolved
mne_bids/read.py Show resolved Hide resolved
mne_bids/read.py Show resolved Hide resolved
Comment on lines +1779 to +1781
if isinstance(landmarks, (str, Path)):
landmarks, coord_frame = read_fiducials(landmarks)
landmarks = np.array([landmark['r'] for landmark in
Copy link
Member

Choose a reason for hiding this comment

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

It seems we're missing a test for this code path

mne_bids/write.py Outdated Show resolved Hide resolved
mne_bids/write.py Outdated Show resolved Hide resolved
Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Copy link
Member

@hoechenberger hoechenberger left a comment

Choose a reason for hiding this comment

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

LGTM!

@agramfort
Copy link
Member Author

@hoechenberger this one is good to go from my end

@hoechenberger hoechenberger merged commit 6a47bec into mne-tools:main Feb 13, 2022
@hoechenberger
Copy link
Member

Thanks @agramfort

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.

None yet

3 participants