diff --git a/src/modality-specific-files/electroencephalography.md b/src/modality-specific-files/electroencephalography.md index 6ba02cc1..8a584bb7 100644 --- a/src/modality-specific-files/electroencephalography.md +++ b/src/modality-specific-files/electroencephalography.md @@ -308,6 +308,12 @@ and a guide for using macros can be found at --> {{ MACROS___make_columns_table("eeg.EEGElectrodes") }} +`*_electrodes.tsv` files SHOULD NOT be duplicated for each data file, +for example, during multiple runs of a task. +The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST +be used to find the appropriate electrode positions for a given data file. +If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this. + ### Example `*_electrodes.tsv` See also the corresponding [`electrodes.tsv` example](#example-channelstsv). diff --git a/src/modality-specific-files/intracranial-electroencephalography.md b/src/modality-specific-files/intracranial-electroencephalography.md index ae6a669a..096b96f9 100644 --- a/src/modality-specific-files/intracranial-electroencephalography.md +++ b/src/modality-specific-files/intracranial-electroencephalography.md @@ -349,6 +349,12 @@ and a guide for using macros can be found at --> {{ MACROS___make_columns_table("ieeg.iEEGElectrodes") }} +`*_electrodes.tsv` files SHOULD NOT be duplicated for each data file, +for example, during multiple runs of a task. +The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST +be used to find the appropriate electrode positions for a given data file. +If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this. + ### Example `*_electrodes.tsv` ```Text diff --git a/src/schema/rules/checks/electrodes.yaml b/src/schema/rules/checks/electrodes.yaml new file mode 100644 index 00000000..29f81d3d --- /dev/null +++ b/src/schema/rules/checks/electrodes.yaml @@ -0,0 +1,15 @@ +--- +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 06c213be..25aa1def 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -70,6 +70,7 @@ electrodes: subject: required session: optional acquisition: optional + run: optional space: optional # MEG has an additional entity available