Dwipreproc rpe_all

Dear all

I’ve this problem running dwipreproc

$ dwipreproc auto-dti_APPA.mif auto-dti_preproc.mif -rpe_all -pe_dir PA -eddy_options "--slm=linear "
$ dwipreproc : [ERROR] Unable to determine matching reversed phase-encode direction volume for DWI volume 2

for note

  • I’ve 2 DWI volumes AP and PA and I try to use dwipreproc
- $ mrinfo auto-dti_AP.mif
************************************************
Image:               "auto-dti_AP.mif"
************************************************
  Dimensions:        128 x 128 x 24 x 33
  Voxel size:        1.75 x 1.75 x 2 x ?
  Data strides:      [ -1 -2 3 4 ]
  Format:            MRtrix
  Data type:         unsigned 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1.78095
  Transform:               0.9983    -0.05261    -0.02375      -106.3
                          0.05303      0.9984     0.01736      -97.71
                           0.0228    -0.01859      0.9996      -27.04
  EchoTime:          0.093387
  FlipAngle:         90
  RepetitionTime:    2.8905
  command_history:   mrconvert "." "auto-dti_AP.mif"  (version=3.0_RC3-214-g1b818fca)
  comments:          STATE COSMIN DANIEL    (10900165) [MR] DTI_32_AP
                     study: FOSSE POST [ ORIGINAL PRIMARY M_SE M SE ]
                     DOB: 02/08/1996
                     DOS: 16/10/2019 09:45:35
  dw_scheme:         0,0,0,0
  [33 entries]       -0.023748479783535004,0.017358968034386635,0.99956727027893066,1000
                     ...
                     -0.49237087368965149,-0.40296009182929993,0.77148574590682983,1000
                     -0.98746919631958008,-0.019199294969439507,0.15663017332553864,1000
  mrtrix_version:    3.0_RC3-214-g1b818fca

please help

thanks +++

Tim
see appended

I am also seeing a similar problem.

dwipreproc: [ERROR] Unable to determine matching reversed phase-encode direction volume for DWI volume 1.

We are processing about 100 subjects, and seeing this on about half of the subject. Maybe there is something wrong with the same bvecs are rounded (for matching?)

The below is the entire output from dwipreproc.

