Skip to content

Commit

Permalink
Merge pull request #1941 from effigies/fix/schema-checks
Browse files Browse the repository at this point in the history
[SCHEMA] Fixes identified from reviewing OpenNeuro errors
  • Loading branch information
rwblair authored Oct 10, 2024
2 parents 4b71e3a + c1200b5 commit 9a2145c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/schema/rules/checks/mri.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ BolusCutOffDelayTimeNotMonotonicallyIncreasing:
level: error
selectors:
- modality == "mri"
- sidecar.BolusCutOffDelayTime != null
- type(sidecar.BolusCutOffDelayTime) == 'array'
checks:
- allequal(sorted(sidecar.BolusCutOffDelayTime), sidecar.BolusCutOffDelayTime)

Expand Down
2 changes: 1 addition & 1 deletion src/schema/rules/sidecars/entity_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
EntitiesTaskMetadata:
selectors:
- '"task" in entities'
- suffix != 'events'
- '!intersects([suffix], ["events", "channels", "markers"])'
fields:
TaskName: recommended

Expand Down
8 changes: 7 additions & 1 deletion src/schema/rules/sidecars/mri.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ PhaseEncodingDirectionRec:
PhaseEncodingDirectionReq:
selectors:
- modality == "mri"
- datatype == "fmap"
- suffix == "epi"
- match(extension, "^\.nii(\.gz)?$")
fields:
PhaseEncodingDirection:
level: required
Expand Down Expand Up @@ -244,6 +245,7 @@ SliceTimingMRI:
selectors:
- modality == "mri"
- sidecar.MRAcquisitionType == "2D"
- match(extension, "^\.nii(\.gz)?$")
fields:
SliceTiming:
level: recommended
Expand All @@ -257,6 +259,7 @@ SliceTimingASL:
- datatype == "perf"
- intersects([suffix], ["asl", "m0scan"])
- sidecar.MRAcquisitionType == "2D"
- match(extension, "^\.nii(\.gz)?$")
fields:
SliceTiming:
level: required
Expand Down Expand Up @@ -288,6 +291,7 @@ MRIFlipAngleLookLockerFalse:
selectors:
- modality == "mri"
- sidecar.LookLocker != true
- match(extension, "^\.nii(\.gz)?$")
fields:
FlipAngle:
level: recommended
Expand All @@ -304,6 +308,7 @@ MRIFlipAngleLookLockerTrue:
selectors:
- modality == "mri"
- sidecar.LookLocker == true
- match(extension, "^\.nii(\.gz)?$")
fields:
FlipAngle:
level: required
Expand Down Expand Up @@ -377,6 +382,7 @@ MRIInstitutionInformation:
DeidentificationMethod:
selectors:
- intersects([modality], ["mri", "pet"])
- match(extension, "^\.nii(\.gz)?$")
fields:
DeidentificationMethod:
level: optional
Expand Down

0 comments on commit 9a2145c

Please sign in to comment.