Dwifslpreproc discrepancy when running eddy vs eddy_cuda9.1

Hello MRtrix experts,

I am relatively new to this forum and toolboxes. I have been working with your documentation site and community forum, but there are a couple of questions I didn’t really find the answers to. Your expertise and experience will be greatly helpful!

The two questions I would like to ask here is because I noticed some discrepancies when running eddy vs eddy_cuda. Eddy completes without any noticeable issues, but eddy_cuda outputs show two differences. Upon a further examination with -debug option, I think it is still doing the correct step (almost), but want to confirm that this is not by a chance. Below are more detailed descriptions.

System: Within Singularity Ubuntu 16.04 with ANTs-2.3.1, FSL-6.0.1, MRtrix3-3.0.2, Eddy Cuda9.1.

First, the main difference between the two commands is that I include the slice-to-volume correction with eddy_cuda command. These are the commands I ran for eddy and eddy_cuda:

Eddy: dwifslpreproc dwi_denoised_degibbs.mif dwi_denoised_degibbs_preproc.mif -nocleanup -scratch test -pe_dir PA -rpe_pair -se_epi dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -align_seepi -debug -force -nthreads 8 -eddyqc_all test -eddy_options --repol --slm=quadratic --estimate_move_by_susceptibility --data_is_shelled --verbose

Eddy_cuda: dwifslpreproc dwi_denoised_degibbs.mif dwi_denoised_degibbs_preproc.mif -debug -nocleanup -scratch test -pe_dir PA -rpe_pair -se_epi dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -align_seepi -force -eddyqc_all test -eddy_slspec /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt -eddy_options --repol --slm=quadratic --estimate_move_by_susceptibility --mporder=8 --s2v_niter=8 --data_is_shelled --verbose

Q1) The first discrepancy I noticed was from the “No slice encoding direction information present” with eddy_cuda even with -pe_dir PA option, while eddy didn’t show this with -info option. Eddy_cuda message: “dwifslpreproc: No slice encoding direction information present; assuming third axis corresponds to slices”. However, it seems to still take the correct PA direction based on (from dwifslpreproc:312) line. I want to understand whether MRtrix3 internally double-checks this information or will this not be the case for all my data? Below is the debugging message from the beginning to the relevant point.

Eddy debugging texts:

dwifslpreproc dwi_denoised_degibbs.mif dwi_denoised_degibbs_preproc.mif -nocleanup -scratch test -pe_dir PA -rpe_pair -se_epi dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -align_seepi -debug -force -nthreads 8 -eddyqc_all test -eddy_options " --repol --slm=quadratic --estimate_move_by_susceptibility --data_is_shelled --verbose "
dwifslpreproc: 
dwifslpreproc: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
dwifslpreproc: 
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:92): dwi_denoised_degibbs.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/mrtrix-tmp-3SfwFx.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif'
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): ['/mrtrix3/bin/mrinfo', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/mrtrix-tmp-3SfwFx.json']
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, 0.0, -112.48681640625], [0.0, 0.983254907885676, -0.182235523756294, -94.6155548095703], [-0.0, 0.182235523756294, 0.983254907885676, -95.3759384155273], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif', '_keyval': {u'command_history': [u'mrconvert -fslgrad /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.bvec /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.bval /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.nii /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/input/dwi.mif -info  (version=3.0.2-37-gf2fb3005)', u'dwidenoise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/input/dwi.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised.mif -noise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_noised.mif -info  (version=3.0.2-37-gf2fb3005)', u"mrdegibbs -axes '0,1' -info /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif  (version=3.0.2-37-gf2fb3005)"],
dwifslpreproc: [DEBUG] image.check_3d_nonunity() (from dwifslpreproc:92): Image '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif' is >= 3D, and does not contain a unity spatial dimension
dwifslpreproc: [DEBUG] fsl.exe_name() (from dwifslpreproc:119): topup
dwifslpreproc: [DEBUG] fsl.exe_name() (from dwifslpreproc:120): applytopup
dwifslpreproc: [DEBUG] fsl.eddy_binary() (from dwifslpreproc:122): Selected soft-linked CUDA version ('eddy_cuda')
dwifslpreproc: [DEBUG] fsl.suffix() (from dwifslpreproc:124): NIFTI -> .nii
dwifslpreproc: [WARNING] Output file 'dwi_denoised_degibbs_preproc.mif' already exists; will be overwritten at script completion
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:139): test -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test
dwifslpreproc: Generated scratch directory: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:181): dwi.json -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.json
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:182): dwi_denoised_degibbs.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:182): dwi.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:182): To execute: [['/mrtrix3/bin/mrconvert', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif', '-json_export', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.json', '-nthreads', '8', '-info']]
Command:  mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif -json_export /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.json
          mrconvert: [INFO] opening image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] creating image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif" created with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [100%] copying from "/data/data...ed/dwi_denoised_degibbs.mif" to "/data/data...wipreprocessed/test/dwi.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif"...
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:184): dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-tk7DYr.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif'
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): ['/mrtrix3/bin/mrinfo', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-tk7DYr.json']
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, -0.0, -112.48681640625], [-0.0, 0.983254907828709, -0.18223552406366, -94.6155548095703], [0.0, 0.18223552406366, 0.983254907828709, -95.3759384155273], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '_keyval': {u'command_history': [u'variable', u'mrcat /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/rev_dwipreprocessed/b0_rev_degibbs_MC_AVG.mif -axis 3 /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -info  (version=3.0.2-37-gf2fb3005)'], u'mrtrix_version': u'3.0.2-37-gf2fb3005'}, '_size': [116, 116, 81, 2], '_spacing': [2.0, 2.0, 2.0, None], '_strides': [-1, 3, 4, 2]}
dwifslpreproc: [DEBUG] image.check_3d_nonunity() (from dwifslpreproc:184): Image '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif' is >= 3D, and does not contain a unity spatial dimension
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:185): dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:185): se_epi.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:185): To execute: [['/mrtrix3/bin/mrconvert', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif', '-nthreads', '8', '-info']]
Command:  mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif
          mrconvert: [INFO] opening image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif" opened with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [INFO] no valid diffusion gradient table found
          mrconvert: [INFO] error importing diffusion gradient table for image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif"
          mrconvert: [INFO] creating image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif" created with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [100%] copying from "/data/data..._AVG_rev_b0_MC_AVE_pair.mif" to "/data/data...reprocessed/test/se_epi.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif"...
dwifslpreproc: Changing to scratch directory (/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test)
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-r0FF5p.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file 'dwi.mif'
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:193): ['/mrtrix3/bin/mrinfo', 'dwi.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-r0FF5p.json']
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:193): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, 0.0, -112.48681640625], [0.0, 0.983254907885676, -0.182235523756294, -94.6155548095703], [-0.0, 0.182235523756294, 0.983254907885676, -95.3759384155273], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'dwi.mif', '_keyval': {u'command_history': [u'mrconvert -fslgrad /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.bvec /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.bval /data/data05/Studies/MCSA/RAW/MRI/NI004_20190401/ADNI3_MB3_ep2d_diff_PA.nii /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/input/dwi.mif -info  (version=3.0.2-37-gf2fb3005)', u'dwidenoise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/input/dwi.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised.mif -noise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_noised.mif -info  (version=3.0.2-37-gf2fb3005)', u"mrdegibbs -axes '0,1' -info /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif  (version=3.0.2-37-gf2fb3005)", u'/mrtrix3/bin/mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.mif -json_export /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/dwi.json -nthreads 8 -info  (version=3.0.2-37-gf2fb3005)'], 
dwifslpreproc: [DEBUG] execute() (from app.py:197): Number of DWI volumes: 127
dwifslpreproc: [DEBUG] execute() (from app.py:197): Number of DWI slices: 81
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-HCZ12k.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file 'se_epi.mif'
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:202): ['/mrtrix3/bin/mrinfo', 'se_epi.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-HCZ12k.json']
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:202): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, -0.0, -112.48681640625], [-0.0, 0.983254907828709, -0.18223552406366, -94.6155548095703], [0.0, 0.18223552406366, 0.983254907828709, -95.3759384155273], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'se_epi.mif', '_keyval': {u'command_history': [u'variable', u'mrcat /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/rev_dwipreprocessed/b0_rev_degibbs_MC_AVG.mif -axis 3 /data/data05/peter/ws/test/gpu_2slots_test//CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -info  (version=3.0.2-37-gf2fb3005)', u'/mrtrix3/bin/mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/se_epi.mif -nthreads 8 -info  (version=3.0.2-37-gf2fb3005)'], u'mrtrix_version': u'3.0.2-37-gf2fb3005'}, '_size': [116, 116, 81, 2], '_spacing': [2.0, 2.0, 2.0, None], '_strides': [-1, 3, 4, 2]}
dwifslpreproc: [DEBUG] phaseencoding.direction() (from dwifslpreproc:312): pa -> [0, 1, 0]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual PE direction: [0.0, 1.0, 0.0]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual readout time: None
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:150): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:150): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Command: '/mrtrix3/bin/mrinfo dwi.mif -shell_indices' (piping data to local storage)
dwifslpreproc: Result: 0,1,5,18,31,46,59,72,85,98,110,119,124 22,43,65,89,114,122 3,7,9,11,13,15,17,20,23,25,27,29,33,35,37,39,41,44,48,50,52,54,56,58,61,63,66,68,70,74,76,78,80,82,84,87,90,92,94,96,100,102,104,106,108,112,115,117 2,4,6,8,10,12,14,16,19,21,24,26,28,30,32,34,36,38,40,42,45,47,49,51,53,55,57,60,62,64,67,69,71,73,75,77,79,81,83,86,88,91,93,95,97,99,101,103,105,107,109,111,113,116,118,120,121,123,125,126
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual DWI PE scheme for 'Pair' PE design: [[0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1]]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual SEEPI PE scheme for 'Pair' PE design: [[0.0, 1.0, 0.0, 0.1], [0.0, -1.0, 0.0, 0.1]]
dwifslpreproc: Total readout time not provided at command-line; assuming sane default of 0.1
dwifslpreproc: [DEBUG] execute() (from app.py:197): Index of first b=0 image in DWIs is 0
dwifslpreproc: [DEBUG] image.match() (from dwifslpreproc:515): 'dwi.mif' 'se_epi.mif' image match
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:626): To execute: [['/mrtrix3/bin/mrconvert', 'dwi.mif', 'dwi_first_bzero.mif', '-coord', '3', '0', '-axes', '0,1,2', '-nthreads', '8', '-info']]
Command:  mrconvert dwi.mif dwi_first_bzero.mif -coord 3 0 -axes 0,1,2
          mrconvert: [INFO] opening image "dwi.mif"...
          mrconvert: [INFO] image "dwi.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] creating image "dwi_first_bzero.mif"...
          mrconvert: [INFO] image "dwi_first_bzero.mif" created with dimensions 116x116x81, voxel spacing 2x2x2, datatype Float32LE
          mrconvert: [100%] copying from "dwi.mif" to "dwi_first_bzero.mif"
          mrconvert: [INFO] writing back contents of mapped file "dwi_first_bzero.mif"...
