`dwipreproc -eddy_options` not working

Hi all,

We just updated mrtrix from github with the intent of using the new -eddy_option in dwipreproc. Yet the option does not work well:

dwipreproc -pe_dir $dwiphaseencoding DWI_denois.mif DWI_denois_preproc.mif -rpe_none -quiet -nthreads $mrtrixthreads $force -eddy_options "--data_is_shelled"

Error: argument -eddy_options: expected one argument
Usage: dwipreproc input output [ options ]
       (Run dwipreproc -help for more information)

Any help on how to fix this?

Thank you

Hi DorianP,

I noticed the problem as well. For the time being, you can get around it by appending a space to the option value, as in: -eddy_option "--data_is_shelled ".


1 Like

That worked. Thanks.

Thanks for raising this; I can see a lot of people encountering the same issue. Unfortunately this is a problem with the internals of how Python’s argparse module parses the user’s command-line input. This is yet another justification for me to do away with argparse altogether and write my own MRtrix3 Python command-line parser…

Using -eddy_options="--data_is_shelled" (i.e. putting a ‘=’ sign between the option and value rather than a space) also works, as does appending a space to the value string as mentioned by @bjeurissen. I’m adding a relevant instruction to the script’s help page so that hopefully less people will stumble across the same issue.