Skip to content

Commit d461a12

Browse files
committed
Update selectors in rules.checks.func
Switch to using extension instead of nifti_header, to test metadata in the absence of headers. Make VolumeTiming-related errors contingent on the absence of RepetitionTime, since both being present is already an error.
1 parent 6514870 commit d461a12

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/schema/rules/checks/func.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PhaseSuffixDeprecated:
1212
level: warning
1313
selectors:
1414
- datatype == "func"
15+
- match(extension, "^\.nii(\.gz)?$")
1516
checks:
1617
- suffix != "phase"
1718

@@ -67,6 +68,7 @@ SliceTimingGreaterThanRepetitionTime:
6768
level: error
6869
selectors:
6970
- suffix == "bold"
71+
- match(extension, "^\.nii(\.gz)?$")
7072
- type(sidecar.SliceTiming) != "null"
7173
- type(sidecar.RepetitionTime) != "null"
7274
checks:
@@ -88,8 +90,8 @@ VolumeTimingRepetitionTimeMutex:
8890
or 'VolumeTiming' when variable times are used.
8991
level: error
9092
selectors:
91-
- type(nifti_header) != "null"
9293
- intersects([suffix], ["asl", "bold"])
94+
- match(extension, "^\.nii(\.gz)?$")
9395
- type(sidecar.VolumeTiming) != "null"
9496
checks:
9597
- type(sidecar.RepetitionTime) == "null"
@@ -103,8 +105,8 @@ RepetitionTimeFrameAcquisitionDurationMutex:
103105
(RepetitionTime - FrameAcquisitionDuration).
104106
level: error
105107
selectors:
106-
- type(nifti_header) != "null"
107108
- intersects([suffix], ["asl", "bold"])
109+
- match(extension, "^\.nii(\.gz)?$")
108110
- type(sidecar.FrameAcquisitionDuration) != "null"
109111
checks:
110112
- type(sidecar.RepetitionTime) == "null"
@@ -117,9 +119,10 @@ VolumeTimingDelayTimeMutex:
117119
To specify acquisition duration, use 'FrameAcquisitionDuration' or 'SliceTiming'.
118120
level: error
119121
selectors:
120-
- type(nifti_header) != "null"
121122
- intersects([suffix], ["asl", "bold"])
123+
- match(extension, "^\.nii(\.gz)?$")
122124
- type(sidecar.VolumeTiming) != "null"
125+
- type(sidecar.RepetitionTime) == "null"
123126
checks:
124127
- type(sidecar.DelayTime) == "null"
125128

@@ -130,9 +133,10 @@ VolumeTimingMissingFrameAcquisitionDuration:
130133
The field 'VolumeTiming' requires 'FrameAcquisitionDuration' or 'SliceTiming' to be defined.
131134
level: error
132135
selectors:
133-
- type(nifti_header) != "null"
134136
- intersects([suffix], ["asl", "bold"])
137+
- match(extension, "^\.nii(\.gz)?$")
135138
- type(sidecar.VolumeTiming) != "null"
139+
- type(sidecar.RepetitionTime) == "null"
136140
checks:
137141
- |
138142
"SliceTiming" in sidecar ||
@@ -147,8 +151,8 @@ DeprecatedAcquisitionDuration:
147151
to indicate the duration of volume acquisition in sparse acquisition sequences.
148152
level: warning
149153
selectors:
150-
- type(nifti_header) != "null"
151154
- intersects([suffix], ["asl", "bold"])
155+
- match(extension, "^\.nii(\.gz)?$")
152156
- type(sidecar.VolumeTiming) != "null"
153157
- type(sidecar.FrameAcquisitionDuration) == "null"
154158
checks:

0 commit comments

Comments
 (0)