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

Add support for applying an EEG template montage #162

Merged
merged 2 commits into from
Jul 26, 2020

Conversation

hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Jul 23, 2020

For datasets where no digitizer information (i.e., measured sensor locations) are available, users may wish to use the template montage supplied by the manufacturer (or simply calculated according to the 10/20 etc. systems). This PR adds the eeg_template_montage configuration setting that allows to use MNE-Python's built-in templates.


IMHO, this again highlights an issue with the current BIDS specification: that it's not allowed to store montage / channel locations in the dataset if the locations are from a template and not actually measured. For the dataset I'm using for testing here, ds001810, I had to dig into *_eeg.json to find:

        "CapManufacturer": "Biosemi",
        "CapManufacturersModelName": "CAP 64 10/20",

and then I had to start searching for the template – fortunately, it's included in MNE-Python :) But this brings me to the next issue with not including the template / template locations in BIDS: if MNE hadn't included this particular template, I would have had to juggle yet another file that I have to store somewhere (since it's not included in the original dataset). This is just asking for problems… :)

cc @sappelhoff

For datasets where no digitizer information (i.e., measured sensor
locations) are available, users may wish to use the template montage
supplied by the manufacturer (or simply calculated according to the
10/20 etc. systems). This commit adds the `eeg_template_montage`
configuration setting that allows to use MNE-Python's built-in
templates.
@sappelhoff
Copy link
Member

sappelhoff commented Jul 23, 2020

I would have had to juggle yet another file that I have to store somewhere

It'd have been a small PR to MNE-Python I guess 🤷 but I am not a dictator, you can always open a new issue or comment on the old ones, and convince other BIDS people 👍

edit: for example you could lobby that a new field is included in electrodes.tsv or coordsystem.json that unambiguously tells whether locations are template or measured (that was proposed multiple times by several people - including yourself, I think? I lose track 😬 )

@hoechenberger
Copy link
Member Author

It'd have been a small PR to MNE-Python I guess 🤷

But then still one somehow has to correctly map from the BIDS data to the respective MNE template… which, I'm afraid, cannot be automated, right?

edit: for example you could lobby that a new field is included in electrodes.tsv or coordsystem.json that unambiguously tells whether locations are template or measured (that was proposed multiple times by several people - including yourself, I think? I lose track 😬 )

Yeah I don't remember my vote on this anymore either, but I do remember that we once touched upon this in a discussion, yes :)

@sappelhoff
Copy link
Member

Let me prepare a starter kit for you 😆

these three issues and all crosslinks should cover 90% of what has been publicly discussed on this issue. It's a lot to read, but maybe worth it :)

@hoechenberger
Copy link
Member Author

Oh my!! Thanks @sappelhoff

@hoechenberger
Copy link
Member Author

But then still one somehow has to correctly map from the BIDS data to the respective MNE template… which, I'm afraid, cannot be automated, right?

I'm wondering if valid CapManufacturersModelName entries should be a part of the specification, and only a restricted list of values should be accepted. That way, one could be certain that two entries with the same name actually refer to the exact same cap model… And mapping from BIDS to MNE could safely be automated.

@hoechenberger
Copy link
Member Author

@jasmainak Any more thoughts on this one? Otherwise it's good to merge from my end!

@jasmainak jasmainak merged commit 926f16e into mne-tools:master Jul 26, 2020
@jasmainak
Copy link
Member

Looks good to me, merged. Thanks @hoechenberger !

@hoechenberger
Copy link
Member Author

Thanks!

@hoechenberger hoechenberger deleted the template-montage branch July 26, 2020 19:10
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.

4 participants