dwifslpreproc: Balanced phase-encoding scheme detected in SE-EPI series; volume 0 will be removed and replaced with first b=0 from DWIs
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrcat -> mrcat
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrcat: /mrtrix3/bin/mrcat
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrcat": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:638): To execute: [['/mrtrix3/bin/mrconvert', 'se_epi.mif', '-', '-coord', '3', '1', '-nthreads', '8', '-info'], ['/mrtrix3/bin/mrcat', 'dwi_first_bzero.mif', '-', 'se_epi_firstdwibzero.mif', '-axis', '3', '-nthreads', '8', '-info']]
Command:  mrconvert se_epi.mif - -coord 3 1 | mrcat dwi_first_bzero.mif - se_epi_firstdwibzero.mif -axis 3
          mrconvert: [INFO] opening image "se_epi.mif"...
          mrconvert: [INFO] image "se_epi.mif" opened with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [INFO] no valid diffusion gradient table found
          mrconvert: [INFO] error importing diffusion gradient table for image "se_epi.mif"
          mrconvert: [INFO] creating image "-"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-sQptnm.mif" created with dimensions 116x116x81x1, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [100%] copying from "se_epi.mif" to "/data/data.../test/mrtrix-tmp-sQptnm.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-sQptnm.mif"...
          mrcat: [INFO] opening image "dwi_first_bzero.mif"...
          mrcat: [INFO] image "dwi_first_bzero.mif" opened with dimensions 116x116x81, voxel spacing 2x2x2, datatype Float32LE
          mrcat: [INFO] opening image "-"...
          mrcat: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-sQptnm.mif" opened with dimensions 116x116x81x1, voxel spacing 2x2x2xnan, datatype Float32LE
          mrcat: [INFO] found 1x4 diffusion gradient table
          mrcat: [INFO] creating image "se_epi_firstdwibzero.mif"...
          mrcat: [INFO] image "se_epi_firstdwibzero.mif" created with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrcat: [100%] concatenating "dwi_first_bzero.mif"
          mrcat: [100%] concatenating "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/mrtrix-tmp-sQptnm.mif"
          mrcat: [INFO] writing back contents of mapped file "se_epi_firstdwibzero.mif"...
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrinfo": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:732): To execute: [['/mrtrix3/bin/mrinfo', 'dwi.mif', '-export_grad_mrtrix', 'grad.b', '-nthreads', '8', '-info']]
Command:  mrinfo dwi.mif -export_grad_mrtrix grad.b
          mrinfo: [INFO] opening image "dwi.mif"...
          mrinfo: [INFO] image "dwi.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrinfo: [INFO] found 127x4 diffusion gradient table
dwifslpreproc: 1 spatial axis of DWIs has non-even size; this will be automatically padded for compatibility with topup, and the extra slice erased afterwards

Eddy_cuda debugging texts:

