niworkflows icon indicating copy to clipboard operation
niworkflows copied to clipboard

Propagate TR from BIDS structure to NIfTI dims

Open oesteban opened this issue 4 years ago • 3 comments

Transfer from poldracklab/fmriprep#1093.

oesteban avatar May 07 '20 23:05 oesteban

This may be obviated by running the BIDS validator first, which will error when the TR doesn't match RepetitionTime or RepetitionTime is missing.

effigies avatar May 08 '20 14:05 effigies

Not really, metadata can be lost (e.g., split and merge). Having this convenience tool will come handy. We're checking other things (units, dtype, xforms...).

oesteban avatar May 08 '20 14:05 oesteban

I guess let's be explicit: You're saying that sometimes we find derivatives don't have pixdim4 set, but other times we do? What could it be conditional on, if not the presence of pixdim4 in the original files, which is checked by the validator? A test case would be useful.

I would also consider it problematic for splitting or merging interfaces to change or lose pixdim4. That would be a good thing to fix, as it's possible that somewhere between validation and sinking derivatives we'll have jobs that actually need the TR. We can pass the TR to some interfaces, but it is metadata that should be stored accurately in the header.

effigies avatar May 08 '20 14:05 effigies