Skip to content

Commit

Permalink
FIX: Add MRS events files, restrict sidecar metadata checks to data f…
Browse files Browse the repository at this point in the history
…iles
  • Loading branch information
effigies committed Jul 25, 2024
1 parent ae8bd87 commit 804b339
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/schema/rules/files/raw/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ events__pet:
reconstruction: optional
run: optional

events__mrs:
$ref: rules.files.raw.task.events
datatypes:
- mrs
entities:
$ref: rules.files.raw.task.events.entities
reconstruction: optional
nucleus: optional
volume: optional

timeseries__func:
$ref: rules.files.raw.task.timeseries
datatypes:
Expand Down
13 changes: 13 additions & 0 deletions src/schema/rules/sidecars/mrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
MRSScannerHardware:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
InstitutionName: recommended
InstitutionAddress: recommended
Expand All @@ -27,6 +28,7 @@ MRSScannerHardware:
MRSSample:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
BodyPart:
level: optional
Expand All @@ -40,6 +42,7 @@ MRSSample:
MRSSampleVOI:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- '"volume" in entities'
fields:
BodyPart: required
Expand All @@ -48,6 +51,7 @@ MRSSampleVOI:
MRSSequenceSpecifics:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
PulseSequenceType:
level: recommended
Expand All @@ -65,6 +69,7 @@ MRSSequenceSpecifics:
MRSRequiredFields:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
ResonantNucleus: required
SpectrometerFrequency: required
Expand All @@ -74,6 +79,7 @@ MRSRequiredFields:
MRSRecommendedFields:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
NumberOfSpectralPoints: recommended
MixingTime: recommended
Expand All @@ -84,6 +90,7 @@ MRSRecommendedFields:
MRSRepetitionTime:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- '!("VolumeTiming" in sidecar)'
fields:
RepetitionTime:
Expand All @@ -93,6 +100,7 @@ MRSRepetitionTime:
MRSVolumeTiming:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- '!("RepetitionTime" in sidecar)'
fields:
VolumeTiming:
Expand All @@ -102,6 +110,7 @@ MRSVolumeTiming:
MRSConditionalInversionTime:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- entities.inversion
fields:
InversionTime:
Expand All @@ -111,6 +120,7 @@ MRSConditionalInversionTime:
MRSConditionalAnatomicalImage:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- intersects(dataset.datatypes, ["anat"])
fields:
AnatomicalImage:
Expand All @@ -120,6 +130,7 @@ MRSConditionalAnatomicalImage:
MRSConditionalNumTransients:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- intersects([suffix], ["svs", "unloc"])
fields:
NumberOfTransients:
Expand All @@ -129,6 +140,7 @@ MRSConditionalNumTransients:
MRSIRecommendedFields:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
- suffix == "mrsi"
fields:
MRAcquisitionType:
Expand All @@ -147,6 +159,7 @@ MRSIRecommendedFields:
MRSOptionalFields:
selectors:
- modality == "mrs"
- match(extension, "^\.nii(\.gz)?$")
fields:
ChemicalShiftOffset: optional
ChemicalShiftReference: optional
Expand Down

0 comments on commit 804b339

Please sign in to comment.