-
Notifications
You must be signed in to change notification settings - Fork 12
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
FIX: Fix missing enums #8
Conversation
261d7c2
to
00f8db4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Adds a few missing entries from the
coil
enum in the MEGIN range - Adds two missing units from hte
unit
enum in the MEGIN range - Adds a new
next
enum in the MEGIN range (not sure if this makes sense) - Adds a new
mne_coord
enum in the MNE range
Let me know if this makes sense to you! Feel free to comment in-line on the changes -- I've already highlighted the 4 change categories.
DictionaryTypes.txt
Outdated
@@ -200,6 +200,8 @@ enum(unit) "FIFF value unit code" | |||
lx 116 "lux" | |||
T_m 201 "T/m" | |||
Am 202 "Am" | |||
Am_m2 203 "Am/m^2" | |||
Am_m3 204 "Am/m^3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are in MNE but missing here. Okay to add to the MEGIN range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me.
DictionaryTypes.txt
Outdated
artemis123_ref_mag 7502 "Artemis123 reference magnetometer" | ||
artemis123_ref_grad 7503 "Artemis123 reference gradiometer" | ||
kriss_grad 8001 "KRISS gradiometer" | ||
sample_tms_planar 9001 "Sample TMS sensor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same -- MNE has these 7 FIFFV_COIL_
types that MEGIN
does not have. Okay to add these? I think they have already been used in MNE-C
software by @mshamalainen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7003 conflicts with LorenzE suggestion. What is the difference between baby_ref_mag (7003) and baby_ref_mag2 (7003)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think his names are better/more complete. I'll see if he can push those changes here, and then reviewing again should be possible / hopefully not so bad.
DictionaryTypes_MNE.txt
Outdated
fs_tal_gtz 2004 "FreeSurfer Talairach (MNI z > 0)" | ||
fs_tal_ltz 2005 "FreeSurfer Talairach (MNI z < 0)" | ||
fs_tal 2006 "FreeSurfer Talairach" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These MNE coordinate frames in principle could live in the MEGIN range for enum(coord)
, but it might make sense to leave them separate (done in current PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK, consider later whether to add in MEGIN range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From @mkajola:
Are “enum(mne_coord) "Additional coordinate type"” used to define coordinate systems ...
In theory these could just be in the main MEGIN range, yes. I'm happy either way.
The advantage/logic to having them in the MNE range is that I don't think they are used in MEGIN software anywhere. In MNE usually these coordinate frames are transient and we put everything in standard Neuromag head, device, or MRI (FreeSurfer RAS) coordinates.
The drawback is that now there are two places that coordinate frame definitions live: the "main" ones in MEGIN range and some "auxiliary" ones in MNE range.
@jnenonen @mkajola if you're okay moving these to the MEGIN range, I'm happy to do it -- it probably does make things simpler in the long run. I don't anticipate needing many more coordinate frame definitions -- maybe a couple if other systems have different head coordinate definitions we need to respect?
@@ -306,6 +315,13 @@ enum(role) "Values for 'ref_role'; the role of a reference" | |||
} | |||
|
|||
|
|||
enum(next) "File pointers" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also @jnenonen better description welcome here if you have one!
DictionaryTypes.txt
Outdated
artemis123_grad 7501 "Artemis123 gradiometer" | ||
artemis123_ref_mag 7502 "Artemis123 reference magnetometer" | ||
artemis123_ref_grad 7503 "Artemis123 reference gradiometer" | ||
kriss_grad 8001 "KRISS gradiometer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larsoner Can you pls double check if you switched the value of kriss_grad with sample_tms_planar? The mne-python coil_def.dat https://github.com/mne-tools/mne-python/blob/master/mne/data/coil_def.dat suggest otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over in our constants file it's 8001 but in the coil_def
I see it's 9001, so looks like our constants file has a bug! I've pushed a commit to fix it here and will make an MNE PR shortly.
According to MNE-C KRISS gradiometer should be 9001.
How were the Artemis coil definitions created?
… On Sep 26, 2018, at 8:50 PM, Lorenz Esch ***@***.***> wrote:
@LorenzE commented on this pull request.
In DictionaryTypes.txt <#8 (comment)>:
> @@ -295,7 +297,14 @@ enum(coil) "Sensor coil type"
kit_grad 6001 "KIT gradiometer"
kit_ref_mag 6002 "KIT reference magnetometer"
baby_grad 7001 "Baby-SQUID gradiometer"
- baby_mag 7002 "Baby-SQUID magnetometer"
+ baby_mag_inner 7002 "BabyMEG inner layer magnetometer"
+ baby_mag_outer 7003 "BabyMEG outer layer magnetometer"
+ baby_mag_ref 7004 "BabyMEG reference layer magnetometer"
+ artemis123_grad 7501 "Artemis123 gradiometer"
+ artemis123_ref_mag 7502 "Artemis123 reference magnetometer"
+ artemis123_ref_grad 7503 "Artemis123 reference gradiometer"
+ kriss_grad 8001 "KRISS gradiometer"
@larsoner <https://github.com/larsoner> Can you pls double check if you switched the value of kriss_grad with sample_tms_planar? The mne-python coil_def.dat https://github.com/mne-tools/mne-python/blob/master/mne/data/coil_def.dat <x-msg://159/url> suggest otherwise.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#8 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAlVajse3SnzO5RWdNPIXtpmPzpR3OuEks5ufCDEgaJpZM4Wlkm8>.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mne-tools/fiff-constants","title":"mne-tools/fiff-constants","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in ***@***.*** commented on #8"}],"action":{"name":"View Pull Request","url":"#8 (review)"}}} [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#8 (review)", "url": "#8 (review)", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } }, { ***@***.***": "MessageCard", ***@***.***": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": ***@***.*** commented on 8", "sections": [ { "text": "", "activityTitle": "**Lorenz Esch**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": ***@***.***", "facts": [ ] } ], "potentialAction": [ { "targets": [ { "os": "default", "uri": "#8 (review)" } ], ***@***.***": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 378948028\n}" } ], "themeColor": "26292E" } ]
|
From over in the MNE-Python PR:
So using the code here. |
Hello @larsoner , Could revert the modernization of Am_m2 & m3. Has some character encoding that looks weird in my emacs. Anyway the dictionary is intended to be machine readable, so at this phase it might better to stay in ascii. Could align the the tabs at the same time. Could remove the Finnish comment about "stukturaalista". I think it is not needed. @mshamalainen just question about old stuff: how does the "MRI voxel coordinates" compare to |
Yep, I can do that.
So far there are tabs used for alignment. Tab-based alignment for variable-length entries -- such as some long names and some short names -- is a bit of a pain because it relies on the tab width being rendered in a standardized way, which in general varies by editor. We could decide how many characters we want a tab stop to be equivalent to, but then everyone has to view the files with these settings. So I'd suggest we change to using spaces. I'll do that for the entries I've changed unless someone objects. We should change the other entries at a later time: #11
From what I understand, in MNE the FIFFV_COORD_MRI / "data volume" coordinates are in units of meters relative to the center of the head (today we usually use the Freesurfer surface RAS coordinates for this). The "mri voxel" coordinates are in units of pixel indices of the volume, i.e., for a 1mm^3 acquisition the units are effectively mm, with the center at one of the volume corners (I think).
I did not change that file in this PR, so I suggest that we do it in a separate PR. It's generally easier to review in smaller separable chunks, easier me to get to it later, and better to get this PR merged sooner. GitHub facilitates making this sort of small incremental progress. I have opened a new issue for this so we don't forget to do it: #10 |
Pushed a commit to remove the non-ASCII chars, as well as one to change the tabs to spaces for alignment in this file only. I also added basic continuous integration (Travis-CI, which is free for open-source projects) to ensure that we don't add non-ASCII chars in the future. You can look at the @jnenonen @mkajola good to go from your end now? Since there are a ton of whitespace changes the |
Hi @larsoner, |
I would suggest tha you click the big green button. Then you or I (or someone else) opens a PR to fix the typo. If you're interested in learning how to use |
We don’t have a coil_def.dat file, just continue with your latest one.
[NENONEN_Outlook Signature]
From: Eric Larson <[email protected]>
Sent: 5. lokakuuta 2018 17:37
To: mne-tools/fiff-constants <[email protected]>
Cc: Jukka Nenonen <[email protected]>; Mention <[email protected]>
Subject: Re: [mne-tools/fiff-constants] FIX: Fix missing enums (#8)
Thanks for the reviews and iterations @mkajola<https://github.com/mkajola> @jnenonen<https://github.com/jnenonen> ! I hope to open a PR soon to unify our coil_def.dat files next.
@jnenonen<https://github.com/jnenonen> can you email me the latest coil_def.dat you have been using so I can merge the two?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#8 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOOx-im70i_6z8eicDbSObqBevh7o8G-ks5uh26ZgaJpZM4Wlkm8>.
|
@mshamalainen is currently working on an updated version of the coil_def.dat (Artemis is missing in the mne-c and mne-cpp version). I will open PRs to mne-python and mne-cpp when ready. Once merged and all three projects (mne-c, mne-python and mne-cpp) are on the same page we could add the coil_def.dat to this repo as well. |
Fixes missing enums.