Skip to content

Commit

Permalink
ENH: add schema check to test for consistency between PET imaging dat…
Browse files Browse the repository at this point in the history
…a and metadata
  • Loading branch information
mnoergaard committed Aug 21, 2024
1 parent 9377b20 commit 5f4a366
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/schema/rules/checks/pet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Rules for PET data that are not defined in tables.
---

PETFrameConsistency:
issue:
code: PET_FRAME_CONSISTENCY
message: |
The number of frames in this scan does not match the number of frames (as defined by FrameDuration) in the
associated '.json' file.
level: error
selectors:
- suffix == 'pet'
- type(nifti_header) != "null"
- sidecar.FrameDuration
checks:
- length(sidecar.FrameDuration) == nifti_header.dim[4]

0 comments on commit 5f4a366

Please sign in to comment.