dwifslpreproc dwi_denoised_degibbs.mif dwi_denoised_degibbs_preproc.mif -debug -nocleanup -scratch /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test -pe_dir PA -rpe_pair -se_epi dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -align_seepi -force -eddyqc_all /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test -eddy_slspec /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt -eddy_options " --repol --slm=quadratic --estimate_move_by_susceptibility --mporder=8 --s2v_niter=8 --data_is_shelled --verbose "
dwifslpreproc: 
dwifslpreproc: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
dwifslpreproc: 
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:92): dwi_denoised_degibbs.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/mrtrix-tmp-JBB3k1.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif'
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): ['/mrtrix3/bin/mrinfo', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/mrtrix-tmp-JBB3k1.json']
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, 0.0, -112.073822021484], [0.0, 0.971134279142203, -0.238533460703008, -88.2472915649414], [-0.0, 0.238533460703008, 0.971134279142203, -101.28231048584], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif', '_keyval': {u'command_history': [u'mrconvert -fslgrad /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.bvec /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.bval /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.nii /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/input/dwi.mif -info  (version=3.0.2-37-gf2fb3005)', u'dwidenoise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/input/dwi.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised.mif -noise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_noised.mif -info  (version=3.0.2-37-gf2fb3005)', u"mrdegibbs -axes '0,1' -info /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif  (version=3.0.2-37-gf2fb3005)"], u'dw_scheme': [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.04042401157, -0.9756217204, -0.2157038663, 2000.0], [0.4375082135, -0.3351726005, 0.8344135012, 1000.0], [0.6797059899, 0.2069365453, -0.703688165, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.7005522051, -0.7111532073, 0.05905695234, 2000.0], [-0.5103580775, -0.3991519751, -0.7617167016, 1000.0], [-0.9712073738, 0.1893456037, 0.1445838148, 2000.0], [0.1500330445, -0.03069531208, -0.9882043733, 1000.0], [0.4221388421, -0.8834572644, 0.2032290827, 2000.0], [0.5696286052, -0.7211653406, -0.394263622, 1000.0], [-0.9198025606, -0.37793014, -0.1055085727, 2000.0], [0.8504204414, -0.4931112786, 0.1833748612, 1000.0], [0.771686157, -0.3183243298, 0.5506088413, 2000.0], [0.1502309544, -0.4268095867, -0.8917758895, 1000.0], [0.522981787, -0.7038788553, 0.4806709971, 2000.0], [-0.3915750118, 0.6159637312, 0.6835625004, 1000.0], [0.0, 0.0, 0.0, 0.0], [0.4274771073, 0.3857809764, -0.8175795747, 2000.0], [-0.7344474709, 0.670317379, 0.1061203275, 1000.0], [-0.3333339031, 0.04538689283, -0.9417157421, 2000.0], [0.2608360475, 0.8569593435, -0.4445056128, 500.0], [0.1024400072, -0.7656044664, -0.6351030199, 1000.0], [-0.7541382243, -0.4317804997, 0.4948142467, 2000.0], [-0.1826360012, -0.2385261512, -0.9538078246, 1000.0], [0.8609349435, -0.2885791333, -0.4189428444, 2000.0], [-0.006446998151, 0.7946093219, -0.607086865, 1000.0], [-0.8660620702, -0.4610862724, 0.1932251017, 2000.0], [0.5856322537, 0.7762448745, 0.2334068513, 1000.0], [0.6092097907, 0.7128031941, -0.3475270312, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.181982042, -0.9817676958, 0.05490653711, 2000.0], [-0.239228164, 0.9105877343, 0.3370457887, 1000.0], [0.3256818489, 0.8742100098, 0.3601224682, 2000.0], [0.7232921856, -0.07782665708, -0.6861424238, 1000.0], [0.6369318762, 0.1467004678, 0.7568333752, 2000.0], [-0.2979870907, -0.5987815019, 0.7434140211, 1000.0], [0.1535739997, 0.7557970277, 0.636542127, 2000.0], [0.2159879215, 0.3268498524, -0.9200643411, 1000.0], [-0.3632548075, 0.7801831482, 0.5092741895, 2000.0], [0.1571159734, 0.5797094535, 0.7995320634, 1000.0], [-0.7548961233, 0.5723716665, 0.3201913778, 2000.0], [-0.5359190824, -0.5998627238, -0.5941005384, 500.0], [0.3509630058, -0.6810515935, 0.6426458554, 1000.0], [0.5430966961, -0.05893142643, -0.8375995856, 2000.0], [0.0, 0.0, 0.0, 0.0], [0.7521072706, 0.6134737606, 0.2407999138, 2000.0], [-0.7254882763, 0.1300474222, -0.6758360962, 1000.0], [-0.4932231674, -0.6116424429, 0.6185664307, 2000.0], [0.7806341499, 0.2093159981, 0.5888948438, 1000.0], [0.1441579851, -0.657805114, 0.7392637603, 2000.0], [0.8937070686, -0.1931946497, 0.4049240705, 1000.0], [0.9557940187, -0.003156756559, 0.2940201161, 2000.0], [-0.2362650534, 0.9175736789, -0.3197457871, 1000.0], [-0.03746000331, -0.9059771733, 0.4216658743, 2000.0], [0.5327530253, 0.8353475924, -0.1355308596, 1000.0], [-0.6600471408, 0.2920512135, 0.6921299449, 2000.0], [0.9562068789, 0.2690736501, -0.1151858308, 1000.0], [0.0, 0.0, 0.0, 0.0], [0.5810039297, -0.5789795274, -0.5720289683, 2000.0], [-0.4663899172, 0.2619471438, 0.8449048106, 1000.0], [-0.3015670229, -0.1207727623, 0.945764913, 2000.0], [-0.5056410725, -0.1576992595, 0.8482087298, 1000.0], [-0.8568079677, -0.316434608, -0.4071231328, 2000.0], [-0.9823845924, -0.0387543994, 0.1828075739, 500.0], [-0.8265952827, -0.5618618501, -0.0324268406, 1000.0], [0.0223419945, 0.2417317018, -0.9700858826, 2000.0], [-0.8316486777, -0.2299520936, 0.5054527787, 1000.0], [-0.3664039919, -0.5662504622, -0.7383146543, 2000.0], [-0.9903107081, 0.1253749273, -0.05971456271, 1000.0], [0.4753920522, 0.8764921688, 0.07592018637, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.9333060493, 0.2955894174, -0.2038791666, 2000.0], [0.6122179063, 0.4381064261, -0.6582188045, 1000.0], [-0.1250259877, -0.5242716293, 0.8423228366, 2000.0], [-0.7303029776, 0.4200883355, 0.5386866912, 1000.0], [0.8703027686, -0.4915751546, -0.03044599163, 2000.0], [-0.9482227553, -0.2070645982, -0.2408274454, 1000.0], [0.07365197107, 0.4180278346, 0.9054436021, 2000.0], [0.8972250158, -0.3873261352, -0.2120512579, 1000.0], [-0.6802198885, 0.7271927219, -0.09215014058, 2000.0], [0.7395918424, 0.5174678033, 0.4303846874, 1000.0], [0.2249849205, -0.2350629146, -0.945583001, 2000.0], [0.453449024, -0.8912750507, -0.003573049879, 1000.0], [0.0, 0.0, 0.0, 0.0], [-0.2816100788, 0.9503078058, 0.1327058318, 2000.0], [0.1269559896, 0.8960152598, 0.4254865813, 1000.0], [-0.1231849332, 0.9801406074, -0.1554022584, 2000.0], [0.6149470183, -0.3773519207, 0.6924201705, 500.0], [-0.283517067, -0.9509158251, -0.1240047026, 1000.0], [0.2091758425, 0.7542239175, -0.6224080246, 2000.0], [-0.9339762163, 0.07146668472, 0.3501156099, 1000.0], [-0.8320928025, -0.001113015984, -0.5546353119, 2000.0], [-0.09030994789, 0.5014582312, -0.8604555513, 1000.0], [-0.3737170488, -0.2782744995, -0.8848157268, 2000.0], [-0.383709782, -0.7346315387, -0.5595384755, 1000.0], [0.6562100126, 0.4304636587, 0.6197495122, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.3853580325, 0.451674986, 0.8046669459, 2000.0], [-0.6648190404, 0.514580663, -0.5415001245, 1000.0], [0.0514109913, 0.08191096677, 0.9953127667, 2000.0], [0.5878952675, -0.7533797373, 0.2946152166, 1000.0], [0.367020925, 0.8881705197, -0.2764937042, 2000.0], [-0.7518069649, -0.5734697054, 0.3254516623, 1000.0], [0.9334032388, 0.1717664617, -0.3150471019, 2000.0], [0.489703125, 0.05388949977, 0.8702222539, 1000.0], [0.08659999533, -0.8788255399, -0.4692186177, 2000.0], [-0.1482259887, -0.9538665399, 0.2610894105, 1000.0], [0.2491169423, -0.369571674, 0.8951857499, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.2467191276, 0.8285833954, -0.5025726107, 2000.0], [0.1604450189, -0.1482288906, 0.975851214, 1000.0], [0.7581989155, -0.5502010356, 0.3498760137, 2000.0], [-0.3470960386, 0.07224546861, 0.9350427435, 500.0], [-0.07035398212, 0.9967893482, 0.0382271171, 1000.0], [-0.476367948, 0.514180528, -0.7132264457, 2000.0], [0.4314331376, 0.7697004529, -0.4705599436, 1000.0], [-0.5750718913, 0.180150966, -0.7980212712, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.8374760637, 0.007188451856, 0.5464267279, 2000.0], [0.1299649775, -0.6266017266, -0.7684265618, 2000.0], [0.41998489, -0.8613871722, -0.285700598, 500.0], [0.9956633473, 0.09242929462, 0.01055103874, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.5559818905, -0.704671315, -0.44082023, 2000.0], [0.5640059856, -0.8041087899, -0.1878997133, 2000.0]], u'mrtrix_version': u'3.0.2-37-gf2fb3005', u'comments': [u'NI005', u'phase=y;readout=0.0644;dwell=0.56;TE=71;time=20200120111058.140;']}, '_size': [116, 116, 81, 127], '_spacing': [2.0, 2.0, 2.0, 3.5], '_strides': [-1, 2, 3, 4]}
dwifslpreproc: [DEBUG] image.check_3d_nonunity() (from dwifslpreproc:92): Image '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif' is >= 3D, and does not contain a unity spatial dimension
dwifslpreproc: [DEBUG] fsl.exe_name() (from dwifslpreproc:119): topup
dwifslpreproc: [DEBUG] fsl.exe_name() (from dwifslpreproc:120): applytopup
dwifslpreproc: [DEBUG] fsl.eddy_binary() (from dwifslpreproc:122): Selected soft-linked CUDA version ('eddy_cuda')
dwifslpreproc: [DEBUG] fsl.suffix() (from dwifslpreproc:124): NIFTI -> .nii
dwifslpreproc: [WARNING] Output file 'dwi_denoised_degibbs_preproc.mif' already exists; will be overwritten at script completion
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:139): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:170): /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt -> /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt
dwifslpreproc: Generated scratch directory: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:181): dwi.json -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.json
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:182): dwi_denoised_degibbs.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:182): dwi.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:182): To execute: [['/mrtrix3/bin/mrconvert', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif', '-json_export', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.json', '-info']]
Command:  mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif -json_export /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.json
          mrconvert: [INFO] opening image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] creating image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif" created with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [100%] copying from "/data/data...ed/dwi_denoised_degibbs.mif" to "/data/data...lpreproc-tmp-8DYM6N/dwi.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif"...
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:184): dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-LH1XGY.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif'
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): ['/mrtrix3/bin/mrinfo', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-LH1XGY.json']
dwifslpreproc: [DEBUG] image.__init__() (from image.py:134): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, -0.0, -112.073822021484], [-0.0, 0.971134277114462, -0.238533468958491, -88.2472915649414], [0.0, 0.238533468958491, 0.971134277114462, -101.28231048584], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '_keyval': {u'command_history': [u'variable', u'mrcat /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/rev_dwipreprocessed/b0_rev_degibbs_MC_AVG.mif -axis 3 /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -info  (version=3.0.2-37-gf2fb3005)'], u'mrtrix_version': u'3.0.2-37-gf2fb3005'}, '_size': [116, 116, 81, 2], '_spacing': [2.0, 2.0, 2.0, None], '_strides': [-1, 3, 4, 2]}
dwifslpreproc: [DEBUG] image.check_3d_nonunity() (from dwifslpreproc:184): Image '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif' is >= 3D, and does not contain a unity spatial dimension
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:185): dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif
dwifslpreproc: [DEBUG] path.to_scratch() (from dwifslpreproc:185): se_epi.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:185): To execute: [['/mrtrix3/bin/mrconvert', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif', '-info']]
Command:  mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif
          mrconvert: [INFO] opening image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif" opened with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [INFO] no valid diffusion gradient table found
          mrconvert: [INFO] error importing diffusion gradient table for image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif"
          mrconvert: [INFO] creating image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif" created with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [100%] copying from "/data/data..._AVG_rev_b0_MC_AVE_pair.mif" to "/data/data...eproc-tmp-8DYM6N/se_epi.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif"...
dwifslpreproc: Changing to scratch directory (/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/)
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-fBjiqH.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file 'dwi.mif'
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:193): ['/mrtrix3/bin/mrinfo', 'dwi.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-fBjiqH.json']
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:193): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, 0.0, -112.073822021484], [0.0, 0.971134279142203, -0.238533460703008, -88.2472915649414], [-0.0, 0.238533460703008, 0.971134279142203, -101.28231048584], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'dwi.mif', '_keyval': {u'command_history': [u'mrconvert -fslgrad /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.bvec /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.bval /data/data05/Studies/MCSA/RAW/MRI/NI005_20200120/ADNI3_MB3_ep2d_diff_PA.nii /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/input/dwi.mif -info  (version=3.0.2-37-gf2fb3005)', u'dwidenoise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/input/dwi.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised.mif -noise /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_noised.mif -info  (version=3.0.2-37-gf2fb3005)', u"mrdegibbs -axes '0,1' -info /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif  (version=3.0.2-37-gf2fb3005)", u'/mrtrix3/bin/mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.mif -json_export /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/dwi.json -info  (version=3.0.2-37-gf2fb3005)'], u'dw_scheme': [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.04042401157, -0.9756217204, -0.2157038663, 2000.0], [0.4375082135, -0.3351726005, 0.8344135012, 1000.0], [0.6797059899, 0.2069365453, -0.703688165, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.7005522051, -0.7111532073, 0.05905695234, 2000.0], [-0.5103580775, -0.3991519751, -0.7617167016, 1000.0], [-0.9712073738, 0.1893456037, 0.1445838148, 2000.0], [0.1500330445, -0.03069531208, -0.9882043733, 1000.0], [0.4221388421, -0.8834572644, 0.2032290827, 2000.0], [0.5696286052, -0.7211653406, -0.394263622, 1000.0], [-0.9198025606, -0.37793014, -0.1055085727, 2000.0], [0.8504204414, -0.4931112786, 0.1833748612, 1000.0], [0.771686157, -0.3183243298, 0.5506088413, 2000.0], [0.1502309544, -0.4268095867, -0.8917758895, 1000.0], [0.522981787, -0.7038788553, 0.4806709971, 2000.0], [-0.3915750118, 0.6159637312, 0.6835625004, 1000.0], [0.0, 0.0, 0.0, 0.0], [0.4274771073, 0.3857809764, -0.8175795747, 2000.0], [-0.7344474709, 0.670317379, 0.1061203275, 1000.0], [-0.3333339031, 0.04538689283, -0.9417157421, 2000.0], [0.2608360475, 0.8569593435, -0.4445056128, 500.0], [0.1024400072, -0.7656044664, -0.6351030199, 1000.0], [-0.7541382243, -0.4317804997, 0.4948142467, 2000.0], [-0.1826360012, -0.2385261512, -0.9538078246, 1000.0], [0.8609349435, -0.2885791333, -0.4189428444, 2000.0], [-0.006446998151, 0.7946093219, -0.607086865, 1000.0], [-0.8660620702, -0.4610862724, 0.1932251017, 2000.0], [0.5856322537, 0.7762448745, 0.2334068513, 1000.0], [0.6092097907, 0.7128031941, -0.3475270312, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.181982042, -0.9817676958, 0.05490653711, 2000.0], [-0.239228164, 0.9105877343, 0.3370457887, 1000.0], [0.3256818489, 0.8742100098, 0.3601224682, 2000.0], [0.7232921856, -0.07782665708, -0.6861424238, 1000.0], [0.6369318762, 0.1467004678, 0.7568333752, 2000.0], [-0.2979870907, -0.5987815019, 0.7434140211, 1000.0], [0.1535739997, 0.7557970277, 0.636542127, 2000.0], [0.2159879215, 0.3268498524, -0.9200643411, 1000.0], [-0.3632548075, 0.7801831482, 0.5092741895, 2000.0], [0.1571159734, 0.5797094535, 0.7995320634, 1000.0], [-0.7548961233, 0.5723716665, 0.3201913778, 2000.0], [-0.5359190824, -0.5998627238, -0.5941005384, 500.0], [0.3509630058, -0.6810515935, 0.6426458554, 1000.0], [0.5430966961, -0.05893142643, -0.8375995856, 2000.0], [0.0, 0.0, 0.0, 0.0], [0.7521072706, 0.6134737606, 0.2407999138, 2000.0], [-0.7254882763, 0.1300474222, -0.6758360962, 1000.0], [-0.4932231674, -0.6116424429, 0.6185664307, 2000.0], [0.7806341499, 0.2093159981, 0.5888948438, 1000.0], [0.1441579851, -0.657805114, 0.7392637603, 2000.0], [0.8937070686, -0.1931946497, 0.4049240705, 1000.0], [0.9557940187, -0.003156756559, 0.2940201161, 2000.0], [-0.2362650534, 0.9175736789, -0.3197457871, 1000.0], [-0.03746000331, -0.9059771733, 0.4216658743, 2000.0], [0.5327530253, 0.8353475924, -0.1355308596, 1000.0], [-0.6600471408, 0.2920512135, 0.6921299449, 2000.0], [0.9562068789, 0.2690736501, -0.1151858308, 1000.0], [0.0, 0.0, 0.0, 0.0], [0.5810039297, -0.5789795274, -0.5720289683, 2000.0], [-0.4663899172, 0.2619471438, 0.8449048106, 1000.0], [-0.3015670229, -0.1207727623, 0.945764913, 2000.0], [-0.5056410725, -0.1576992595, 0.8482087298, 1000.0], [-0.8568079677, -0.316434608, -0.4071231328, 2000.0], [-0.9823845924, -0.0387543994, 0.1828075739, 500.0], [-0.8265952827, -0.5618618501, -0.0324268406, 1000.0], [0.0223419945, 0.2417317018, -0.9700858826, 2000.0], [-0.8316486777, -0.2299520936, 0.5054527787, 1000.0], [-0.3664039919, -0.5662504622, -0.7383146543, 2000.0], [-0.9903107081, 0.1253749273, -0.05971456271, 1000.0], [0.4753920522, 0.8764921688, 0.07592018637, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.9333060493, 0.2955894174, -0.2038791666, 2000.0], [0.6122179063, 0.4381064261, -0.6582188045, 1000.0], [-0.1250259877, -0.5242716293, 0.8423228366, 2000.0], [-0.7303029776, 0.4200883355, 0.5386866912, 1000.0], [0.8703027686, -0.4915751546, -0.03044599163, 2000.0], [-0.9482227553, -0.2070645982, -0.2408274454, 1000.0], [0.07365197107, 0.4180278346, 0.9054436021, 2000.0], [0.8972250158, -0.3873261352, -0.2120512579, 1000.0], [-0.6802198885, 0.7271927219, -0.09215014058, 2000.0], [0.7395918424, 0.5174678033, 0.4303846874, 1000.0], [0.2249849205, -0.2350629146, -0.945583001, 2000.0], [0.453449024, -0.8912750507, -0.003573049879, 1000.0], [0.0, 0.0, 0.0, 0.0], [-0.2816100788, 0.9503078058, 0.1327058318, 2000.0], [0.1269559896, 0.8960152598, 0.4254865813, 1000.0], [-0.1231849332, 0.9801406074, -0.1554022584, 2000.0], [0.6149470183, -0.3773519207, 0.6924201705, 500.0], [-0.283517067, -0.9509158251, -0.1240047026, 1000.0], [0.2091758425, 0.7542239175, -0.6224080246, 2000.0], [-0.9339762163, 0.07146668472, 0.3501156099, 1000.0], [-0.8320928025, -0.001113015984, -0.5546353119, 2000.0], [-0.09030994789, 0.5014582312, -0.8604555513, 1000.0], [-0.3737170488, -0.2782744995, -0.8848157268, 2000.0], [-0.383709782, -0.7346315387, -0.5595384755, 1000.0], [0.6562100126, 0.4304636587, 0.6197495122, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.3853580325, 0.451674986, 0.8046669459, 2000.0], [-0.6648190404, 0.514580663, -0.5415001245, 1000.0], [0.0514109913, 0.08191096677, 0.9953127667, 2000.0], [0.5878952675, -0.7533797373, 0.2946152166, 1000.0], [0.367020925, 0.8881705197, -0.2764937042, 2000.0], [-0.7518069649, -0.5734697054, 0.3254516623, 1000.0], [0.9334032388, 0.1717664617, -0.3150471019, 2000.0], [0.489703125, 0.05388949977, 0.8702222539, 1000.0], [0.08659999533, -0.8788255399, -0.4692186177, 2000.0], [-0.1482259887, -0.9538665399, 0.2610894105, 1000.0], [0.2491169423, -0.369571674, 0.8951857499, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.2467191276, 0.8285833954, -0.5025726107, 2000.0], [0.1604450189, -0.1482288906, 0.975851214, 1000.0], [0.7581989155, -0.5502010356, 0.3498760137, 2000.0], [-0.3470960386, 0.07224546861, 0.9350427435, 500.0], [-0.07035398212, 0.9967893482, 0.0382271171, 1000.0], [-0.476367948, 0.514180528, -0.7132264457, 2000.0], [0.4314331376, 0.7697004529, -0.4705599436, 1000.0], [-0.5750718913, 0.180150966, -0.7980212712, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.8374760637, 0.007188451856, 0.5464267279, 2000.0], [0.1299649775, -0.6266017266, -0.7684265618, 2000.0], [0.41998489, -0.8613871722, -0.285700598, 500.0], [0.9956633473, 0.09242929462, 0.01055103874, 2000.0], [0.0, 0.0, 0.0, 0.0], [-0.5559818905, -0.704671315, -0.44082023, 2000.0], [0.5640059856, -0.8041087899, -0.1878997133, 2000.0]], u'mrtrix_version': u'3.0.2-37-gf2fb3005', u'comments': [u'NI005', u'phase=y;readout=0.0644;dwell=0.56;TE=71;time=20200120111058.140;']}, '_size': [116, 116, 81, 127], '_spacing': [2.0, 2.0, 2.0, 3.5], '_strides': [-1, 2, 3, 4]}
dwifslpreproc: [DEBUG] execute() (from app.py:197): Number of DWI volumes: 127
dwifslpreproc: [DEBUG] execute() (from app.py:197): Number of DWI slices: 81
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-YWSrlI.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file 'se_epi.mif'
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:202): ['/mrtrix3/bin/mrinfo', 'se_epi.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-YWSrlI.json']
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:202): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, -0.0, -112.073822021484], [-0.0, 0.971134277114462, -0.238533468958491, -88.2472915649414], [0.0, 0.238533468958491, 0.971134277114462, -101.28231048584], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'se_epi.mif', '_keyval': {u'command_history': [u'variable', u'mrcat /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG.mif /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/rev_dwipreprocessed/b0_rev_degibbs_MC_AVG.mif -axis 3 /data/data05/peter/ws/test/gpu_2slots_test//CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -info  (version=3.0.2-37-gf2fb3005)', u'/mrtrix3/bin/mrconvert /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/se_epi.mif -info  (version=3.0.2-37-gf2fb3005)'], u'mrtrix_version': u'3.0.2-37-gf2fb3005'}, '_size': [116, 116, 81, 2], '_spacing': [2.0, 2.0, 2.0, None], '_strides': [-1, 3, 4, 2]}
dwifslpreproc: No slice encoding direction information present; assuming third axis corresponds to slices
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:232): /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt -> /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt
dwifslpreproc: [DEBUG] execute() (from app.py:197): Slice groups: [[0, 27, 54], [2, 29, 56], [4, 31, 58], [6, 33, 60], [8, 35, 62], [10, 37, 64], [12, 39, 66], [14, 41, 68], [16, 43, 70], [18, 45, 72], [20, 47, 74], [22, 49, 76], [24, 51, 78], [26, 53, 80], [1, 28, 55], [3, 30, 57], [5, 32, 59], [7, 34, 61], [9, 36, 63], [11, 38, 65], [13, 40, 67], [15, 42, 69], [17, 44, 71], [19, 46, 73], [21, 48, 75], [23, 50, 77], [25, 52, 79]]
dwifslpreproc: [DEBUG] phaseencoding.direction() (from dwifslpreproc:312): pa -> [0, 1, 0]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual PE direction: [0.0, 1.0, 0.0]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual readout time: None
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:150): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:150): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Command: '/mrtrix3/bin/mrinfo dwi.mif -shell_indices' (piping data to local storage)
dwifslpreproc: Result: 0,1,5,18,31,46,59,72,85,98,110,119,124 22,43,65,89,114,122 3,7,9,11,13,15,17,20,23,25,27,29,33,35,37,39,41,44,48,50,52,54,56,58,61,63,66,68,70,74,76,78,80,82,84,87,90,92,94,96,100,102,104,106,108,112,115,117 2,4,6,8,10,12,14,16,19,21,24,26,28,30,32,34,36,38,40,42,45,47,49,51,53,55,57,60,62,64,67,69,71,73,75,77,79,81,83,86,88,91,93,95,97,99,101,103,105,107,109,111,113,116,118,120,121,123,125,126
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual DWI PE scheme for 'Pair' PE design: [[0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1], [0.0, 1.0, 0.0, 0.1]]
dwifslpreproc: [DEBUG] execute() (from app.py:197): Manual SEEPI PE scheme for 'Pair' PE design: [[0.0, 1.0, 0.0, 0.1], [0.0, -1.0, 0.0, 0.1]]
dwifslpreproc: Total readout time not provided at command-line; assuming sane default of 0.1
dwifslpreproc: [DEBUG] execute() (from app.py:197): Index of first b=0 image in DWIs is 0
dwifslpreproc: [DEBUG] image.match() (from dwifslpreproc:515): 'dwi.mif' 'se_epi.mif' image match
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:626): To execute: [['/mrtrix3/bin/mrconvert', 'dwi.mif', 'dwi_first_bzero.mif', '-coord', '3', '0', '-axes', '0,1,2', '-info']]
Command:  mrconvert dwi.mif dwi_first_bzero.mif -coord 3 0 -axes 0,1,2
          mrconvert: [INFO] opening image "dwi.mif"...
          mrconvert: [INFO] image "dwi.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] creating image "dwi_first_bzero.mif"...
          mrconvert: [INFO] image "dwi_first_bzero.mif" created with dimensions 116x116x81, voxel spacing 2x2x2, datatype Float32LE
          mrconvert: [100%] copying from "dwi.mif" to "dwi_first_bzero.mif"
          mrconvert: [INFO] writing back contents of mapped file "dwi_first_bzero.mif"...
