The changes here are intended to help address two different issues surrounding bids_import and parameter files. This PR is targeted at the 24.1-release branch.
When importing parameter_file values that are a list, do not convert the entire list to a string before join(b8c8e444c883aeff9858986a8329a0af71c0752c). This ensures that the list is joined correctly instead of creating a list of every character from the original value.
Check to ensure parameter_file is not empty before attempting to make any changes to int, or float lists(98b0c5fce679aea0d756fd4c2165253ed4354bfe). This prevents the bids_import.py script from failing if a parameter value contains an empty list.
Example:
before the fix, the image type was saved in parameter_file as [[, ', a, n, a, t, ', ,, , ', _, a, c, q, -, S, K, S, E, T, S, E, p, 3, 0, _, r, u, n, -, 2, 0, 0, 1, _, T, 2, w, ', ]]
after the fix, the lists are correctly saved as [anat, _acq-SKSETSEp30_run-2001_T2w]
Notes for existing projects: this bug affects only projects that use one of the python scripts to insert images as BIDS into LORIS. This bug does not affect the standard perl dcm2mnc pipeline.
Description
The changes here are intended to help address two different issues surrounding bids_import and parameter files. This PR is targeted at the
24.1-release
branch.bids_import.py
script from failing if a parameter value contains an empty list.Example:
parameter_file
as[[, ', a, n, a, t, ', ,, , ', _, a, c, q, -, S, K, S, E, T, S, E, p, 3, 0, _, r, u, n, -, 2, 0, 0, 1, _, T, 2, w, ', ]]
[anat, _acq-SKSETSEp30_run-2001_T2w]
Notes for existing projects: this bug affects only projects that use one of the python scripts to insert images as BIDS into LORIS. This bug does not affect the standard perl dcm2mnc pipeline.