Skip to content

Conversation

@effigies
Copy link
Collaborator

@effigies effigies commented May 15, 2025

Adopts the recommendations from #2040 (comment).

Closes #2040.
Closes bids-standard/bids-validator#183.

@effigies effigies force-pushed the fix/reduce-recommendation-levels branch 2 times, most recently from 86a62a7 to 5d0af72 Compare May 16, 2025 01:23
@effigies effigies force-pushed the fix/reduce-recommendation-levels branch 2 times, most recently from 9e5dd42 to 572364b Compare May 30, 2025 13:40
Copy link
Member

@nellh nellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some testing of this with example datasets and everything here looks good to me.

Copy link
Collaborator Author

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notes for reviewers with links to impacts on the rendered spec.

Comment on lines 163 to 167
{{ MACROS___make_sidecar_table([
"mri.MRIB0FieldIdentifier",
"fmap.MRIFieldmapB0FieldIdentifier",
"mri.MRIEchoPlanarImagingAndB0FieldSource",
])
}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -203 to -222
PhaseEncodingDirectionReq:
selectors:
- datatype == "fmap"
- suffix == "epi"
- match(extension, "^\.nii(\.gz)?$")
fields:
PhaseEncodingDirection:
level: required
issue:
code: PHASE_ENCODING_DIRECTION_MUST_DEFINE
message: |
You have to define 'PhaseEncodingDirection' for this file.
TotalReadoutTime:
level: required
description_addendum: <sup>3</sup>
issue:
code: TOTAL_READOUT_TIME_MUST_DEFINE
message: |
You have to define 'TotalReadoutTime' for this file.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates table in fmap.yaml.

Comment on lines -359 to -365
MRIB0FieldIdentifier:
selectors:
- datatype == 'fmap'
- match(extension, '\.nii(\.gz)?$')
fields:
B0FieldIdentifier: recommended

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates table in fmap.yaml.

Comment on lines +198 to +221
MRIPartialFourier:
selectors:
- modality == "mri"
- match(extension, "^\.nii(\.gz)?$")
- type(sidecar.PartialFourier) != "null"
fields:
PartialFourierDirection: recommended

MRIParallelReductionFactorInPlane:
selectors:
- modality == "mri"
- match(extension, "^\.nii(\.gz)?$")
- type(sidecar.ParallelAcquisitionTechnique) == "string"
fields:
ParallelReductionFactorInPlane: recommended

MRIParallelReductionFactorOutOfPlane:
selectors:
- modality == "mri"
- match(extension, "^\.nii(\.gz)?$")
- type(sidecar.ParallelAcquisitionTechnique) == "string"
- sidecar.MRAcquisitionType == "3D"
fields:
ParallelReductionFactorOutOfPlane: recommended
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional promotions of fields from OPTIONAL to RECOMMENDED, based on other sidecar fields.

Comment on lines +77 to +80
EpochLength:
level: optional
# Implemented in rules.sidecars.electrophys
level_addendum: recommended if RecordingType is "epoched"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(which can be later used for field inhomogeneity correction).
TotalReadoutTime:
level: recommended
description_addendum: <sup>3</sup>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -240 to +263
InversionTime: recommended
InversionTime:
level: optional
level_addendum: required if `inv` entity is present
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -262 to +285
SliceEncodingDirection: recommended
SliceEncodingDirection: optional
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 371 to +372
fields:
MultibandAccelerationFactor: recommended
MultibandAccelerationFactor: optional
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +388 to +398
B0FieldSource:
level: recommended
issue:
code: B0_FIELD_SOURCE_RECOMMENDED
message: |
File is missing B0FieldSource metadata, so it may not be possible to
perform susceptibility distortion correction on it.
B0FieldIdentifier metadata permits the flexible selection of images
for estimating B0 inhomogeneity fields, and B0FieldSource permits EPI
images to indicate the identifier of the estimated field to use.
If associations are fully specified with `IntendedFor`, there is no need to change this.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converts generic sidecar warning to a more helpful message that indicates when it can be safely ignored.

@effigies effigies added the copenhagen For discussion in Copenhagen label Jun 4, 2025
@markmikkelsen
Copy link
Contributor

This looks good to me.

I know that we had recurring conversations when working on the MRS BEP about which fields should be recommended and which should be optional. I think I've come to the conclusion that: 1) any parameter that's needed to correctly and faithfully process (load, preprocess, quality-control) and analyze (run statistical inferences on) a dataset should be required; 2) any parameter that could influence the interpretation of experimental results should be recommended; and 3) any parameter that otherwise could be useful to know (particularly for expert users) but would not change the interpretation of the data outcomes should be optional. But this is coming from a software tools developer who would want a "maximal" amount of information in the metadata.

@christinerogers christinerogers removed their assignment Jun 11, 2025
@nellh nellh removed their assignment Jun 12, 2025
@effigies effigies merged commit df9ea95 into bids-standard:master Jun 17, 2025
24 of 25 checks passed
@effigies effigies deleted the fix/reduce-recommendation-levels branch June 17, 2025 20:32
@effigies effigies changed the title FIX: Rescope or downgrade excess RECOMMENDED fields [FIX] Rescope or downgrade excess RECOMMENDED fields Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copenhagen For discussion in Copenhagen needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning for EpochLength with continuous recording data (MEG) Reduce Cumbersome BIDS Validator Warnings for SIDECAR_KEY_RECOMMENDED Missing Metadata

8 participants