$ dwipreproc -eddy_options '  --repol --data_is_shelled --slm=linear --niter=5' -rpe_all -pe_dir AP dwi_denoise_degibbs.mif dwi_denoise_degibbs_eddy.mif -eddyqc_all ./eddyqc 
dwipreproc: 
dwipreproc: 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.
dwipreproc: 
dwipreproc: Generated temporary directory: /home/hayashis/Downloads/dwipreproc-tmp-2XWKCY/
Command:  mrconvert /home/hayashis/Downloads/dwi_denoise_degibbs.mif /home/hayashis/Downloads/dwipreproc-tmp-2XWKCY/dwi.mif
dwipreproc: Changing to temporary directory (/home/hayashis/Downloads/dwipreproc-tmp-2XWKCY/)
matching index1:0
index2:72
dwi_num_volumnes:144
grad1:[0.0, 0.0, 0.0, 0.0]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:72
matching index1:1
index2:73
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.9999565608, -0.00707591008, -0.006066959893, 989.999975]
matching index1:1
index2:74
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.9999821093, -0.005981729776, 1005.000019]
matching index1:1
index2:75
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.02504331829, 0.655557579, -0.7547298145, 989.9999815]
matching index1:1
index2:76
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.5891150802, -0.7704021296, -0.2437703448, 1000.00001]
matching index1:1
index2:77
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.2359168994, -0.5314917603, -0.8135476171, 989.9999856]
matching index1:1
index2:78
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.8938854181, -0.2656021845, -0.3611431002, 989.9999023]
matching index1:1
index2:79
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.7988092416, 0.1353889127, -0.5861515486, 984.9999723]
matching index1:1
index2:80
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2328688083, 0.9328112714, -0.2750186357, 999.9999758]
matching index1:1
index2:81
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:82
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.9369556079, 0.1467639713, -0.3171348696, 989.9999224]
matching index1:1
index2:83
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.5038913499, -0.8473682422, 0.1675128941, 999.9999959]
matching index1:1
index2:84
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.3449192932, -0.8516358114, 0.3946481039, 1000.000005]
matching index1:1
index2:85
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.4567484553, -0.6371757977, 0.6207961433, 995.0000024]
matching index1:1
index2:86
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.4876230197, -0.3965021538, -0.77782378, 985.0000654]
matching index1:1
index2:87
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.6167598838, 0.6786728363, -0.3987611153, 995.0000406]
matching index1:1
index2:88
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.5787692745, -0.111476095, 0.8078361264, 984.9999731]
matching index1:1
index2:89
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.8250462628, -0.526606335, -0.20490103, 994.999948]
matching index1:1
index2:90
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:91
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.895791564, -0.04728361023, 0.4419521854, 989.9999264]
matching index1:1
index2:92
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2901141359, -0.5482568765, 0.7843775784, 989.9999912]
matching index1:1
index2:93
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.1150200032, -0.9645821768, 0.2373849679, 999.9999343]
matching index1:1
index2:94
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.8000754531, 0.4099099244, 0.4380104144, 990.0000451]
matching index1:1
index2:95
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.5118810034, 0.8430330316, -0.1651458324, 999.9999623]
matching index1:1
index2:96
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.7906338, 0.1597335613, 0.5910866127, 984.9998456]
matching index1:1
index2:97
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.9491868588, -0.2403454029, -0.2031708503, 995.0000057]
matching index1:1
index2:98
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2323098361, 0.788614104, -0.5693153213, 994.9999755]
matching index1:1
index2:99
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:100
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0199764243, -0.1942943657, 0.9807398442, 984.9999755]
matching index1:1
index2:101
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2158380864, -0.9577605581, -0.1900227191, 1005.00003]
matching index1:1
index2:102
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.7720274608, -0.6089869488, -0.1819574013, 1000.000082]
matching index1:1
index2:103
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.1600511666, 0.3630185119, -0.9179331044, 985.0000045]
matching index1:1
index2:104
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.1465623015, 0.7371672658, 0.6596240702, 995.000089]
matching index1:1
index2:105
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.8868907819, 0.4233542444, -0.1849214015, 994.9999711]
matching index1:1
index2:106
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.5635648224, 0.238691741, 0.7908355985, 985.0000513]
matching index1:1
index2:107
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.3819320242, 0.1494071053, -0.9120336867, 984.9999791]
matching index1:1
index2:108
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:109
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.3068391819, -0.2063414547, 0.9291248143, 984.9999114]
matching index1:1
index2:110
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.3331855467, -0.136038986, -0.9329955979, 980.000041]
matching index1:1
index2:111
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.9618037623, -0.271306476, -0.03641866029, 995.0000652]
matching index1:1
index2:112
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.9596650444, 0.2115071084, -0.1852235019, 995.0000323]
matching index1:1
index2:113
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.4507181272, -0.8906774367, -0.05955563409, 1004.9999]
matching index1:1
index2:114
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.7701517354, 0.6328940996, -0.07944408814, 999.9999974]
matching index1:1
index2:115
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.7100332052, 0.4149750876, -0.568901155, 990.0000912]
matching index1:1
index2:116
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.695902611, 0.02958313109, -0.7175265809, 984.999929]
matching index1:1
index2:117
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:118
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.6814672474, 0.5352043605, 0.4991579742, 994.9999641]
matching index1:1
index2:119
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.1415655565, -0.7314580434, -0.6670294776, 995.0000668]
matching index1:1
index2:120
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.7410058748, 0.395233472, -0.5428635152, 989.9999014]
matching index1:1
index2:121
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.102484551, 0.8276202428, -0.5518529247, 995.0000604]
matching index1:1
index2:122
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.5838748698, -0.602538693, -0.5440930617, 995.0000391]
matching index1:1
index2:123
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.08727772394, -0.3418323641, -0.9356993287, 985.0000316]
matching index1:1
index2:124
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.5500507616, -0.7966462155, -0.2505972206, 999.9999052]
matching index1:1
index2:125
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.8371042842, -0.4640292058, 0.2897124669, 994.9999444]
matching index1:1
index2:126
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:127
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.3630114183, -0.5680458523, -0.7386112779, 990.000008]
matching index1:1
index2:128
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.1836361666, 0.3995099241, 0.8981478602, 989.9999143]
matching index1:1
index2:129
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.7176295254, -0.6964236223, -0.001415149956, 999.999908]
matching index1:1
index2:130
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.4329999453, 0.6878464922, 0.5825617997, 994.9999697]
matching index1:1
index2:131
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.501827032, 0.6961205197, -0.5134061277, 995.0001157]
matching index1:1
index2:132
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.1710452303, -0.5161890434, 0.8392213061, 989.9999823]
matching index1:1
index2:133
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.4636260654, 0.4303399126, -0.7745052816, 990.0000912]
matching index1:1
index2:134
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.3838653298, -0.8141389556, -0.4356893039, 994.9999836]
matching index1:1
index2:135
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.0, 0.0, 0.0, 0.0]
matching index1:1
index2:136
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.7150368331, -0.2536229066, -0.6514581711, 985.0000991]
matching index1:1
index2:137
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2593905425, 0.8880150047, 0.3796655079, 999.9999268]
matching index1:1
index2:138
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-8.47e-05, 0.08298241603, 0.996551008, 984.9999393]
matching index1:1
index2:139
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.03643157823, -0.9059204154, -0.4218778746, 999.9999357]
matching index1:1
index2:140
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.5709425598, -0.3105253761, 0.7599990686, 990.0000726]
matching index1:1
index2:141
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[0.2829893494, 0.1518946569, 0.947019029, 985.0000241]
matching index1:1
index2:142
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.719800704, 0.6140916799, -0.323694849, 994.999854]
matching index1:1
index2:143
dwi_num_volumnes:144
grad1:[-0.9999821093, -2.050993384e-10, -0.005981729776, 1005.000019]
grad2:[-0.2656599953, 0.9609300164, 0.07770630932, 1004.999944]
dwipreproc: [ERROR] Unable to determine matching reversed phase-encode direction volume for DWI volume 1
dwipreproc: Changing back to original directory (/home/hayashis/Downloads)
dwipreproc: Contents of temporary directory kept, location: /home/hayashis/Downloads/dwipreproc-tmp-2XWKCY/

