bids-specification
bids-specification copied to clipboard
[BUG] Inconsistent level for `MagneticFieldStrength` in sidecar rules of schema
Describe your problem in detail.
In schema/rules/sidecars/mri.yaml,
the level for MagneticFieldStrength is stated as recommended, but required for Arterial Spin Labeling,
which is inconsistent with levels for other metadata fields, that only provide just level value.
Same issue with NonLinearGradientCorrection below.
Describe what you expected.
The , but required for Arterial Spin Labeling moved into level_addendum, as it is done for other metadata (for. ex EffectiveEchoSpacing)
List of possible inconsitencies
Putting all inconsistencies and possible errors that I found here:
- [ ]
mri/MagneticFieldStrengthrequirement level is not just 'optional' - [ ]
mri/MRIScannerHardwareASL:suffix == "asl"contradictsintersects([suffix], ["asl", "m0scan"]) - [ ]
anat/TaskMetadatarefers to entities list asentity.task != null, but inentity_rules, entities are queried asentities - [ ]
nirsreferes to sidecar asjson, instead ofsidecarin other rules - [ ]
pet, func, dwi, anat, fmap: extension check are defined inrules/files, and not needed in sidecar - [ ]
mri/MRIHardware: fieldHardcopyDeviceSoftwareVersionis marked asDEPRECATED, while in other similar cases (in eeg for ex.) deprecated is written in all small caps - [ ] rules for datatype
perfare stored in fileasl.yaml, and not asperf.yaml - [ ] Sidecar meta fields
MISCChannelCountis duplicated asMiscChannelCount. First one is used i eeg, second one in meg - [ ]
func:VolumeTiming: requirements forAcquisitionDurationandSliceTimingare not defined
Another issue with shema:
Selector for rules/sidecars/mri/MRIScannerHardwareASL is:
datatype == "perf"
suffix == "asl"
intersects([suffix], ["asl", "m0scan"])
Is it applicable only for suffix asl or for both asl and m0scan
level: <level>, <addendum> is an accidental shorthand that takes advantage of the behavior of the validator and the renderer. I'm okay with forcing consistency, though, if you would like to open a PR. If so, would you be able to also update the metaschema? I believe this line is what currently allows the above, and could be removed:
https://github.com/bids-standard/bids-specification/blob/3fd21ff095ecc9ac8e2b7bf092f5ee09e055e45b/src/metaschema.json#L668
For the MRIScannerHardwareASL, the selectors are AND-combined, so the second line should be removed, to allow it to apply to m0scans.
Dear, @effigies , I could do do PR, but I still feel quite unfamiliar with the structure of schema. And I'm unsure what is just historical inconsistency and what is made on purpose.
For example, sometimes deprecated levels are are written in all caps, and sometimes lowercase, also at some places extensions are selected by match and in other cases, from a list.
As this schema is used to generate BIDS documentation, I'm afraid to brake something.
I've updated list of inconsistencies in issue.
Can you confirm that they are indeed problematic, and I will make a PR.