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: Channel tags #36

Open
larsoner opened this issue Jul 28, 2021 · 6 comments
Open

ENH: Channel tags #36

larsoner opened this issue Jul 28, 2021 · 6 comments

Comments

@larsoner
Copy link
Member

It would be nice to be able to tag channels as belonging to a particular "group". What tags/groups are useful could be up to each user/system to decide, but just a few compelling examples we've found working on MNE-Python include:

  • for Triux NEO (and older systems), we would optionally add tags/groups to indicate 1) each triplet of sensors that share a common spatial location, and also 2) which selection they are a part of. For example, MEG0111 could have tags ('011X', 'Left', 'temporal') or so (part of the 0111/2/3 triplet, in the Left-temporal group in .sel)
  • for ECoG/sEEG/implanted electrodes, each electrode shaft (sEEG) or grid (ECoG) could be encoded (recordings often include multiple shafts/grids)
  • for OPM MEG, manufacturers sometimes refer to one "sensor" as having multiple sensitive volumes (even if spatially offset from one another) which we would then encode as individual channels; thus being able to have each "sensor" name/group for each channel would be useful.

I propose we add to our new enhanced channel block ch_info (#33) the ability to specify sets of string tags for each channel, i.e., to:

#==============================================================================================================
#
# Tags used for channel info
#
#==============================================================================================================
:id channel_info
#==============================================================================================================
ch_coil_type 350 enum(coil) - "Coil type"
ch_coord_frame 351 enum(coord) - "Channel coordinate frame"
#<free> 352
#... ...
#<free> 399

We could add:

ch_tags		352	str	-	"Channel tags"

This could would then be written using the same name_list / :-concatenated string mechanism as other places in MNE, assuming that's general enough for MEGIN use.

Thoughts @jnenonen @mkajola ?

@jnenonen
Copy link
Collaborator

jnenonen commented Aug 12, 2021 via email

@larsoner
Copy link
Member Author

@jnenonen @mkajola any thoughts on this one?

@jnenonen
Copy link
Collaborator

jnenonen commented Sep 22, 2021 via email

@mkajola
Copy link
Collaborator

mkajola commented Sep 22, 2021 via email

@larsoner
Copy link
Member Author

So with this very quick evaluation, I would rather go to something like “spatial-groups” tag.

Indeed the most critical / motivating use cases currently have to do with spatial groups (position and/or orientation and/or physical connection between channels). So starting with a "spatial groups" list-of-str for each channel within the new channel info blocks sounds good to me!

There might be some other groups later on, and there could be also “tags” with tags for which we don’t specify any particular semantics.

Agreed we can wait on something like this and add it later if there are good motivating use cases. I don't see any harm in having these other tags separate from the spatial grouping tags, as having them separate just adds information, in that the spatial ones are more specific / targeted.

I'll open a pull request in the coming days to add this sort of thing here, probably along with some joint MNE-Python and MNE-MATLAB PRs that at implement some form of this (as a way of testing the constants/infrastructure here).

@mkajola
Copy link
Collaborator

mkajola commented Sep 23, 2021 via email

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

No branches or pull requests

3 participants