You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add acquisition duration tracking to BIDS _scans.tsv files (#872)
🚀 Enhancement
New duration column in _scans.tsv, and duration_source telling what it was established from (described, with its levels, in scans.json). See the new docs/duration.rst.
--command populate-scans-duration [--overwrite] [--fix-acq-time] fills them in for already-converted datasets. It fails, after doing the rest, if content it needs cannot be read or a path has no *_scans.tsv.
🐛 Bug Fix
acq_time is now the earliest acquisition timestamp across a run's DICOMs, not whichever sorted first (#875, #876) -- it was typically a few seconds late for interleaved multiband Siemens acquisitions. Re-converting such a run will show an earlier acq_time than before.
dcm2niix's sidecar AcquisitionTime is checked against acq_time and corrected when unambiguously affected by the same bias (dcm2niix#1039).
A _scans.tsv written by an older version, or with custom columns, keeps every value under its own column when rows are added; a re-converted file's row is refreshed.
An existing scans.json gets the descriptions it is missing; a malformed one is now an error at conversion.
JSON sidecars' numeric arrays (e.g. SliceTiming) now stay on one line; re-converting reformats existing sidecars, values unchanged.
⚠️ API
get_formatted_scans_key_row returns 5 values, and add_rows_to_scans_keys_file requires rows of 5 (acq_time, duration, duration_source, operator, randstr); a caller passing 3 gets a ValueError.