diff --git a/src/schema/rules/checks/events.yaml b/src/schema/rules/checks/events.yaml index 01d1a9537d..536423aec7 100644 --- a/src/schema/rules/checks/events.yaml +++ b/src/schema/rules/checks/events.yaml @@ -15,7 +15,7 @@ EventsMissing: - '!match(entities.task, "rest")' - '!intersects([suffix], ["events", "beh"])' - extension != ".json" - - (datatype != "meg" || entities.subject != "emptyroom") + - datatype != "meg" || entities.subject != "emptyroom" && entities.task != "noise" checks: - '"events" in associations' @@ -26,7 +26,7 @@ StimulusFileMissing: A stimulus file was declared but not found in the dataset. level: error selectors: - - suffix == "events" + - intersects([suffix], ["events", "beh"]) - columns.stim_file != null checks: - exists(columns.stim_file, "stimuli") == length(columns.stim_file) - count(columns.stim_file, "n/a") diff --git a/src/schema/rules/checks/mri.yaml b/src/schema/rules/checks/mri.yaml index 1aad6d7259..d2eeb001a8 100644 --- a/src/schema/rules/checks/mri.yaml +++ b/src/schema/rules/checks/mri.yaml @@ -70,9 +70,27 @@ SliceTimingElements: - modality == "mri" - type(sidecar.SliceTiming) != "null" - type(nifti_header) != "null" + - type(sidecar.SliceEncodingDirection) == 'null' checks: - length(sidecar.SliceTiming) == nifti_header.dim[3] +SliceTimingElementsWithDirection: + issue: + code: SLICETIMING_ELEMENTS + message: | + The number of elements in the 'SliceTiming' array should match the dimension + of the corresponding NIfTI volume matching `SliceEncodingDirection` + level: warning + selectors: + - modality == "mri" + - type(sidecar.SliceTiming) != "null" + - type(nifti_header) != "null" + - sidecar.SliceEncodingDirection + checks: + - sidecar.SliceEncodingDirection[0] != "i" || length(sidecar.SliceTiming) == nifti_header.dim[1] + - sidecar.SliceEncodingDirection[0] != "j" || length(sidecar.SliceTiming) == nifti_header.dim[2] + - sidecar.SliceEncodingDirection[0] != "k" || length(sidecar.SliceTiming) == nifti_header.dim[3] + # 93 EESGreaterThanTRT: issue: