X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cluster_tools%2FmergeDoseByRegions.sh;h=598df6925c89c48ae1429e4635a052c85beb04c2;hb=d27b2f45396b69a0d3e61a2179b3d0c784ff9652;hp=0548db6372d87354637939d608e867513e3842cf;hpb=3566b753a5db63397cb87ca4dd84578238749ca4;p=clitk.git diff --git a/cluster_tools/mergeDoseByRegions.sh b/cluster_tools/mergeDoseByRegions.sh index 0548db6..598df69 100755 --- a/cluster_tools/mergeDoseByRegions.sh +++ b/cluster_tools/mergeDoseByRegions.sh @@ -44,18 +44,6 @@ function addToPartialResult { edep3=${edep3/#./0.} file3=$(echo $file3 |awk -v r=${edep3} '{$3=r}1') - # sqrt sum square std_edep*edep: get the 2 values, sum the square, take the sqrt and replace it in the file3 - stdEdep1=$(echo ${file1} | cut -f4 -d' ') - stdEdep2=$(echo ${file2} | cut -f4 -d' ') - stdEdep3=$(python <> ${TMP} - # for all lines (except the 1st), split according tab - # sum the some elements (dose, edep) ... - for i in $(seq 2 $nblines); do - #Get the lines - file1=`sed -n "${i}p" < ${IN1}` - - # copy id - id1=$(echo ${file1} | cut -f1 -d' ') - id1=${id1/#./0.} - file3=$(echo $id1) - - # copy volume - vol1=$(echo ${file1} | cut -f2 -d' ') - vol1=${vol1/#./0.} - file3=$(echo "$file3 $vol1") - - # copy edep - edep1=$(echo ${file1} | cut -f3 -d' ') - edep1=${edep1/#./0.} - file3=$(echo "$file3 $edep1") - - # sqrt sum square std_edep*edep - stdEdep1=$(echo ${file1} | cut -f4 -d' ') - stdEdep3=$(python <> ${TMP} - done - mv -f ${TMP} ${RESULT} -} - - function divideUncertaintyResult { IN1=$2 value=$4 @@ -202,7 +90,7 @@ function divideUncertaintyResult { TMP="$(mktemp)" - # check if all 3 text files have the same number of lines + # check if all 2 text files have the same number of lines nblines=`cat ${IN1} | wc -l` nb3=`cat ${RESULT} | wc -l` @@ -223,13 +111,10 @@ function divideUncertaintyResult { # Divide uncertainty and replace it in the file3 edep1=$(echo ${file1} | cut -f3 -d' ') - stdEdep1=$(echo ${file1} | cut -f4 -d' ') + sqEdep1=$(echo ${file1} | cut -f5 -d' ') stdEdep3=$(python <