Determination of volumes with matching diffusion sensitisation directions is done by this code. So any potential source of discrepancy between the gradient tables stored in the headers of the AP and PA DWI series that exceeds the thresholds there will result in dwipreproc not being able to proceed.

Because mrinfo truncates the contents of multi-line header entries, what really needs to be provided is the output of: “mrinfo auto-dti_APPA.mif -dwgrad”.

Rob

Dear Rob
thanks a lot, it actually worked
but could you help me to create an ouput and implement it in the dwipreproc command ?
best
TJ

@Timothee_Jacquesson

I made a script like this to check it.

#!/usr/bin/python

def grads_match(one, two):
  # Dot product between gradient directions
  # First, need to check for zero-norm vectors:
  # - If both are zero, skip this check
  # - If one is zero and the other is not, volumes don't match
  # - If neither is zero, test the dot product
  if any([val for val in one[0:3]]):
    if not any([val for val in two[0:3]]):
      return False
    dot_product = one[0]*two[0] + one[1]*two[1] + one[2]*two[2]
    if abs(dot_product) < 0.999:
      return False
  elif any([val for val in two[0:3]]):
    return False
  # b-value
  if abs(one[3]-two[3]) > 10.0:
    return False
  return True

#output from mrinfo dwi.mif -dwgrad
with open("grad.txt") as f:
    content = f.readlines()
content = [x.strip() for x in content] 
#print(content)

print(len(content))
one = [float(i) for i in content[1].split()]
two = [float(i) for i in content[73].split()]
print(one)
print(two)
print(grads_match(one, two))

@rsmith

So for my case, it looks like the dot product is all >0.999, but it’s failing to match because of a few (2 our of 72 pairs) bvalue differences being >10

[-0.999982, -2.051e-10, -0.00598173, 1005.0]
[-0.999963, -0.00606606, -0.00606606, 990.0]

