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] Re-add run entity to electrodes.tsv #1722

Merged
merged 3 commits into from
Apr 26, 2024
Merged
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 @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions src/schema/rules/checks/electrodes.yaml
Original file line number Diff line number Diff line change
@@ -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)'
effigies marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -70,6 +70,7 @@ electrodes:
subject: required
session: optional
acquisition: optional
run: optional
space: optional

# MEG has an additional entity available
Expand Down