Skip to content

Commit

Permalink
Merge branch 'bids-standard:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
markmikkelsen authored Apr 8, 2024
2 parents c933bb4 + 6c52828 commit 2898686
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modality-specific-files/task-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ and a guide for using macros can be found at
-->
{{ MACROS___make_columns_table("task.TaskEvents") }}

The content of `events.tsv` files SHOULD be sorted by values in the `onset` column.

Note for MRI data:
If any acquired scans have been discarded before forming the imaging data file,
ensure that an `onset` of 0 corresponds to the time the first image was stored.
Expand Down
13 changes: 13 additions & 0 deletions src/schema/rules/checks/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@ StimulusFileMissing:
- columns.stim_file != null
checks:
- exists(columns.stim_file, "stimuli") == length(columns.stim_file) - count(columns.stim_file, "n/a")

SortedOnsets:
issue:
code: EVENT_ONSET_ORDER
message: |
The onset column in events.tsv files should be sorted.
level: warning
selectors:
- suffix == "events"
- extension == ".tsv"
checks:
# n/a values will likely cause false alarms if encountered. Consider alternatives.
- sorted(columns.onset) == columns.onset

0 comments on commit 2898686

Please sign in to comment.