Skip to content

Commit

Permalink
Permit and warn on task/acquisition/run for electrodes and coordsystems
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 10, 2024
1 parent fe8ef01 commit eaaeca2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/schema/rules/checks/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@ ElectrodeSpecificity:
issue:
code: EXCESSIVE_ELECTRODE_SPECIFICITY
message: |
Run or acquisition entities detected in electrodes.tsv.
Task, acquisition or run entities detected in electrodes.tsv.
Electrode definitions should generally not vary within a session.
Consider creating a new session each time electrodes are reconfigured.
Consider removing the excess entity/entities or create a new
session each time electrodes are reconfigured.
level: warning
selectors:
- suffix == 'electrodes'
- extension == '.tsv'
checks:
- '!("run" in entities)'
- '!("task" in entities)'
- '!("acquisition" in entities)'
- '!("run" in entities)'

CoordsystemSpecificity:
issue:
code: EXCESSIVE_COORDSYSTEM_SPECIFICITY
message: |
Task entities detected in coordsystem.tsv.
Coordinate systems should generally not vary by task.
Consider removing the excess entity.
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)'
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:
entities:
subject: required
session: optional
task: optional
acquisition: optional
run: optional
space: optional
Expand Down

0 comments on commit eaaeca2

Please sign in to comment.