Hi again,


indx=""
for ((i=1; i<=105; i+=1)); do indx="$indx 1"; done
echo $indx > index.txt

yes, that looks about right. But looking again at your eddy command it looks like you have --index=index, but that your index file is in fact called ‘index.txt'. It looks like eddy is looking for ‘index’, but cannot find it.

Jesper


As far as I can tell it is creating the file in the right place and seems to have 105 ones in it. Any other ideas?

Thanks again, 

Nicole


On Tue, Nov 15, 2016 at 11:30 PM, Jesper Andersson <[log in to unmask]> wrote:
Dear Nicole,

> Could not open matrix file index
> eddy: msg=--index must be an 1xN or Nx1 matrix where N is the number of volumes in --imain
> terminate called after throwing an instance of 'EDDY::EddyException'
>  what():  eddy: msg=--index must be an 1xN or Nx1 matrix where N is the number of volumes in --imain
> ./preprocessDTI.bash: line 7: 11805 Aborted                 (core dumped) fsl5.0-eddy --imain=${subj}_diffusion --mask=${subj}_unwarped_brain_mask --acqp=bubd_parameters --index=index --bvecs=~/Desktop/DRC/preprocess/${subj}/bvecs --bvals=~/Desktop/DRC/preprocess/${subj}/bvals --topup=${subj}_topup_results --out=${subj}_eddycorrected
>
> I thought I had my "index" text file set up correctly, it is currently a .txt file with 104*1 separated by spaces. Here's the output of fslinfo for the image in case that's helpful to know.
>
> data_type      INT16
> dim1           104
> dim2           104
> dim3           72
> dim4           105
> datatype       4
> pixdim1        2.019231
> pixdim2        2.019231
> pixdim3        2.000000
> pixdim4        3.600000
> cal_max        0.0000
> cal_min        0.0000
> file_type      NIFTI-1+
>

if these numbers are all correct, it is quite easy. You have 105 volumes, but 104 ones in your index file.

Jesper



> If anyone has any advice as to what I've done wrong, that would be great. Thank you!
>
> Nicole