Could the b-value difference threshold be configurable? Also, I think <10 is a bit too strict as this code is simply making sure that the gradient table is lined up correctly… I am not an expert but maybe <50 would be ok for this?

Or… do you suggest I round the bvecs before running mrtrix?

Okay, that makes sense now.

For a quick fix, you can either:

  • Increase the numerical threshold for the b-value comparison within the dwipreproc code;

  • Edit your gradient table so that there is no fluctuation between volumes corresponding to the same nominal b-value.

Longer-term more robust solution has been listed as an issue on GitHub.

Hi Rob/All,

I am also getting an error when using dwifslpreproc with -rpe_all specified:

dwifslpreproc: [ERROR] Unable to determine matching reversed phase-encode direction volume for DWI volume 2

The gradient tables of the AP and PA images are identical (well, at least the outputs of mrinfo -dwgrad are identical).

Here is the command that resulted in the above error:

dwifslpreproc diffusion_mif.mif diffusion_preproc.mif.gz -eddy_mask brainmask.mif -rpe_all -se_epi AP_PA.mif.gz -pe_dir AP -scratch ${tmp_dir} -eddy_options " --slm=linear" -nocleanup -force

(dwicat was used to concatenate the AP and PA images and MRtrix version installed is 3.0.2-6-g4ab54489)

Any ideas on how to resolve this error?

Cheers,
Arkiev

Hi Arkiev,

Given you’re on 3.0.2 and not 3.0.3, it’s possibly due to inconsequential differences in “diffusion densitisation direction” for b=0 volumes, which was reported here and fixed here. Is the third volume in the input data a b=0 volume?

If it’s not that, then I would need to see the full gradient table of the concatenated DWI series.

Cheers
Rob

Hi Rob,
The third volume is not a b=0 volume for either diffusion_mif.mif or AP_PA.mif.

Here’s the output to mrinfo -dwgrad AP_PA.mif

0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.201249310403567   0.893414658615834  -0.401632870707118         2990
   -0.5497217310965   0.520105650596689   0.653678920095839         3000
  -0.871876230937763  -0.451752414819566  -0.189080918208189         2995
  -0.612808128910726   0.348703107606103  -0.709134923612412         2985
  -0.429206211208355   -0.58667810591142   0.686724710713367         3005
  -0.41531012589066  -0.587330428486791  -0.694665723284377         2990
  0.931487535483067  -0.179702977496733   -0.31628754499425         2995
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.631359725372894   0.77354283746679  0.0549215420476421         2995
  0.154326694997269   0.189540418596646  -0.969668861482841         2985
  0.880541527748147  0.0832351321345512   0.466603183325513         3000
  0.538475446100951   0.841084425701486  -0.0511974881100905         2990
  0.206237894099977  -0.562370779199936  -0.800752794399909         2990
  -0.257398685208194   0.80137455842551  -0.539948825317188         2985
  -0.837066964596321   -0.36640651939839   0.406282117898214         3005
  -0.395622755801045  -0.111990008900296  -0.911559582802407         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.130849620703959  -0.982859445929737  -0.129867957203929         3000
  -0.866588866288584   0.449304038094081  -0.217139628297139         2990
   -0.443193572822   0.147077282107301   0.884278084143896         3005
  -0.642671985102928   -0.38623101420176  -0.661663300503014         2990
  0.257623418788905  -0.960851589758618  -0.101952913395609         3000
  0.0970958868002543   0.535492909801403  -0.838939647602197         2980
  0.791010011861151  -0.0698474426565696  -0.607803007470149         2990
  0.591009129709567   -0.73697601431193   0.327985613905309           5
   0.55417002519591   0.767577552794335   0.322056336097623         2995
  -0.203360315000992   0.122575690600598  -0.971400938004738         2980
  -0.520838231299816   0.699989351099753   0.488612776299828         3000
  -0.965090365864295  -0.261682834190319  -0.0110761006695902         3000
  -0.284421680508449   0.927511269427553  -0.242543094607205         2985
  0.140850259995703   0.724629348377894   0.67459136647942         3000
  -0.658047418881506   0.678366610180935  -0.326790967890816         2985
  0.549883298706598   0.34584980770415  -0.760273811409122         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.361806962093755  -0.768076876586743   0.528349916090881         3000
 -0.0978129112259307   0.312431528887002   0.94489109116069         3010
  -0.702543453044425   0.119328416607546  -0.701564983144364         2990
  0.775846621035087  -0.519260795123483  -0.358371660816207         2990
  -0.815227625901968  -0.579140672001398 -9.88601514602387e-08         3000
  0.117151386902492   0.969716201620627  -0.214303618404558         2990
   0.99275427598963  -0.0507673386794697   0.108911086798862         2995
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.256288809808584   0.51293681581718  -0.819275209527441         2985
  -0.166030681100064  -0.906599035700348  -0.387958762500149         2995
  -0.240956313294633   0.855857746680937   0.457654424789806         3000
  -0.764960128560374  -0.534464516572314  -0.359421315781381         2990
  -0.67227878001294  -0.618126703511898   0.407382646107842         3000
   0.88923086501582  -0.456938669908129   0.021806435880388         2995
