diff --git a/src/modality-specific-files/electroencephalography.md b/src/modality-specific-files/electroencephalography.md index 782012f3ea..25a0fe72a2 100644 --- a/src/modality-specific-files/electroencephalography.md +++ b/src/modality-specific-files/electroencephalography.md @@ -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 diff --git a/src/modality-specific-files/intracranial-electroencephalography.md b/src/modality-specific-files/intracranial-electroencephalography.md index dc15d9f92d..abf06eb3fe 100644 --- a/src/modality-specific-files/intracranial-electroencephalography.md +++ b/src/modality-specific-files/intracranial-electroencephalography.md @@ -403,6 +403,12 @@ A guide for using macros can be found at --> {{ MACROS___make_json_table("json.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 diff --git a/src/modality-specific-files/magnetoencephalography.md b/src/modality-specific-files/magnetoencephalography.md index babc92be7c..ced4d6f3e7 100644 --- a/src/modality-specific-files/magnetoencephalography.md +++ b/src/modality-specific-files/magnetoencephalography.md @@ -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.`) Photos of the anatomical landmarks and/or head localization coils diff --git a/src/modality-specific-files/near-infrared-spectroscopy.md b/src/modality-specific-files/near-infrared-spectroscopy.md index b423b4c2dd..accce58183 100644 --- a/src/modality-specific-files/near-infrared-spectroscopy.md +++ b/src/modality-specific-files/near-infrared-spectroscopy.md @@ -427,6 +427,12 @@ A guide for using macros can be found at {{ MACROS___make_json_table(["json.nirs.AnatomicalLandmark", "json.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 diff --git a/src/schema/rules/checks/channels.yaml b/src/schema/rules/checks/channels.yaml new file mode 100644 index 0000000000..9fc11edce0 --- /dev/null +++ b/src/schema/rules/checks/channels.yaml @@ -0,0 +1,34 @@ +--- +ElectrodeSpecificity: + issue: + code: EXCESSIVE_ELECTRODE_SPECIFICITY + message: | + Task, acquisition or run entities detected in electrodes.tsv. + Electrode definitions should generally not vary within a session. + Consider removing the excess entity/entities or create a new + session each time electrodes are reconfigured. + level: warning + selectors: + - suffix == 'electrodes' + - extension == '.tsv' + checks: + - '!("task" in entities)' + - '!("acquisition" in entities)' + - '!("run" in entities)' + +CoordsystemSpecificity: + issue: + code: EXCESSIVE_COORDSYSTEM_SPECIFICITY + message: | + Task, acquisition or run entities detected in coordsystem.tsv. + Coordinate systems should generally not vary within a session. + Consider removing the excess entity/entities or create new + sessions when multiple coordinate systems are appropriate. + level: warning + selectors: + - suffix == 'coordsystem' + - extension == '.json' + checks: + - '!("task" in entities)' + - '!("acquisition" in entities)' + - '!("run" in entities)' diff --git a/src/schema/rules/checks/electrodes.yaml b/src/schema/rules/checks/electrodes.yaml deleted file mode 100644 index 29f81d3d44..0000000000 --- a/src/schema/rules/checks/electrodes.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -ElectrodeSpecificity: - issue: - code: EXCESSIVE_ELECTRODE_SPECIFICITY - message: | - Run or acquisition entities detected in electrodes.tsv. - Electrode definitions should generally not vary within a session. - Consider creating a new session each time electrodes are reconfigured. - level: warning - selectors: - - suffix == 'electrodes' - - extension == '.tsv' - checks: - - '!("run" in entities)' - - '!("acquisition" in entities)' diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index 25aa1deff3..6a4358c689 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -45,6 +45,7 @@ coordsystem: entities: subject: required session: optional + task: optional acquisition: optional # (i)EEG has a space entity @@ -69,6 +70,7 @@ electrodes: entities: subject: required session: optional + task: optional acquisition: optional run: optional space: optional