dwifslpreproc: Balanced phase-encoding scheme detected in SE-EPI series; volume 0 will be removed and replaced with first b=0 from DWIs
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrcat -> mrcat
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrcat: /mrtrix3/bin/mrcat
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrcat": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:638): To execute: [['/mrtrix3/bin/mrconvert', 'se_epi.mif', '-', '-coord', '3', '1', '-info'], ['/mrtrix3/bin/mrcat', 'dwi_first_bzero.mif', '-', 'se_epi_firstdwibzero.mif', '-axis', '3', '-info']]
Command:  mrconvert se_epi.mif - -coord 3 1 | mrcat dwi_first_bzero.mif - se_epi_firstdwibzero.mif -axis 3
          mrconvert: [INFO] opening image "se_epi.mif"...
          mrconvert: [INFO] image "se_epi.mif" opened with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [INFO] no valid diffusion gradient table found
          mrconvert: [INFO] error importing diffusion gradient table for image "se_epi.mif"
          mrconvert: [INFO] creating image "-"...
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-Ei8o6P.mif" created with dimensions 116x116x81x1, voxel spacing 2x2x2xnan, datatype Float32LE
          mrconvert: [100%] copying from "se_epi.mif" to "/data/data...DYM6N/mrtrix-tmp-Ei8o6P.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-Ei8o6P.mif"...
          mrcat: [INFO] opening image "dwi_first_bzero.mif"...
          mrcat: [INFO] image "dwi_first_bzero.mif" opened with dimensions 116x116x81, voxel spacing 2x2x2, datatype Float32LE
          mrcat: [INFO] opening image "-"...
          mrcat: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-Ei8o6P.mif" opened with dimensions 116x116x81x1, voxel spacing 2x2x2xnan, datatype Float32LE
          mrcat: [INFO] found 1x4 diffusion gradient table
          mrcat: [INFO] creating image "se_epi_firstdwibzero.mif"...
          mrcat: [INFO] image "se_epi_firstdwibzero.mif" created with dimensions 116x116x81x2, voxel spacing 2x2x2xnan, datatype Float32LE
          mrcat: [100%] concatenating "dwi_first_bzero.mif"
          mrcat: [  7%] concatenating "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-Ei8o6P.mif"          mrcat: [100%] concatenating "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-Ei8o6P.mif"
          mrcat: [INFO] writing back contents of mapped file "se_epi_firstdwibzero.mif"...
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrinfo": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:732): To execute: [['/mrtrix3/bin/mrinfo', 'dwi.mif', '-export_grad_mrtrix', 'grad.b', '-info']]
Command:  mrinfo dwi.mif -export_grad_mrtrix grad.b
          mrinfo: [INFO] opening image "dwi.mif"...
          mrinfo: [INFO] image "dwi.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrinfo: [INFO] found 127x4 diffusion gradient table
