question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: Add Neuromag phantom subject

See original GitHub issue

I created an incomplete FreeSurfer subject directory for the Neuromag phantom that contains the head surface and CT-as-MRI T1.mgz. With this, you can do a plot for this example that would look like:

import mne
import numpy as np

data_path = mne.datasets.brainstorm.bst_phantom_elekta.data_path()
info = mne.io.read_info(data_path + '/kojak_all_200nAm_pp_no_chpi_no_ms_raw.fif')
sphere = mne.make_sphere_model((0., 0., 0.), 0.08)
trans = mne.transforms.Transform('head', 'mri', np.eye(4))
fig = mne.viz.plot_alignment(
    info, trans, 'phantom', bem=sphere, surfaces=('inner_skull', 'head-dense'),
    coord_frame='meg', show_axes=True, mri_fiducials=True, subjects_dir='.',
    dig=True)
fig.plotter.screenshot('alignment.png')

alignment

FYI for folks who haven’t seen it, this is what the phantom actually looks like:

Options:

  1. Add to bst_phantom_elekta. I don’t like this because the phantom is more generally usable than this, and it’s not part of the data Brainstorm actually distributes, either.
  2. Add to mne-misc-data. It’s small so this is doable, but not the best organization-wise.
  3. Add a mne.datasets.fetch_phantom. It’s more stuff in that namespace (not great), but probably the cleanest because you can tell it explicitly which subjects_dir to put the subject into. It’s also easier to update/add files in the future and for users to get them, similar to how fetch_fsaverage works.
  4. Don’t distribute this, nobody actually needs it (though I do, other MEG folks might, and it would make the bst example nicer!)

I prefer option (3), any thoughts?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Sep 30, 2021

Or maybe fetch_phantom(kind='neuromag')

0reactions
larsonercommented, Sep 30, 2021

(this could mirror the design of get_phantom_dipoles, which would be nice)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENH: Add Neuromag phantom subject - Mne-Tools/Mne-Python
I created an incomplete FreeSurfer subject directory for the Neuromag phantom that contains the head surface and CT-as-MRI T1.mgz.
Read more >
The comparative performance of DBS artefact rejection ... - NCBI
In this study, we evaluate the performance of four artefact rejection methods on MEG data from phantom recordings with DBS acquired with an...
Read more >
What's new — MNE 1.2.2 documentation
Add phantom FreeSurfer subject fetcher ... Fix bug in mne.viz.plot_compare_evokeds() when using Neuromag 122 system by Eric Larson.
Read more >
A study of dipole localization accuracy for MEG and EEG ...
Objective: to investigate the accuracy of forward and inverse techniques for EEG and MEG dipole localization. Design and Methods: a human ...
Read more >
MEG/EEG Group Analysis With Brainstorm - Frontiers
We created a new study or protocol in the software database named “Frontiers2018Single,” to which we added a new subject with “sub-01” as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found