-5.15829410505672e-08   0.807355600708877  -0.590065194706488         2985
  0.524974012170063  -0.368263999778999  -0.767322561256243         2985
  -0.551721514731232  -0.193068590210929  -0.811374075045931         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.427501454913091   0.902941113727651  -0.0440437417513488         2990
  0.113838946896817   0.10408748339709   0.988031623972373         3005
  0.898165501625506   0.414927875611783  -0.145373965104128         2985
  -0.19476063298873  -0.707328091359071   0.67952576626068         3005
   0.31594228069377   0.782210044884575   0.536961749989411         2995
  0.796765023679513  -0.350098245590998  -0.492541079987335         2990
  -0.811395659182435   0.208587267395485   -0.54601138828818         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.496256885683741  -0.0816655999273244   0.864326230771683         3005
  -0.310951725895098  -0.948265606085052  0.0640418962789905         3000
  0.803446493437548   0.346124863816176   0.484428850122639         3000
  -0.322650255010802   0.720337653824116   0.614011789320557         3000
  -0.41191757379719   0.611468918895829  -0.675595791595391         2980
  -0.977404340043155   0.211375617309333  0.0010509385820464         2990
  -0.646107309084729  -0.516110016187802   0.56229511498671         3000
  0.420481724905515   0.375719563804928   0.825851032810832         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.757407375419496  -0.641119195016502   0.123694160903184         3000
  -0.036210483251021   0.349961727609867  -0.936063881426393         2980
  0.0580525144626786  -0.965453270444547  -0.254027337411721         2995
  0.689959995488292   0.712117856787916   0.129781981297798         2995
  0.339240820200678  -0.360100210100719  -0.869047469701736         2990
  0.105984293597773  -0.911869126380841   0.396562764091668         3000
  -0.886277320976144  -0.0777627857279068   0.45658017858771         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.504151490204885  -0.110804514301074   0.856477457108298         3005
   0.65219007830521  -0.688072248705497  -0.318126833702541         2995
  -0.970915890877895  -0.141701948196774  -0.192984172195606         2995
 -0.0511482661189302  -0.584412351087777  -0.809843230983062         2990
  -0.478693239213996  -0.798247871923339   0.365585992210689         3000
  0.696262215666589  -0.535104643274322   0.478416082277042         3000
  0.342620222805548   0.380928871806168  -0.858780867013906         2985
  -0.60443214148377  -0.629306271283103  -0.488503227486883         2990
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.644927953895713   0.199824888198672   0.737657066895097         3005
  0.0650036403413805  -0.994612316121122  0.0807518876717149         3000
  0.703411819180313   0.102096388497142   0.703411785580313         3010
  0.121831241298567  -0.658671890792254   0.742501507691269         3005
  -0.877222804779061   0.449349047589274   0.169013562195966         2995
 -0.0209279015699611   0.833047508698451   0.552805455098972         2995
  -0.728196540916656  -0.651165334714894   0.21380716700489         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.184203536692765  -0.0580007807077218  -0.981175298561461         2990
  -0.473899887718616   0.804626634931608  -0.357763713614054         2985
  0.984832864432493  0.0851245240528085  -0.151188771204988         2995
  0.377311221200498   0.896575566201184   0.231923471100306         2990
  -0.342687662387535   0.325977421188143  -0.881081089867951         2980
  -0.399838237301792   0.863723517403872   0.306775275201375         3000
  -0.711757705562983   -0.23246107378791   0.662844489865527         3005
  -0.934766264820802   0.203304243504524  -0.291340719306483         2990
  0.137768855503663   0.361838453409621   0.922004705024516         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.201249310403567   0.893414658615834  -0.401632870707118         2990
   -0.5497217310965   0.520105650596689   0.653678920095839         3000
  -0.871876230937763  -0.451752414819566  -0.189080918208189         2995
  -0.612808128910726   0.348703107606103  -0.709134923612412         2985
  -0.429206211208355   -0.58667810591142   0.686724710713367         3005
  -0.41531012589066  -0.587330428486791  -0.694665723284377         2990
  0.931487535483067  -0.179702977496733   -0.31628754499425         2995
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.631359725372894   0.77354283746679  0.0549215420476421         2995
  0.154326694997269   0.189540418596646  -0.969668861482841         2985
  0.880541527748147  0.0832351321345512   0.466603183325513         3000
  0.538475446100951   0.841084425701486  -0.0511974881100905         2990
  0.206237894099977  -0.562370779199936  -0.800752794399909         2990
  -0.257398685208194   0.80137455842551  -0.539948825317188         2985
  -0.837066964596321   -0.36640651939839   0.406282117898214         3005
  -0.395622755801045  -0.111990008900296  -0.911559582802407         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.130849620703959  -0.982859445929737  -0.129867957203929         3000
  -0.866588866288584   0.449304038094081  -0.217139628297139         2990
   -0.443193572822   0.147077282107301   0.884278084143896         3005
  -0.642671985102928   -0.38623101420176  -0.661663300503014         2990
  0.257623418788905  -0.960851589758618  -0.101952913395609         3000
  0.0970958868002543   0.535492909801403  -0.838939647602197         2980
  0.791010011861151  -0.0698474426565696  -0.607803007470149         2990
  0.591009129709567   -0.73697601431193   0.327985613905309           5
   0.55417002519591   0.767577552794335   0.322056336097623         2995
  -0.203360315000992   0.122575690600598  -0.971400938004738         2980
  -0.520838231299816   0.699989351099753   0.488612776299828         3000
  -0.965090365864295  -0.261682834190319  -0.0110761006695902         3000
  -0.284421680508449   0.927511269427553  -0.242543094607205         2985
  0.140850259995703   0.724629348377894   0.67459136647942         3000
  -0.658047418881506   0.678366610180935  -0.326790967890816         2985
  0.549883298706598   0.34584980770415  -0.760273811409122         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.361806962093755  -0.768076876586743   0.528349916090881         3000
 -0.0978129112259307   0.312431528887002   0.94489109116069         3010
  -0.702543453044425   0.119328416607546  -0.701564983144364         2990
  0.775846621035087  -0.519260795123483  -0.358371660816207         2990
  -0.815227625901968  -0.579140672001398 -9.88601514602387e-08         3000
  0.117151386902492   0.969716201620627  -0.214303618404558         2990
   0.99275427598963  -0.0507673386794697   0.108911086798862         2995
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.256288809808584   0.51293681581718  -0.819275209527441         2985
  -0.166030681100064  -0.906599035700348  -0.387958762500149         2995
  -0.240956313294633   0.855857746680937   0.457654424789806         3000
  -0.764960128560374  -0.534464516572314  -0.359421315781381         2990
  -0.67227878001294  -0.618126703511898   0.407382646107842         3000
   0.88923086501582  -0.456938669908129   0.021806435880388         2995
