Skip to content

DOC: Diátaxis application to Source Tutorial part 2: Defacing Example#13695

Draft
nordme wants to merge 9 commits intomne-tools:mainfrom
nordme:deface_howto
Draft

DOC: Diátaxis application to Source Tutorial part 2: Defacing Example#13695
nordme wants to merge 9 commits intomne-tools:mainfrom
nordme:deface_howto

Conversation

@nordme
Copy link
Contributor

@nordme nordme commented Feb 25, 2026

What does this implement/fix?

This PR applies Diátaxis framework principles to the "Source Alignment and Coordinate Frame" tutorial by removing defacing information from the source alignment tutorial and adding a "Deface Dig and MRI" example instead. This is the second PR in a series of three refactoring the original Source Alignment tutorial.

@wmvanvliet
Copy link
Contributor

wmvanvliet commented Feb 26, 2026

This is a really nice example! Given the amount of code, would it make sense to collect it in an mne.deface(mri) function?

@nordme
Copy link
Contributor Author

nordme commented Feb 26, 2026

This is a really nice example! Given the amount of code, would it make sense to collect it in an mne.deface(mri) function?

Thanks, @wmvanvliet! My initial instinct about defacing is that it's a task likely to generate a lot of edges cases or otherwise require a lot of customization. So my inclination would be to provide a recipe but avoid having to maintain a function. But I'm happy to discuss this with Dan and Eric and the rest of the team!

================================================
Because facial information can be identifying, it is sometimes necessary to
obscure facial detail in MEG and MRI data. This example shows how to do deface
Copy link
Member

Choose a reason for hiding this comment

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

For the deface question, mne-bids has deface option

https://mne.tools/mne-bids/stable/generated/mne_bids.write_anat.html

I think the easiest path forward would be to expose mne_bids.deface(mri) or similar, then use it here. @nordme could you make an issue on MNE-BIDS about this to see if people are open to it?

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