Print

Print


Hi FSL experts

I'm currently running eddy and getting this error message (see below) on some of my subjects (roughly 1/10, meaning that 9/10 are processed properly), all files are formatted and named in exactly the same fashion among all subjects. I've seen that other people have had similar error messages in previous FSL-posts, possibly related to bval and/or bvec files? I have not noticed any discernible discrepancies between the bvecs of those analysis that work and those who don't. 

$ ./eddy_prog_final160417.txt 
0 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000
16
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Segmentation violation, Unknown reason, Offending address = (nil)
eddy ) [0x5e0826] [
eddy ) [0x5db62b] [
eddy ) [0x43401b] [
./eddy_prog_final160417.txt: line 2:  5846 Segmentation fault      (core dumped) eddy --imain="${katalog}_DTI.nii" --mask="${katalog}_DTI_bet_015_mask.nii" --acqp="${katalog}_acq.txt" --index="${katalog}_index.txt" --bvecs="${katalog}_DTI.bvec" --bvals="${katalog}_DTI.bval" --out="${katalog}_eddy" --slm=linear

This is my script:

#!/bin/bash
for kat_slash in */ # /home/lenf/test_fslpreproc/glm_160415/NYPUM_083_005_30T_V01 
do
    katalog=$(basename $kat_slash)
    cd $katalog
    fslroi "${katalog}_DTI.nii" "${katalog}_DTI_B0" 0 1 # B0-volymen
    bet "${katalog}_DTI_B0" "${katalog}_DTI_bet_015" -m -f 0.15 # bet pa B0-volymen
    printf "1 0 0 0.05" > "${katalog}_acq.txt" # skriv acq-filen
    grad_vol=($(cat ${katalog}_DTI.bval)) # las in bvec i array grad_vol
    echo ${grad_vol[*]}
    echo ${#grad_vol[*]}
    var_index="${grad_vol[@]//*0/1}" # ersatt varje b-value i grad_vol med 1 > lika manga 1:or som volymer
    printf "${var_index}" > ${katalog}_index.txt # skriv ut var_index med ettor till indexfilen
    echo $var_index
    cat "${katalog}_index.txt"
    eddy --imain="${katalog}_DTI.nii" --mask="${katalog}_DTI_bet_015_mask.nii" --acqp="${katalog}_acq.txt" --index="${katalog}_index.txt" --bvecs="${katalog}_DTI.bvec" --bvals="${katalog}_DTI.bval" --out="${katalog}_eddy" --slm=linear 
    cd ..
done

Any help on this would be greatly appreciated

Kind regards

Björn Åström
Department of clinical neuroscience
Umea University