From 9d136f4f572749fdf33ca1b60391093ba514a36a Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 3 Oct 2024 15:53:44 -0400 Subject: [PATCH 1/3] fix: Only check for sorted times in arrays --- src/schema/rules/checks/mri.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/rules/checks/mri.yaml b/src/schema/rules/checks/mri.yaml index 91a1520179..1aad6d7259 100644 --- a/src/schema/rules/checks/mri.yaml +++ b/src/schema/rules/checks/mri.yaml @@ -109,7 +109,7 @@ BolusCutOffDelayTimeNotMonotonicallyIncreasing: level: error selectors: - modality == "mri" - - sidecar.BolusCutOffDelayTime != null + - type(sidecar.BolusCutOffDelayTime) == 'array' checks: - allequal(sorted(sidecar.BolusCutOffDelayTime), sidecar.BolusCutOffDelayTime) From e7a23e25345e33162e7fa074827ddef6a37bbd4f Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 10 Oct 2024 10:26:24 -0400 Subject: [PATCH 2/3] fix(schema): Limit MRI metadata checks to NIfTIs --- src/schema/rules/sidecars/mri.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/schema/rules/sidecars/mri.yaml b/src/schema/rules/sidecars/mri.yaml index 1edcdb157b..ba1d43fda2 100644 --- a/src/schema/rules/sidecars/mri.yaml +++ b/src/schema/rules/sidecars/mri.yaml @@ -195,8 +195,9 @@ PhaseEncodingDirectionRec: PhaseEncodingDirectionReq: selectors: - - modality == "mri" + - datatype == "fmap" - suffix == "epi" + - match(extension, "^\.nii(\.gz)?$") fields: PhaseEncodingDirection: level: required @@ -244,6 +245,7 @@ SliceTimingMRI: selectors: - modality == "mri" - sidecar.MRAcquisitionType == "2D" + - match(extension, "^\.nii(\.gz)?$") fields: SliceTiming: level: recommended @@ -257,6 +259,7 @@ SliceTimingASL: - datatype == "perf" - intersects([suffix], ["asl", "m0scan"]) - sidecar.MRAcquisitionType == "2D" + - match(extension, "^\.nii(\.gz)?$") fields: SliceTiming: level: required @@ -288,6 +291,7 @@ MRIFlipAngleLookLockerFalse: selectors: - modality == "mri" - sidecar.LookLocker != true + - match(extension, "^\.nii(\.gz)?$") fields: FlipAngle: level: recommended @@ -304,6 +308,7 @@ MRIFlipAngleLookLockerTrue: selectors: - modality == "mri" - sidecar.LookLocker == true + - match(extension, "^\.nii(\.gz)?$") fields: FlipAngle: level: required @@ -377,6 +382,7 @@ MRIInstitutionInformation: DeidentificationMethod: selectors: - intersects([modality], ["mri", "pet"]) + - match(extension, "^\.nii(\.gz)?$") fields: DeidentificationMethod: level: optional From c1200b5aeb70bcad08e6586688650973f66b99dd Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 10 Oct 2024 16:03:33 -0400 Subject: [PATCH 3/3] fix(schema): Disable TaskName check for channels and markers files closes bids-standard/bids-validator#2154 --- src/schema/rules/sidecars/entity_rules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/rules/sidecars/entity_rules.yaml b/src/schema/rules/sidecars/entity_rules.yaml index 54b3c256a0..cd54e72752 100644 --- a/src/schema/rules/sidecars/entity_rules.yaml +++ b/src/schema/rules/sidecars/entity_rules.yaml @@ -10,7 +10,7 @@ EntitiesTaskMetadata: selectors: - '"task" in entities' - - suffix != 'events' + - '!intersects([suffix], ["events", "channels", "markers"])' fields: TaskName: recommended