Skip to content

Commit 3322a40

Browse files
authored
FIX: Re-add run entity to electrodes.tsv (#1722)
* FIX: Re-add run entity to electrodes.tsv * [ENH] Recommend electrodes usage/require inheritance * SCHEMA: Add check to warn against excessive electrode specificity
1 parent 90ec07f commit 3322a40

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

src/modality-specific-files/electroencephalography.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ and a guide for using macros can be found at
308308
-->
309309
{{ MACROS___make_columns_table("eeg.EEGElectrodes") }}
310310

311+
`*_electrodes.tsv` files SHOULD NOT be duplicated for each data file,
312+
for example, during multiple runs of a task.
313+
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
314+
be used to find the appropriate electrode positions for a given data file.
315+
If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.
316+
311317
### Example `*_electrodes.tsv`
312318

313319
See also the corresponding [`electrodes.tsv` example](#example-channelstsv).

src/modality-specific-files/intracranial-electroencephalography.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ and a guide for using macros can be found at
349349
-->
350350
{{ MACROS___make_columns_table("ieeg.iEEGElectrodes") }}
351351

352+
`*_electrodes.tsv` files SHOULD NOT be duplicated for each data file,
353+
for example, during multiple runs of a task.
354+
The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
355+
be used to find the appropriate electrode positions for a given data file.
356+
If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.
357+
352358
### Example `*_electrodes.tsv`
353359

354360
```Text
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
ElectrodeSpecificity:
3+
issue:
4+
code: EXCESSIVE_ELECTRODE_SPECIFICITY
5+
message: |
6+
Run or acquisition entities detected in electrodes.tsv.
7+
Electrode definitions should generally not vary within a session.
8+
Consider creating a new session each time electrodes are reconfigured.
9+
level: warning
10+
selectors:
11+
- suffix == 'electrodes'
12+
- extension == '.tsv'
13+
checks:
14+
- '!("run" in entities)'
15+
- '!("acquisition" in entities)'

src/schema/rules/files/raw/channels.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ electrodes:
7070
subject: required
7171
session: optional
7272
acquisition: optional
73+
run: optional
7374
space: optional
7475

7576
# MEG has an additional entity available

0 commit comments

Comments
 (0)