While trying to compute DTI maps on a subject I jumped into the following error:
sct_dmri_compute_dti -i kurtosis_crop_moco.nii.gz -bval bvals -bvec bvecs -method restore -m kurtosis_crop_moco_dwi_mean_seg_dil.nii.gz -- Spinal Cord Toolbox (4.1.0) data.shape (42, 42, 16, 32) Open mask file... Computing tensor using "restore" method... Traceback (most recent call last): File "/home/rosella/sct_4.1.0/scripts/sct_dmri_compute_dti.py", line 208, in <module> main() File "/home/rosella/sct_4.1.0/scripts/sct_dmri_compute_dti.py", line 120, in main if not compute_dti(fname_in, fname_bvals, fname_bvecs, prefix, method, evecs, file_mask): File "/home/rosella/sct_4.1.0/scripts/sct_dmri_compute_dti.py", line 172, in compute_dti tenfit = dti_restore.fit(data, mask) File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/dipy/reconst/dti.py", line 793, in fit **self.kwargs) File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/dipy/reconst/dti.py", line 1862, in restore_fit_tensor Dfun=_nlls_jacobian_func) File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/scipy/optimize/minpack.py", line 392, in leastsq raise TypeError('Improper input: N=%s must not exceed M=%s' % (n, m)) TypeError: Improper input: N=7 must not exceed M=5