dwifslpreproc: 1 spatial axis of DWIs has non-even size; this will be automatically padded for compatibility with topup, and the extra slice erased afterwards

Q2) This topic is related to eddy_quad following eddy_cuda, and it seems to be touched upon in this thread dwipreproc output and eddy_quad. This suggests that it may be due to the path related to the basename of the file. However, following eddy, eddy_quad seems to complete just fine even without having the basename as part of the path output, as I see the quad folder and some outputs in there.

quad> ls
avg_b0.png  avg_b0_pe0.png  avg_b1000.png  avg_b2000.png  avg_b500.png	qc.json  qc.pdf  ref.txt  ref_list.png	vdm.png

Below are the debugging messages.
Eddy:

Command:  eddy_cuda --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --repol --slm=quadratic --estimate_move_by_susceptibility --data_is_shelled --verbose --out=dwi_post_eddy --verbose
dwifslpreproc: CUDA version of 'eddy' was not successful; attempting OpenMP version
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:339): eddy_openmp -> eddy_openmp
dwifslpreproc: [DEBUG] run.version_match() (from run.py:566): Command eddy_openmp not found in MRtrix3 bin/ directory
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:568): eddy_openmp -> eddy_openmp
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "eddy_openmp": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:919): To execute: [['eddy_openmp', '--imain=eddy_in.nii', '--mask=eddy_mask.nii', '--acqp=eddy_config.txt', '--index=eddy_indices.txt', '--bvecs=bvecs', '--bvals=bvals', '--topup=field', '--repol', '--slm=quadratic', '--estimate_move_by_susceptibility', '--data_is_shelled', '--verbose', '--out=dwi_post_eddy', '--verbose']]
Command:  eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --repol --slm=quadratic --estimate_move_by_susceptibility --data_is_shelled --verbose --out=dwi_post_eddy --verbose


dwifslpreproc: Output of eddy command:
Reading images
Performing volume-to-volume registration
Setting linear second level model
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 21.5439
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 4, Total mss = 16.3374
Running sm.ApplyB0LocationReference
Running sm.PolateB0MovPar
Running Register
Loading prediction maker
Evaluating prediction maker model
Estimated hyperparameters: 0.557221 
0.396398 
7.627510 
4.096390 
3.224444 
2.364003 

Calculating parameter updates
Iter: 0, Total mss = 2.741849
Loading prediction maker
Evaluating prediction maker model
Estimated hyperparameters: -0.452641 
0.257863 
7.231951 
2.731902 
1.941191 
0.867925 


Loading prediction maker
Evaluating prediction maker model
Loading prediction maker
Evaluating prediction maker model
Hyperparameters set to user specified values: 0.659056 
0.296752 
7.110790 
3.995176 
2.967984 
1.826407 

Running vol-to-vol interleaved with MBS
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 15.291386
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 15.385314
Running sm.ApplyB0LocationReference
Running Register
Loading prediction maker
Evaluating prediction maker model
Estimated hyperparameters: -0.586520 
0.399988 
7.676027 
2.737052 
1.708019 
0.604121 

Calculating parameter updates
Iter: 0, Total mss = 1.600850
Loading prediction maker
Evaluating prediction maker model

Calculating parameter updates
Iter: 1, Total mss = 1.598171
Running sm.ApplyDWILocationReference
Checking shell alignment along PE-direction (running PostEddyAlignShellsAlongPE)
Aligning shells (running PostEddyAlignShells)
Performing final outlier check
Loading prediction maker
Evaluating prediction maker model
Estimated hyperparameters: -0.317517 
0.268413 
6.044694 
0.783357 
-0.262003 
-1.397617 

Running sm.WriteOutlierFreeData
Running sm.WriteParameterFile
Running sm.WriteRegisteredImages
Running sm.WriteRotatedBVecs
Running sm.WriteMovementRMS


dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:962): Image at expected location: "dwi_post_eddy.nii"
dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:980): Image at expected location: "field_map.nii"
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:339): eddy_quad -> eddy_quad
dwifslpreproc: [DEBUG] run.version_match() (from run.py:566): Command eddy_quad not found in MRtrix3 bin/ directory
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:568): eddy_quad -> eddy_quad
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "eddy_quad": string "#!/opt/fsl/fslpython/envs/fslpython/bin/python": ['/opt/fsl/fslpython/envs/fslpython/bin/python']
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:986): To execute: [['/opt/fsl/fslpython/envs/fslpython/bin/python', '/opt/fsl/bin/eddy_quad', 'dwi_post_eddy', '-idx', 'eddy_indices.txt', '-par', 'eddy_config.txt', '-m', 'eddy_mask.nii', '-b', 'bvals', '-f', 'field_map.nii', '-v']]
Command:  eddy_quad dwi_post_eddy -idx eddy_indices.txt -par eddy_config.txt -m eddy_mask.nii -b bvals -f field_map.nii -v
          dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:1007): Image at expected location: "field_fieldcoef.nii"
dwifslpreproc: [DEBUG] execute() (from app.py:197): Commencing gradient direction matching; 127 volumes
dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:1040): Image at expected location: "field_map.nii"
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:1043): To execute: [['/mrtrix3/bin/mrconvert', 'dwi_post_eddy.nii', 'result.mif', '-coord', '2', '0:80', '-strides', '-1,2,3,4', '-fslgrad', 'dwi_post_eddy.eddy_rotated_bvecs', 'bvals', '-nthreads', '8', '-info']]
Command:  mrconvert dwi_post_eddy.nii result.mif -coord 2 0:80 -strides -1,2,3,4 -fslgrad dwi_post_eddy.eddy_rotated_bvecs bvals
          mrconvert: [INFO] opening image "dwi_post_eddy.nii"...
          mrconvert: [INFO] Axes and transform of image "dwi_post_eddy.nii" altered to approximate RAS coordinate system
          mrconvert: [INFO] image "dwi_post_eddy.nii" opened with dimensions 116x116x82x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] opening image "-1,2,3,4"...
          mrconvert: [INFO] creating image "result.mif"...
          mrconvert: [INFO] image "result.mif" created with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [100%] copying from "dwi_post_eddy.nii" to "result.mif"
          mrconvert: [INFO] writing back contents of mapped file "result.mif"...
Function: shutil.copy('dwi_post_eddy.eddy_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_movement_rms', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_movement_rms')
Function: shutil.copy('dwi_post_eddy.eddy_restricted_movement_rms', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_restricted_movement_rms')
Function: shutil.copy('dwi_post_eddy.eddy_post_eddy_shell_alignment_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_post_eddy_shell_alignment_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_post_eddy_shell_PE_translation_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_post_eddy_shell_PE_translation_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_report', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_outlier_report')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_outlier_map')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_n_stdev_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_outlier_n_stdev_map')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_n_sqr_stdev_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_outlier_n_sqr_stdev_map')
Function: shutil.copytree('dwi_post_eddy.qc', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/quad')
Function: shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii')

dwifslpreproc: [ERROR] shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii') (dwifslpreproc:1207)
dwifslpreproc: [ERROR] Information from failed function:
dwifslpreproc:
               `eddy_mask.nii` and `/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii` are the same file
dwifslpreproc:
dwifslpreproc: [ERROR] For debugging, inspect contents of scratch directory: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test
dwifslpreproc: Scratch directory retained; location: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test

Eddy_cuda:

dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:911): To execute: [['eddy_cuda', '--imain=eddy_in.nii', '--mask=eddy_mask.nii', '--acqp=eddy_config.txt', '--index=eddy_indices.txt', '--bvecs=bvecs', '--bvals=bvals', '--topup=field', '--repol', '--slm=quadratic', '--estimate_move_by_susceptibility', '--mporder=8', '--s2v_niter=8', '--data_is_shelled', '--verbose', '--slspec=slspec.txt', '--out=dwi_post_eddy', '--verbose']]
Command:  eddy_cuda --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --repol --slm=quadratic --estimate_move_by_susceptibility --mporder=8 --s2v_niter=8 --data_is_shelled --verbose --slspec=slspec.txt --out=dwi_post_eddy --verbose
          dwifslpreproc: Output of eddy command:
Reading images
Performing volume-to-volume registration
Setting linear second level model
Running Register

...................Allocated GPU # 0...................
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 15.6338
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 4, Total mss = 11.914
Setting scan 46 as b0 shape-reference.
Running sm.ApplyB0LocationReference
Running sm.PolateB0MovPar
Running Register
Loading prediction maker
Evaluating prediction maker model
Checking for outliers
Calculating parameter updates
Iter: 0, Total mss = 2.46882
Loading prediction maker
Evaluating prediction maker model
Checking for outliers
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Loading prediction maker
Evaluating prediction maker model
Running slice-to-vol interleaved with MBS
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 11.795
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 11.7391
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 2, Total mss = 11.7137
Running sm.ApplyB0ShapeReference
Running sm.ApplyB0LocationReference
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 1.48117
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 1.44279
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 2, Total mss = 1.48218
Running sm.ApplyShellShapeReference
Running sm.ApplyDWILocationReference
Running interleave 3 of MBS
Loading prediction maker
Evaluating prediction maker model
Loading prediction maker
Running slice-to-vol interleaved with MBS
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 11.8356
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 11.7611
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 2, Total mss = 11.7211
Running sm.ApplyB0ShapeReference
Running sm.ApplyB0LocationReference
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 1.46584
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 1.46135
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 2, Total mss = 1.49236
Running sm.ApplyShellShapeReference
Running sm.ApplyDWILocationReference
Checking shell alignment along PE-direction (running PostEddyAlignShellsAlongPE)
Aligning shells (running PostEddyAlignShells)
Performing final outlier check
Loading prediction maker
Evaluating prediction maker model
Checking for outliers
Running sm.WriteOutlierFreeData
Running sm.WriteParameterFile
Running sm.WriteMovementOverTimeFile
Running sm.WriteRegisteredImages
Loading prediction maker
Evaluating prediction maker model
Loading prediction maker
Evaluating prediction maker model
Running sm.WriteRotatedBVecs
Running sm.WriteMovementRMS


dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:962): Image at expected location: "dwi_post_eddy.nii"
dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:980): Image at expected location: "field_map.nii"
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:339): eddy_quad -> eddy_quad
dwifslpreproc: [DEBUG] run.version_match() (from run.py:566): Command eddy_quad not found in MRtrix3 bin/ directory
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:568): eddy_quad -> eddy_quad
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "eddy_quad": string "#!/opt/fsl/fslpython/envs/fslpython/bin/python": ['/opt/fsl/fslpython/envs/fslpython/bin/python']
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:986): To execute: [['/opt/fsl/fslpython/envs/fslpython/bin/python', '/opt/fsl/bin/eddy_quad', 'dwi_post_eddy', '-idx', 'eddy_indices.txt', '-par', 'eddy_config.txt', '-m', 'eddy_mask.nii', '-b', 'bvals', '-f', 'field_map.nii', '-s', 'slspec.txt', '-v']]
Command:  eddy_quad dwi_post_eddy -idx eddy_indices.txt -par eddy_config.txt -m eddy_mask.nii -b bvals -f field_map.nii -s slspec.txt -v
          Traceback (most recent call last):
            File "/opt/fsl/bin/eddy_quad", line 54, in <module>
              main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
              slspec = np.genfromtxt(slspecFile, dtype=int)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
              raise ValueError(errmsg)
          ValueError: Some errors were detected !
              Line #14 (got 4 columns instead of 3)
          dwifslpreproc: [DEBUG] execute() (from app.py:197): Traceback (most recent call last):
  File "/opt/fsl/bin/eddy_quad", line 54, in <module>
    main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
    slspec = np.genfromtxt(slspecFile, dtype=int)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
    raise ValueError(errmsg)