-5.15829410505672e-08   0.807355600708877  -0.590065194706488         2985
  0.524974012170063  -0.368263999778999  -0.767322561256243         2985
  -0.551721514731232  -0.193068590210929  -0.811374075045931         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.427501454913091   0.902941113727651  -0.0440437417513488         2990
  0.113838946896817   0.10408748339709   0.988031623972373         3005
  0.898165501625506   0.414927875611783  -0.145373965104128         2985
  -0.19476063298873  -0.707328091359071   0.67952576626068         3005
   0.31594228069377   0.782210044884575   0.536961749989411         2995
  0.796765023679513  -0.350098245590998  -0.492541079987335         2990
  -0.811395659182435   0.208587267395485   -0.54601138828818         2985
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.496256885683741  -0.0816655999273244   0.864326230771683         3005
  -0.310951725895098  -0.948265606085052  0.0640418962789905         3000
  0.803446493437548   0.346124863816176   0.484428850122639         3000
  -0.322650255010802   0.720337653824116   0.614011789320557         3000
  -0.41191757379719   0.611468918895829  -0.675595791595391         2980
  -0.977404340043155   0.211375617309333  0.0010509385820464         2990
  -0.646107309084729  -0.516110016187802   0.56229511498671         3000
  0.420481724905515   0.375719563804928   0.825851032810832         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.757407375419496  -0.641119195016502   0.123694160903184         3000
  -0.036210483251021   0.349961727609867  -0.936063881426393         2980
  0.0580525144626786  -0.965453270444547  -0.254027337411721         2995
  0.689959995488292   0.712117856787916   0.129781981297798         2995
  0.339240820200678  -0.360100210100719  -0.869047469701736         2990
  0.105984293597773  -0.911869126380841   0.396562764091668         3000
  -0.886277320976144  -0.0777627857279068   0.45658017858771         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.504151490204885  -0.110804514301074   0.856477457108298         3005
   0.65219007830521  -0.688072248705497  -0.318126833702541         2995
  -0.970915890877895  -0.141701948196774  -0.192984172195606         2995
 -0.0511482661189302  -0.584412351087777  -0.809843230983062         2990
  -0.478693239213996  -0.798247871923339   0.365585992210689         3000
  0.696262215666589  -0.535104643274322   0.478416082277042         3000
  0.342620222805548   0.380928871806168  -0.858780867013906         2985
  -0.60443214148377  -0.629306271283103  -0.488503227486883         2990
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  -0.644927953895713   0.199824888198672   0.737657066895097         3005
  0.0650036403413805  -0.994612316121122  0.0807518876717149         3000
  0.703411819180313   0.102096388497142   0.703411785580313         3010
  0.121831241298567  -0.658671890792254   0.742501507691269         3005
  -0.877222804779061   0.449349047589274   0.169013562195966         2995
 -0.0209279015699611   0.833047508698451   0.552805455098972         2995
  -0.728196540916656  -0.651165334714894   0.21380716700489         3000
  0.591009129709567   -0.73697601431193   0.327985613905309           5
  0.184203536692765  -0.0580007807077218  -0.981175298561461         2990
  -0.473899887718616   0.804626634931608  -0.357763713614054         2985
  0.984832864432493  0.0851245240528085  -0.151188771204988         2995
  0.377311221200498   0.896575566201184   0.231923471100306         2990
  -0.342687662387535   0.325977421188143  -0.881081089867951         2980
  -0.399838237301792   0.863723517403872   0.306775275201375         3000
  -0.711757705562983   -0.23246107378791   0.662844489865527         3005
  -0.934766264820802   0.203304243504524  -0.291340719306483         2990
  0.137768855503663   0.361838453409621   0.922004705024516         3000

Thanks for your help!
Arkiev

Those data look entirely sensible. Which means that the only chance I have of getting any insight into what’s going wrong here would be to have access to an exemplar dataset where this problem arises so that I can duplicate the fault and then interrogate from there.

Hi Rob,
My mistake - wrong syntax… the command that I was using was

dwifslpreproc diffusion_mif.mif diffusion_preproc.mif.gz -eddy_mask brainmask.mif -rpe_all -se_epi AP_PA.mif.gz -pe_dir AP -scratch ${tmp_dir} -eddy_options " --slm=linear" -nocleanup -force```

However, the syntax for -rpe_all should not contain the -se_epi option… what worked for me was

dwifslpreproc $diffusion_mif.mif $diffusion_preproc.mif.gz  -eddy_mask ${brainmask_binary} -rpe_all -pe_dir AP -scratch ${diffusion_processed_dir} -eddy_options "  --slm=linear" -nocleanup -force

Again, thanks for your help :slight_smile:

Cheers,
Arkiev