DCAN-Labs / abcd-hcp-pipeline

bids application for processing functional MRI data, robust to scanner, acquisition and age variability.
https://hub.docker.com/r/dcanumn/abcd-hcp-pipeline
BSD 3-Clause "New" or "Revised" License
49 stars 19 forks source link

ENH: Fieldmap selection #24

Open richardbeare opened 4 years ago

richardbeare commented 4 years ago

The indenting in the previous version was strange, and I think testing for success may have been wrong in some cases, in that warnings about failure could be issued before the search was complete.

dcm2bids doesn't create lists for the IntendedFor field when a single target is provided. This breaks the original tests, which used a ' '.join syntax and thus created strings separated by spaces when provided with a string. This meant the correct field map was never found.

I have forced the result into a list if it isn't already, adjusted the indenting and modified the failure test.

The join option could be used because it allows paths without a session field to be matched as substrings.

Recent versions of dcm2bids include the session field.