ValueError: Some errors were detected !
    Line #14 (got 4 columns instead of 3)

dwifslpreproc: [WARNING] Error running automated EddyQC tool 'eddy_quad'; QC data written to "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test" will be files from "eddy" only
dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:1007): Image at expected location: "field_fieldcoef.nii"
dwifslpreproc: [DEBUG] execute() (from app.py:197): Commencing gradient direction matching; 127 volumes
dwifslpreproc: [DEBUG] fsl.find_image() (from dwifslpreproc:1040): Image at expected location: "field_map.nii"
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:1043): To execute: [['/mrtrix3/bin/mrconvert', 'dwi_post_eddy.nii', 'result.mif', '-coord', '2', '0:80', '-strides', '-1,2,3,4', '-fslgrad', 'dwi_post_eddy.eddy_rotated_bvecs', 'bvals', '-info']]
Command:  mrconvert dwi_post_eddy.nii result.mif -coord 2 0:80 -strides -1,2,3,4 -fslgrad dwi_post_eddy.eddy_rotated_bvecs bvals
          mrconvert: [INFO] opening image "dwi_post_eddy.nii"...
          mrconvert: [INFO] Axes and transform of image "dwi_post_eddy.nii" altered to approximate RAS coordinate system
          mrconvert: [INFO] image "dwi_post_eddy.nii" opened with dimensions 116x116x82x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] opening image "-1,2,3,4"...
          mrconvert: [INFO] creating image "result.mif"...
          mrconvert: [INFO] image "result.mif" created with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [100%] copying from "dwi_post_eddy.nii" to "result.mif"
          mrconvert: [INFO] writing back contents of mapped file "result.mif"...
