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

[FIX] Consistently refer to Neuromag/Elekta/MEGIN #1310

Merged
merged 6 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/appendices/coordinate-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ Restricted keywords for the `<CoordSysType>CoordinateSystem` field in the
`coordinatesystem.json` file for MEG datasets:

- `CTF`: ALS orientation and the origin between the ears
- `ElektaNeuromag`: RAS orientation and the origin between the ears
- `NeuromagElektaMEGIN`: RAS orientation and the origin between the ears
- `4DBti`: ALS orientation and the origin between the ears
- `KitYokogawa`: ALS orientation and the origin between the ears
- `ChietiItab`: RAS orientation and the origin between the ears
- Any keyword from the list of [Standard template identifiers](#standard-template-identifiers): RAS orientation and the origin at the center of the gradient coil for template NifTI images
- The use of `ElektaNeuromag` is [DEPRECATED][deprecated]. Dataset curators SHOULD use `NeuromagElektaMEGIN` instead.

In the case that MEG was recorded simultaneously with EEG,
the restricted keywords for
Expand Down Expand Up @@ -146,7 +147,7 @@ the restricted keywords for
can also be applied to EEG:

- `CTF`
- `ElektaNeuromag`
- `NeuromagElektaMEGIN`
- `4DBti`
- `KitYokogawa`
- `ChietiItab`
Expand Down
10 changes: 9 additions & 1 deletion src/schema/objects/enums.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ _MEGCoordSys:
type: string
enum:
- $ref: objects.enums.CTF.value
- $ref: objects.enums.ElektaNeuromag.value
- $ref: objects.enums.ElektaNeuromag.value # deprecated
- $ref: objects.enums.NeuromagElektaMEGIN.value
- $ref: objects.enums.4DBti.value
- $ref: objects.enums.KitYokogawa.value
- $ref: objects.enums.ChietiItab.value
Expand Down Expand Up @@ -305,6 +306,13 @@ CTF:
ElektaNeuromag:
value: ElektaNeuromag
display_name: Elekta Neuromag
description: |
RAS orientation and the origin between the ears.
[DEPRECATED](SPEC_ROOT/common-principles.md#definitions).
Dataset curators SHOULD use `NeuromagElektaMEGIN` instead.
Comment on lines +311 to +312
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we're going to deprecate, then we should have checks to warn curators to normalize. It seems this shows up in 7 metadata fields:

$ git grep -B12 _MEGCoordSys | grep \ name:
src/schema/objects/metadata.yaml-  name: AnatomicalLandmarkCoordinateSystem
src/schema/objects/metadata.yaml-  name: DigitizedHeadPointsCoordinateSystem
src/schema/objects/metadata.yaml-  name: EEGCoordinateSystem
src/schema/objects/metadata.yaml-  name: FiducialsCoordinateSystem
src/schema/objects/metadata.yaml-  name: HeadCoilCoordinateSystem
src/schema/objects/metadata.yaml-  name: MEGCoordinateSystem
src/schema/objects/metadata.yaml-  name: NIRSCoordinateSystem

Could make a check in src/schema/rules/checks/deprecations.yaml:

AnatomicalLandmarkCoordinateSystemDeprecation:
  issue:
    code: ELEKTA_NEUROMAG_DEPRECATED
    message: |
        "ElektaNeuromag" as a coordinate system is deprecated.
        Use "NeuromagElektaMEGIN" instead.
    level: warning
  selectors:
    - sidecar.AnatomicalLandmarkCoordinateSystem
  checks:
    - sidecar.AnatomicalLandmarkCoordinateSystem != "ElektaNeuromag"

DigitizedHeadPointsCoordinateSystemDeprecation:
  $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation
  selectors:
    - sidecar.DigitizedHeadPointsCoordinateSystem
  checks:
    - sidecar.DigitizedHeadPointsCoordinateSystem != "ElektaNeuromag"

...

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestions @effigies I agree and have created a PR for this, using your code. Please feel free to adjust if that's not what you had in mind. #1848

NeuromagElektaMEGIN:
value: NeuromagElektaMEGIN
display_name: Neuromag Elekta MEGIN
description: |
RAS orientation and the origin between the ears.
4DBti:
Expand Down
5 changes: 4 additions & 1 deletion src/schema/rules/sidecars/meg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ MEGHardware:
level: recommended
description_addendum: |
For MEG scanners, this must be one of:
`"CTF"`, `"Elekta/Neuromag"`, `"BTi/4D"`, `"KIT/Yokogawa"`,
`"CTF"`, `"Neuromag/Elekta/MEGIN"`, `"BTi/4D"`, `"KIT/Yokogawa"`,
`"ITAB"`, `"KRISS"`, `"Other"`.
The use of `"Elekta/Neuromag"` is
[DEPRECATED](SPEC_ROOT/common-principles.md#definitions).
Dataset curators SHOULD use `"Neuromag/Elekta/MEGIN"` instead.
See the [MEG Systems Appendix](SPEC_ROOT/appendices/meg-systems.md) for
preferred names.
ManufacturersModelName:
Expand Down