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] Allow (but discourage) task entity for coordsystem.json #1888

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions src/modality-specific-files/electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,12 @@ landmarks or fiducials during an EEG session/run, must be stored separately in
the corresponding `*_T1w.json` or `*_T2w.json` file and should be expressed in
voxels (starting from `[0, 0, 0]`).

`*_coordsystem.json` files SHOULD NOT be duplicated for each data file,
for example, across multiple tasks.
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
be used to find the appropriate coordinate system description for a given data file.
If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.

### Example `*_coordsystem.json`

```JSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ A guide for using macros can be found at
-->
{{ MACROS___make_sidecar_table("ieeg.iEEGCoordsystemPositions") }}

`*_coordsystem.json` files SHOULD NOT be duplicated for each data file,
for example, across multiple tasks.
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
be used to find the appropriate coordinate system description for a given data file.
If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.

### Recommended 3D coordinate systems

It is preferred that electrodes are localized in a 3D coordinate system (with
Expand Down
5 changes: 5 additions & 0 deletions src/modality-specific-files/magnetoencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ For more information on typical coordinate systems for MEG-MRI coregistration:
or:
[Coordinate Systems - Brainstorm toolbox](https://neuroimage.usc.edu/brainstorm/CoordinateSystems)

`*_coordsystem.json` files SHOULD NOT be duplicated for each data file,
for example, across multiple tasks.
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
be used to find the appropriate coordinate system description for a given data file.

## Landmark photos (`*_photo.<extension>`)

Photos of the anatomical landmarks and/or head localization coils
Expand Down
6 changes: 6 additions & 0 deletions src/modality-specific-files/near-infrared-spectroscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ A guide for using macros can be found at

{{ MACROS___make_sidecar_table(["nirs.AnatomicalLandmark", "nirs.AnatomicalLandmarkCoordinateSystemDescriptionRec"]) }}

`*_coordsystem.json` files SHOULD NOT be duplicated for each data file,
for example, across multiple tasks.
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
be used to find the appropriate coordinate system description for a given data file.
If optodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.

### Example `*_coordsystem.json`

```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ ElectrodeSpecificity:
checks:
- '!("run" in entities)'
- '!("acquisition" in entities)'

CoordsystemSpecificity:
issue:
code: EXCESSIVE_COORDSYSTEM_SPECIFICITY
message: |
Task entities detected in coordsystem.tsv.
Coordinate systems should generally not vary by task.
Consider removing the excess entity.
level: warning
selectors:
- suffix == 'coordsystem'
- extension == '.json'
checks:
- '!("task" in entities)'
1 change: 1 addition & 0 deletions src/schema/rules/files/raw/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ coordsystem:
entities:
subject: required
session: optional
task: optional
acquisition: optional

# (i)EEG has a space entity
Expand Down