Function: shutil.copy('dwi_post_eddy.eddy_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_movement_rms', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_movement_rms')
Function: shutil.copy('dwi_post_eddy.eddy_restricted_movement_rms', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_restricted_movement_rms')
Function: shutil.copy('dwi_post_eddy.eddy_post_eddy_shell_alignment_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_post_eddy_shell_alignment_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_post_eddy_shell_PE_translation_parameters', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_post_eddy_shell_PE_translation_parameters')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_report', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_outlier_report')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_outlier_map')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_n_stdev_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_outlier_n_stdev_map')
Function: shutil.copy('dwi_post_eddy.eddy_outlier_n_sqr_stdev_map', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_outlier_n_sqr_stdev_map')
Function: shutil.copy('dwi_post_eddy.eddy_movement_over_time', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_movement_over_time')
Function: shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/eddy_mask.nii')
dwifslpreproc: [DEBUG] path.name_temporary() (from image.py:33): /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-9sVIfn.json
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrinfo -> mrinfo
dwifslpreproc: [DEBUG] run.version_match() (from image.py:34): Version-matched executable for mrinfo: /mrtrix3/bin/mrinfo
dwifslpreproc: [DEBUG] run.exe_name() (from image.py:34): /mrtrix3/bin/mrinfo -> /mrtrix3/bin/mrinfo
dwifslpreproc: Loading header for image file 'result.mif'
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:1225): ['/mrtrix3/bin/mrinfo', 'result.mif', '-json_all', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/mrtrix-tmp-9sVIfn.json']
dwifslpreproc: [DEBUG] image.__init__() (from dwifslpreproc:1225): {'_intensity_offset': 0.0, '_format': u'MRtrix', '_transform': [[1.0, -0.0, 0.0, -112.073822021484], [0.0, 0.971134279142203, -0.238533460703008, -88.2472915649414], [-0.0, 0.238533460703008, 0.971134279142203, -101.28231048584], [0.0, 0.0, 0.0, 1.0]], '_intensity_scale': 1.0, '_datatype': u'Float32LE', '_name': u'result.mif', '_keyval': {u'command_history': u"/mrtrix3/bin/mrconvert dwi_post_eddy.nii result.mif -coord 2 '0:80' -strides '-1,2,3,4' 
dwifslpreproc: [DEBUG] path.from_user() (from dwifslpreproc:1236): dwi_denoised_degibbs_preproc.mif -> /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif
dwifslpreproc: [DEBUG] run.exe_name() (from run.py:546): mrconvert -> mrconvert
dwifslpreproc: [DEBUG] run.version_match() (from run.py:330): Version-matched executable for mrconvert: /mrtrix3/bin/mrconvert
dwifslpreproc: [DEBUG] run._shebang() (from run.py:340): File "/mrtrix3/bin/mrconvert": Not a text file
dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:1236): To execute: [['/mrtrix3/bin/mrconvert', 'result.mif', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif', '-copy_properties', 'output.json', '-append_property', 'command_history', "/mrtrix3/bin/dwifslpreproc dwi_denoised_degibbs.mif dwi_denoised_degibbs_preproc.mif -debug -nocleanup -scratch /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test -pe_dir PA -rpe_pair -se_epi dwi_denoised_degibbs_b0_MC_AVG_rev_b0_MC_AVE_pair.mif -align_seepi -force -eddyqc_all /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test -eddy_slspec /data/data05/peter/COVID19/data/slspec/NI005_20200120/NI005_20200120_slspec.txt -eddy_options ' --repol --slm=quadratic --estimate_move_by_susceptibility --mporder=8 --s2v_niter=8 --data_is_shelled --verbose '  (version=3.0.2-37-gf2fb3005)", '-info', '-force']]
Command:  mrconvert result.mif /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif
          mrconvert: [WARNING] existing output files will be overwritten
          mrconvert: [INFO] opening image "result.mif"...
          mrconvert: [INFO] image "result.mif" opened with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [INFO] found 127x4 diffusion gradient table
          mrconvert: [INFO] opening image "output.json"...
          mrconvert: [INFO] creating image "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif"...
          mrconvert: [INFO] file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif" already exists - removing
          mrconvert: [INFO] image "/data/data05/peter/ws/test/gpu_2slots_test/C

N/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif" created with dimensions 116x116x81x127, voxel spacing 2x2x2x3.5, datatype Float32LE
          mrconvert: [100%] copying from "result.mif" to "/data/data...enoised_degibbs_preproc.mif"
          mrconvert: [INFO] writing back contents of mapped file "/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/dwi_denoised_degibbs_preproc.mif"...
dwifslpreproc: Changing back to original directory (/data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed)
dwifslpreproc: Scratch directory retained; location: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI005_20200120/dwipreprocessed/test/dwifslpreproc-tmp-8DYM6N/

Based on the provided information, is there something that I am doing wrong to cause this or is this a bug in the code? Are there ways to work around it?

PS. Due to the body word limits, some of the less relevant texts have been removed
PPS. At the end of Eddy command, there were a couple of error messages. Just wanted to check that this shouldn’t be a big concern since these messages didn’t show up when I ran the first time. It seems like it’s complaining that the eddy_masks are the same.

dwifslpreproc: [ERROR] shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii') (dwifslpreproc:1207)
dwifslpreproc: [ERROR] Information from failed function:
dwifslpreproc:
               `eddy_mask.nii` and `/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii` are the same file
dwifslpreproc:
dwifslpreproc: [ERROR] For debugging, inspect contents of scratch directory: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test
dwifslpreproc: Scratch directory retained; location: /data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test

Thank you very much for your help!
Julie

Hi Julie,

I’m probably not the best person to answer your queries, but in the interest of giving @rsmith a break, I’ll give it a shot…

For your Q1: if I understand correctly, your concern is that the when running eddy_cuda with slice to volume correction, you get a message relating to the assuming slice encoding direction, that you don’t get when running eddy without slice to volume correction. But you seem to be confusing the phase-encode direction (which topup needs to know to estimate susceptibility-induced distortions) and the slice direction (which eddy needs to know for the slice to volume correction). Knowing the phase-encode direction isn’t enough to figure out the slice direction, so this is different and necessary information. The program is informing you that it’s assuming your slice direction is inferior-superior – but (rightly) warning you that this is just an educated guess.

Your regular eddy run without slice to volume correction simply doesn’t need to know the slice direction, and so dwifslpreproc won’t even bother trying to figure it out – and you won’t get that warning.


For your Q2: I’m not sure I see the problem (?), but it looks like you’re concerned that the behaviour is not as expected based on an old post from May 2019? But in that same post, @rsmith explicitly states:

Which basically says that the behaviour in future versions will be different, specifically to address the issue you’re referring to. Back in May 2019, we were still on version 3.0_RC3 – we’re now on 3.0.2, and this issue was addressed at the time, which your results seem to confirm? Let me know if I’m getting the wrong end of the stick here…


For your last PPS issue, I’m not sure about this one, I’ll have to handball that one over to @rsmith… But given that the problem is that it’s trying to copy a file onto itself, I doubt this is much to worry about.

Hello @jdtournier,

Ah, I was under the assumption that the slice direction is derived from various header info and/or slice text info that I provide with the -eddy_slspec option as it separates the slice order. Thank you very much for pointing this out!

Following your answer, I have looked through the dwifslpreproc -help but couldn’t find an option to specify the slice encoding direction. Could you kindly provide guidance on where and how I can provide this information?

Regarding Q2, yes, indeed I am now using the latest MRtrix3 version. However, the same error still occurred to me. If this was resolved, then I assume that there won’t be the same error message during the run. It’s odd to see the error message only from eddy_cuda run but not with eddy though.

Thank you again for your help, and I will wait until @rsmith comes back from his break for his input.
Best regards,
Julie

Indeed, there is no such option yet. However, if your acquisition was acquired as axial slices, then you can safely ignore that warning: it’s making the right assumption. If that’s not the case, then unfortunately this can’t be processed anyway – I assume eddy doesn’t yet support it, someone will no doubt correct me if I’m wrong here.

Regarding your Q2, my apologies, I hadn’t spotted the relevant error in the middle of the debugging output:

dwifslpreproc: [DEBUG] run.command() (from dwifslpreproc:986): To execute: [['/opt/fsl/fslpython/envs/fslpython/bin/python', '/opt/fsl/bin/eddy_quad', 'dwi_post_eddy', '-idx', 'eddy_indices.txt', '-par', 'eddy_config.txt', '-m', 'eddy_mask.nii', '-b', 'bvals', '-f', 'field_map.nii', '-s', 'slspec.txt', '-v']]
Command:  eddy_quad dwi_post_eddy -idx eddy_indices.txt -par eddy_config.txt -m eddy_mask.nii -b bvals -f field_map.nii -s slspec.txt -v
          Traceback (most recent call last):
            File "/opt/fsl/bin/eddy_quad", line 54, in <module>
              main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
              slspec = np.genfromtxt(slspecFile, dtype=int)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
              raise ValueError(errmsg)
          ValueError: Some errors were detected !
              Line #14 (got 4 columns instead of 3)
          dwifslpreproc: [DEBUG] execute() (from app.py:197): Traceback (most recent call last):
  File "/opt/fsl/bin/eddy_quad", line 54, in <module>
    main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
    slspec = np.genfromtxt(slspecFile, dtype=int)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
    raise ValueError(errmsg)
ValueError: Some errors were detected !
    Line #14 (got 4 columns instead of 3)

It looks like eddy_quad is failing because the slspec.txt file contains 4 columns when it was expecting 3. Does that match what you provided to the command?

Actually, it makes sense since the slspec.txt is only required for slice to volume reconstruction, and you’re not performing that for the regular eddy run.

Hello @jdtournier,

Ah, I see. Does that mean the current eddy_cuda function related to the slice-to-volume correction is only possible if your slices are acquired at axial direction? Also, is the slice direction for the slice-to-volume correction the same as the slice direction for the mrdegibbs -axes command?

The slspec.txt input that I provide has 3 columns and is prepared using the json file and the code found on the FSL site https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/Faq. While running the eddy command with -debug option, I did notice that the slspec.txt was modified and contained 4 columns. This must’ve been done under the hood of the dwifslpreproc command. I think this could be where the issue comes from. My DWI file has dimensions = 116 x 116 x 81 x 127, and my input slspec.txt has a number listed from 0 to 80 (a total of 81 numbers) alternating by a unit of 2, and separated odd and even number. But the slspec.txt in the dwifslpreproc tmp directory has a number listed from 0 81 (a total of 82 numbers), while the number 81 being the one and the only number on the 4th column. Could this discrepancy be coming from the padding functionality from the dwifslpreproc command as I noticed that the data got padded? Should the slspec.txt file reflect the original DWI file rather than the padded DWI file?

Based on the error message, it seems to complain about saving the eddy_quad QC output file and saves just the eddy output. Does that mean that the output file of the dwifslpreproc (the real preprocessed DWI output file) is properly and correctly preprocessed, while only the output for the eddy_quad QC is not saved properly? Or do you think that the slice-to-volume correction is not properly executed at all?

If the error is related to saving the eddy_quad QC output only, then I could move on with the subsequent processing & analysis, although it is not ideal. But if the preprocessing itself is not correctly executed, then I will need to resolve this before moving forward.

Out of curiosity, is eddy_cuda with slice-to-volume correction step not commonly done? How important or significant is this preprocessing step in your experience and expertise? FYI. I work with neurodegenerative diseases dataset such as Alzheimer’s disease. This is my first experience working on the DWI dataset, and your experience and expertise would be much appreciated.

Thank you for your help!
Best regards,
Julie

Ah, ok. Yes, I think there’s a few hacks required to process odd numbers of slices, it’s not unlikely that might cause eddy_quad some trouble. I’m not familiar enough with the process to answer your questions with confidence, but hopefully @rsmith will clear up what’s going on.

Thank you for your help @jdtournier! Hope to hear from @rsmith soon!

:weary:

sets up email filter to delete all questions regarding dwifslpreproc

However, following eddy, eddy_quad seems to complete just fine even without having the basename as part of the path output, as I see the quad folder and some outputs in there.

dwifslpreproc: [ERROR] shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii') (dwifslpreproc:1207)
dwifslpreproc: [ERROR] Information from failed function:
dwifslpreproc:
               `eddy_mask.nii` and `/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii` are the same file

While there might be some outputs in there, the script has nevertheless crashed. The reason is that:

  1. You have specified “-scratch test”;
  2. Presumably this directory did not exist or was empty when you first ran the command, and so dwifslpreproc used that as the scratch directory rather than creating a randomly-named sub-directory within it;
  3. One of the intermediate files generated during the course of the script is called eddy_mask.nii (code);
  4. When specifying -eddyqc_all, not only is EddyQC executed, the various text files generated by eddy are copied to the target directory, and (unlike -eddyqc_text) images relating to the operation of eddy are also copied there; this includes the mask used as input to eddy (code), particularly since EddyQC relies on it.
  5. For the -eddyqc_all option, you specified the output directory to be the same as the scratch directory. This results in the attempt to copy eddy_mask.nii from the scratch directory to the path specified by -eddyqc_all being the same location.

This is an entirely unforeseen usage; and while I suppose technically it’s a bug, it’s also not a safe usage of functionality to be mixing scratch and output data.

So:

Based on the provided information, is there something that I am doing wrong to cause this or is this a bug in the code? Are there ways to work around it?

Just use different paths for -scratch and -eddyqc_all.

But to be clear:

PPS. At the end of Eddy command, there were a couple of error messages.

This is not at the end of the eddy command, nor even at the end of EddyQC: this is from within dwifslpreproc’s own code, as it attempts to move all of the hard work it’s done into the location you requested.

I was under the assumption that the slice direction is derived from various header info and/or slice text info that I provide with the -eddy_slspec option as it separates the slice order. Thank you very much for pointing this out!

If “SliceEncodingDirection” is present in the image header, then dwifslpreproc will read from such; the fact that you were issued with a warning suggests that it is not there, and therefore can’t be inferred from header info. The “slspec” file requested by eddy only contains slice indices, not the axis of slice encoding.

While it’s tempting to infer the slice encoding axis based on the image axis that has the same size as the number of entries in slspec, there are two issues with this. Firstly, there’s no guarantee that that size will be unique to a single axis (although admittedly such cases could be caught). Secondly, SliceEncodingDirection is actually directed, and could be negative, in which case the slice indices within the slice groups need to be flipped (code) (but similarly, admittedly this could be inferred to not be the case in the absence of any other information).

But much of this I deemed not worth the effort:

Following your answer, I have looked through the dwifslpreproc -help but couldn’t find an option to specify the slice encoding direction. Could you kindly provide guidance on where and how I can provide this information?

There’s no interface by which to specify such, because eddy assumes that the third axis is the slice encoding axis, and if this is not the case, dwifslpreproc does not perform the requisite permutations in order to satisfy eddy’s expectations. The only functionality provided by knowing the slice encoding axis in the context of this script is to immediately throw an error if this expectation is false, and to reverse the slice indices if necessary. I once considered attempting to perform the requisite permutations within dwifslpreproc, but at some point in time I need to commit some of my efforts toward my own work, rather than trying to massage other people’s data to work on somebody else’s software. If someone wants to try supporting non-axial acquisitions in dwifslpreproc, ensuring that all other directionally-dependent information is correct, including accounting for MRtrix3’s internal transform realignment, you’re more than welcome :neutral_face: :laughing:

Command:  eddy_quad dwi_post_eddy -idx eddy_indices.txt -par eddy_config.txt -m eddy_mask.nii -b bvals -f field_map.nii -s slspec.txt -v
          Traceback (most recent call last):
            File "/opt/fsl/bin/eddy_quad", line 54, in <module>
              main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
              slspec = np.genfromtxt(slspecFile, dtype=int)
            File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
              raise ValueError(errmsg)
          ValueError: Some errors were detected !
              Line #14 (got 4 columns instead of 3)
          dwifslpreproc: [DEBUG] execute() (from app.py:197): Traceback (most recent call last):
  File "/opt/fsl/bin/eddy_quad", line 54, in <module>
    main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/eddy_qc/QUAD/quad.py", line 122, in main
    slspec = np.genfromtxt(slspecFile, dtype=int)
  File "/opt/fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/numpy/lib/npyio.py", line 2031, in genfromtxt
    raise ValueError(errmsg)
ValueError: Some errors were detected !
    Line #14 (got 4 columns instead of 3)

While running the eddy command with -debug option, I did notice that the slspec.txt was modified and contained 4 columns. This must’ve been done under the hood of the dwifslpreproc command. I think this could be where the issue comes from. My DWI file has dimensions = 116 x 116 x 81 x 127, and my input slspec.txt has a number listed from 0 to 80 (a total of 81 numbers) alternating by a unit of 2, and separated odd and even number. But the slspec.txt in the dwifslpreproc tmp directory has a number listed from 0 81 (a total of 82 numbers), while the number 81 being the one and the only number on the 4th column. Could this discrepancy be coming from the padding functionality from the dwifslpreproc command as I noticed that the data got padded? Should the slspec.txt file reflect the original DWI file rather than the padded DWI file?

Correct. The reason that padding occurs is because:

  1. In previous versions of FSL, only a single toup config file was provided;
  2. That config file included downsampling by a factor of 2 in earlier iterations;
  3. If provided with an image for which any image axis had a size that was not a factor of 2, topup would crash (and still does AFAIK), with dwifslpreproc concomitantly failing.

I’ve had this solution in place for a while, and it’s been fine. When eddy’s slice-to-volume reconstruction was introduced, and specifically the slice encoding axis had an odd size, I found that I could simply update the slspec file to reflect the duplication of the first slice, and eddy would work without issue, so I went with that solution. But then EddyQC came out, and now there’s an issue, specifically because their code uses a generic text file numerical matrix import function, and that strictly expects the data to not be an irregular matrix. I tried convincing the EddyQC developer that such an slspec file is entirely legal, but lost.

So. What to do about it? Well, for some time I’ve advised that using an odd number of slices at acquisition time is asking for trouble, even though it shouldn’t really matter. The way I see it there are two possible solutions:

  1. Do not perform image padding for topup’s sake (at least in this scenario, but for simplicity probably in all scenarios). Instead, take on board the fact that in FSL6, there are now multiple topup config files provided, specifically that involve different levels of subsampling. dwifslpreproc would find the appropriate file to use based on the divisibility of the image axis sizes.

  2. Keep the image padding, but following eddy, if EddyQC is to be run, and padding was performed in the slice encoding axis, undo this padding. I don’t recall whether or not I investigated thoroughly at the time, this is highly unlikely to be a matter of just removing the additional entry from the slspec file: almost invariably, a new error will be raised, saying that the number of slices in the slspec file is different to the number of slices in the image. So then you also remove the padded slice from the relevant images. But what about other files? Certainly those files reporting on slice dropouts would need to be modified before they could be provided to EddyQC. What about the within-slice motion parameters? Are there any hidden assumptions within there that would be broken by removing a slice?

If approach 2 ends up being not too difficult, I’d be content with implementing that, in part because if approach 1 were instead used, topup would take even longer to run than it already does, as subsampling would be omitted from earlier iterations.

And people still tell me that dwifslpreproc “just lets you run eddy with MIF files”:face_with_thermometer:

Based on the error message, it seems to complain about saving the eddy_quad QC output file and saves just the eddy output. Does that mean that the output file of the dwifslpreproc (the real preprocessed DWI output file) is properly and correctly preprocessed, while only the output for the eddy_quad QC is not saved properly?

Correct: dwifslpreproc issues a warning if specifically EddyQC fails for some reason, but still completes its other tasks, precisely to mitigate your scenario.

Out of curiosity, is eddy_cuda with slice-to-volume correction step not commonly done?

Personally I never don’t use it.

Regards
Rob

P.S. This is already listed in the ever-expanding GitHub issue list.

Hi @rsmith!

Welcome back! I hope you a happy new year!

Thank you for your insights. Below are my comments and some more questions if you don’t mind.

  1. Regarding the -scratch directory, it was already an existing directory. I have just named the folder “test” to test some of the pipelines that I am building. I thought of structuring the folders such that there is an individual subject folder where all the DWI preprocessing is done, which includes the both scratch and eddy QC directory to be the same. It’s good to know that it’s NOT advisable to have the two the same. I will make that adjustment. Then, I expect that this issue would be resolved. If not, I will come back to this post. :stuck_out_tongue_winking_eye:

  2. On the note of “SliceEncodingDirection”, I want to check with you whether this is the same as the -axes indicated for the mrdegibbs command? or are they two different things? I have checked that it is acquired in the axial direction for the mrdegibbs correction. It would be great to check with you whether they are referring to the same thing.

  3. I can feel your uneased tension on the dwifslpreproc command from all the comments/requests from the community! I won’t ask you to convert the dwifslpreproc command to be “fool-proof”. Perhaps, when I or someone else have extra free time and up for a challenge, this would be a nice task to add the conversion and checkpoints for the SliceEncodingDirection, non-axial direction data, etc.

  4. I understand why DWI data had to be padded when it didn’t have an even-numbered matrix dimension. Now with FSL6, this is not the case as they have allowed preprocessing using their new config file list that can handle by units 1, 2, and 4 as you have also kindly mentioned (https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;6c4c9591.2002). I can see that you can specify the appropriate for your own case. Here for me, it would be for DWI data with an odd-numbered dimension.

Now, you have provided two possible solutions. However, I don’t think these options are already implemented in the dwifslpreproc command. To me, it seems like option 1 may be easier since I would just need to simply specify the “correct” config file that is appropriate for an odd-numbered dimension at least in one direction. However, from looking at the dwifslpreproc, the padding invariably happens prior to the topup step if it contains at least one direction that is an odd number. In addition, I am already using FSL6 and the dwifslpreproc did not find the appropriate file. I guess these two options are for me to try on my own? I have found the following on the forum from https://community.mrtrix.org/t/how-to-pad-a-slice-to-data-for-topup/4195/3?u=jottoy.

I guess such changes are meant for a future release? If these two options are for me to try, I would like to ask for some more details/guidance as I am not too familiar with python and its syntax. a) If I were to try option 1, then would simply commenting out the padding portion of the code suffice https://github.com/MRtrix3/mrtrix3/blob/c838731033331f9e3f2afe451b8a5768e2f83b78/bin/dwifslpreproc#L738-L782? I want to check with you whether the variables that are passed onto the next step depends on this. If so, then I would need to fix/change the variable name, I assume.

You mentioned that topup will take longer for this option. How much longer do you expect? When I ran these tests, with eddy_cuda, the whole preprocessing took ~3-4 hours, which I think is not too bad considering without cuda, it took nearly 9 hours for some subjects. b) If I were to try option 2, then would you kindly provide a list of files that I need to change? If this is too cumbersome, is there an easy way to get a list of all the files that should be changed? It would be very helpful!

  1. Last but not least, I want to double-check what you’ve said. Despite all these warning and errors messages, at the end of the day, my eddy_cuda run with the slice-to-volume correction was executed and finished correctly and successfully, is this correct? If so, I could live with these warning messages for the time being and move forward while testing the two options/solutions that you have provided since there is a timeline for me to meet. haha. Also, I want to check your last comment whether it was a typo or not.

So, you never don’t use it? meaning you always use it? Sorry for being too careful but communication via text can be misleading at times!

Thank you again for your help and expertise! It’s very much appreciated.
Best regards,
Julie

Regarding the -scratch directory, it was already an existing directory.

If that’s the case, then I would expect dwifslpreproc to generate a unique sub-directory within temp/ and use that as its scratch directory; in which case the clash:

dwifslpreproc: [ERROR] shutil.copy('eddy_mask.nii', '/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii') (dwifslpreproc:1207)
dwifslpreproc: [ERROR] Information from failed function:
dwifslpreproc:
               `eddy_mask.nii` and `/data/data05/peter/ws/test/gpu_2slots_test/CN/NI004_20190401/dwipreprocessed/test/eddy_mask.nii` are the same file

is not the script trying to overwrite its own scratch contents during its EddyQC output. Nevertheless, the claim is that test/ already contains a file called eddy_mask.nii, which makes it a poor choice for the path to provide as the input to -eddyqc_*; you’d need to do the backtracing yourself if you really needed to figure out exactly what clashed with what.

On the note of “SliceEncodingDirection”, I want to check with you whether this is the same as the -axes indicated for the mrdegibbs command? or are they two different things?

Well, yes; but also no. :upside_down_face:

In the simplest case, yes, they are essentially providing the same information, just in different forms, since the purpose of -axes in mrdegibbs is to exclude the slice encoding direction from Gibbs ringing removal. But technically, while not currently supported, mrdegibbs could perform Gibbs ringing removal along one axis only, in which case it would not be equivalent to (the inverse set of) the slice encoding axis. SliceEncodingDirection is also technically directed.

Now, you have provided two possible solutions. However, I don’t think these options are already implemented in the dwifslpreproc command.

Correct; I maybe didn’t adequately convey that these were proposed solutions for me to implement, not for you to use now.

To me, it seems like option 1 may be easier since I would just need to simply specify the “correct” config file that is appropriate for an odd-numbered dimension at least in one direction.

One potential solution if you need to be able to proceed with processing right now would be:

  1. Run topup manually, using the config files that doesn’t invoke subsampling

  2. Install the dev branch of MRtrix3 and use the new -topup_files option.

That should bypass the image padding step.

I guess such changes are meant for a future release?

Yes: 3.1.0 is in reference to the next MRtrix3 update that actually introduces new features rather than simply fixing bugs. Those changes are what accumulates on the git branch that we call dev.

If these two options are for me to try, I would like to ask for some more details/guidance as I am not too familiar with python and its syntax.

If that’s your level of experience, then I would probably advise not trying. dwifslpreproc is one of the worst candidates for trying to learn Python. The flow of logic within the code is quite complex because of the range of use cases that need to be supported, so it’s not easy to go in and make small changes.

You mentioned that topup will take longer for this option. How much longer do you expect?

I honestly don’t know; it’s just that the runtime of FSL’s topup is a regular complaint as it has not yet been multi-threaded.

b) If I were to try option 2, then would you kindly provide a list of files that I need to change? If this is too cumbersome, is there an easy way to get a list of all the files that should be changed? It would be very helpful!

I don’t know a priori which files will need to be changed; that’s the outstanding question. Both the output of eddy and the operation of EddyQC are outside of my responsibility. But getting this to work within dwifslpreproc is an experiment that would be accessible for you:

  1. Run dwifslpreproc to completion, with slice encoding axis padding, and -eddyqc_* option (despite the fact that EddyQC will fail), but additionally use the -nocleanup option.

  2. Navigate into the scratch directory.

  3. Manually remove the axis padding from the image that was input to eddy, and manually modify the slspec file th exclude the padded slice.

  4. Attempt to run eddy_quad using the same command-line invocation that dwifslpreproc used.

  5. When eddy_quad fails, read its error message, and figure out what file needs to be modified in order to remove all traces of the padded image slice.

  6. Loop back to step 4 until either eddy_quad succeeds, or there’s some greater roadblock.

  7. Let us know how you went!

Despite all these warning and errors messages, at the end of the day, my eddy_cuda run with the slice-to-volume correction was executed and finished correctly and successfully, is this correct?

Correct; if the warning says that EddyQC failed, but the dwifslpreproc script still succeeds, then your output data are fine, and the path provided via -eddyqc_* will even still contain the various output files generated by eddy; it just won’t contain the outputs that were supposed to have been generated by EddyQC.

Personally I never don’t use it.

So, you never don’t use it? meaning you always use it?

Correct. Your original question was posed as a negative, so my disagreement resulted in a double-negative. But I couldn’t decide where to put the emphasis to prove that it was deliberate. As much as I try to discipline myself to be precise with my words, every now and then I play games in an attempt to preserve some semblance of sanity, and it ends up just making more work for myself :laughing:

Cheers
Rob

Hi Rob,

I was able to test following your suggestion to unpad the appropriate files for the eddy_quad input. It ran without any complaints. So, I think it worked!

I described what I did below for you and those who may be interested in this topic. If you could give a comment when it is not appropriate, it would be appreciated.

First, the eddy_quad command is the following: eddy_quad dwi_post_eddy_unpadded -idx eddy_indices.txt -par eddy_config.txt -m eddy_mask_unpadded.nii -b bvals -f field_map_unpadded.nii -s slspec_unpadded.txt -v

Here, my original DWI space has 116x116x81x127 dimensions. Then, the nifti file with _unpadded.nii ending are the files that I removed the last slice of z dimension that was padded. I used the following command to execute: mrconvert dwi_post_eddy.nii dwi_post_eddy_unpadded.nii -coord 2 0:80 -info. Here, I selected including the 80 because MRtrix follows the zero-indexed system. Is this the correct command/way of removing the padded slice? The image looked good to me. I assume the header info would be good as well.

Then, the only file that I had to unpad was the slspec.txt file although eddy_indices.txt and eddy_config.txt are part of the input files. Of course, there were a couple of extra files that I had to include to satisfy as a prerequisite for the eddy_quad command. I have done some different possible testings, and it seems like these two text files are the necessary ones for the eddy_quad command: dwi_post_eddy.eddy_movement_rms and dwi_post_eddy.eddy_parameters. As these parameters measure movements that are not specific to the padded slice, I didn’t need to adapt anything except for the file names to follow the basename of the dwi_post_eddy input. Does this sound okay?

Thank you again for your amazing support!
Very excited to implement the cuda and slice-to-volume correction with your help! :smiley:

I will be looking forward to the 3.1.0 version.
Best regards,
Julie

1 Like

Here, my original DWI space has 116x116x81x127 dimensions. Then, the nifti file with _unpadded.nii ending are the files that I removed the last slice of z dimension that was padded. I used the following command to execute: mrconvert dwi_post_eddy.nii dwi_post_eddy_unpadded.nii -coord 2 0:80 -info. Here, I selected including the 80 because MRtrix follows the zero-indexed system. Is this the correct command/way of removing the padded slice?

Yep, that’s correct. The additional padded slice is at the largest index, and so omitting the last slice is correct, and what’s done with that command you provide. This also means that the image header transformation is not / does not need to be affected by the padding, which simplifies things.

Then, the only file that I had to unpad was the slspec.txt file although eddy_indices.txt and eddy_config.txt are part of the input files.

The indices and config files both encode information per volume, and so are agnostic to any modifications along the slice encoding direction.


Looking forward to implementing support for this use case in dwifslpreproc!
</sarcasm>

Rob