Skip to content

Commit d5516be

Browse files
committed
Merge remote-tracking branch 'upstream/maint/1.10.0'
2 parents c17d532 + 519279b commit d5516be

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/schema/rules/checks/events.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ EventsMissing:
1515
- '!match(entities.task, "rest")'
1616
- '!intersects([suffix], ["events", "beh"])'
1717
- extension != ".json"
18-
- (datatype != "meg" || entities.subject != "emptyroom")
18+
- datatype != "meg" || entities.subject != "emptyroom" && entities.task != "noise"
1919
checks:
2020
- '"events" in associations'
2121

@@ -26,7 +26,7 @@ StimulusFileMissing:
2626
A stimulus file was declared but not found in the dataset.
2727
level: error
2828
selectors:
29-
- suffix == "events"
29+
- intersects([suffix], ["events", "beh"])
3030
- columns.stim_file != null
3131
checks:
3232
- exists(columns.stim_file, "stimuli") == length(columns.stim_file) - count(columns.stim_file, "n/a")

src/schema/rules/checks/mri.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,27 @@ SliceTimingElements:
7070
- modality == "mri"
7171
- type(sidecar.SliceTiming) != "null"
7272
- type(nifti_header) != "null"
73+
- type(sidecar.SliceEncodingDirection) == 'null'
7374
checks:
7475
- length(sidecar.SliceTiming) == nifti_header.dim[3]
7576

77+
SliceTimingElementsWithDirection:
78+
issue:
79+
code: SLICETIMING_ELEMENTS
80+
message: |
81+
The number of elements in the 'SliceTiming' array should match the dimension
82+
of the corresponding NIfTI volume matching `SliceEncodingDirection`
83+
level: warning
84+
selectors:
85+
- modality == "mri"
86+
- type(sidecar.SliceTiming) != "null"
87+
- type(nifti_header) != "null"
88+
- sidecar.SliceEncodingDirection
89+
checks:
90+
- sidecar.SliceEncodingDirection[0] != "i" || length(sidecar.SliceTiming) == nifti_header.dim[1]
91+
- sidecar.SliceEncodingDirection[0] != "j" || length(sidecar.SliceTiming) == nifti_header.dim[2]
92+
- sidecar.SliceEncodingDirection[0] != "k" || length(sidecar.SliceTiming) == nifti_header.dim[3]
93+
7694
# 93
7795
EESGreaterThanTRT:
7896
issue:

0 commit comments

Comments
 (0)