From 0e0e6bf06fea35b5f3d6c79a0c7dfda224bfc112 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 7 Mar 2024 15:30:41 -0500 Subject: [PATCH 1/3] FIX: Re-add run entity to electrodes.tsv --- src/schema/rules/files/raw/channels.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index 06c213be17..25aa1deff3 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 From c41872c7556fe2418ee01c6c3664ac1e4e190a9b Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 11 Mar 2024 12:26:15 -0400 Subject: [PATCH 2/3] [ENH] Recommend electrodes usage/require inheritance --- src/modality-specific-files/electroencephalography.md | 6 ++++++ .../intracranial-electroencephalography.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/modality-specific-files/electroencephalography.md b/src/modality-specific-files/electroencephalography.md index e38f2236ef..b341966b72 100644 --- a/src/modality-specific-files/electroencephalography.md +++ b/src/modality-specific-files/electroencephalography.md @@ -310,6 +310,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 339609699d..c024a04ce1 100644 --- a/src/modality-specific-files/intracranial-electroencephalography.md +++ b/src/modality-specific-files/intracranial-electroencephalography.md @@ -351,6 +351,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 From e7154a30d85f2447cc7611a3e6f9b410f5c8b7b1 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 11 Mar 2024 12:32:32 -0400 Subject: [PATCH 3/3] SCHEMA: Add check to warn against excessive electrode specificity --- src/schema/rules/checks/electrodes.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/schema/rules/checks/electrodes.yaml diff --git a/src/schema/rules/checks/electrodes.yaml b/src/schema/rules/checks/electrodes.yaml new file mode 100644 index 0000000000..29f81d3d44 --- /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)'