Commit 17fe08b3 authored by Vesa Oikonen's avatar Vesa Oikonen

added simulations on the effect of Vb and integration time

parent 5dd7c09c
#!/bin/bash
#: Title : Basic error simulation for perfusion ratio
#: Date : 2019-03-09
#: Date : 2019-03-13
#: Author : "Vesa Oikonen" <vesa.oikonen@utu.fi>
#: Options : None
......@@ -80,6 +80,32 @@ tac2svg -mt="" -x2=120 -legend=y sim/rbf_ttacs200.svg -l sim/renal200.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf " Simulate also without vascular contribution \n"
b2t_h2o -nosub -fpt -voiname=f400 sim/blood.tac 400 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f380 sim/blood.tac 380 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f360 sim/blood.tac 360 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f320 sim/blood.tac 320 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f280 sim/blood.tac 280 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f240 sim/blood.tac 240 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f200 sim/blood.tac 200 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f160 sim/blood.tac 160 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f120 sim/blood.tac 120 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f80 sim/blood.tac 80 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
b2t_h2o -add -nosub -fpt -voiname=f40 sim/blood.tac 40 0.94 1.0 0 20 sim/renal400vb0.tac
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n=====================================================================\n"
printf " Make plot of TTACs with very wide range of renal perfusion values \n"
printf "=====================================================================\n"
......@@ -125,6 +151,18 @@ if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
perfrat sim/renal200.tac f200 sim/renal200.par
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n Calculate perfusion ratios with Vb 0 \n"
perfrat sim/renal400vb0.tac f400 sim/renal400vb0.par
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n Calculate perfusion ratios with extended (p) or shortened (n) time \n"
perfrat -etime=5 sim/renal400.tac f400 sim/renal400etp5.par
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
perfrat -etime=-5 sim/renal400.tac f400 sim/renal400etn5.par
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n=====================================================================\n"
printf " Plot the results \n"
......@@ -148,6 +186,31 @@ if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tac2svg -legend=n -mt="" -xt="Perfusion" -yt="Perfusion ratio" sim/rbf_pr200.svg -l sim/c200.dat -b sim/res200.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n Compare the PR with and without Vb \n"
tacformat -f=tsv sim/renal400vb0.par sim/res400vb0.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tacsetx sim/res400vb0.dat sim/x400.dat 1
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tac2svg -legend=n -mt="" -xt="Perfusion" -yt="Perfusion ratio" sim/rbf_pr400vb.svg -l sim/c400.dat -b sim/res400.dat sim/res400vb0.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n Compare with extended (p) or shortened (n) time \n"
tacformat -f=tsv sim/renal400etp5.par sim/res400etp5.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tacsetx sim/res400etp5.dat sim/x400.dat 1
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tacformat -f=tsv sim/renal400etn5.par sim/res400etn5.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tacsetx sim/res400etn5.dat sim/x400.dat 1
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
tac2svg -legend=n -mt="" -xt="Perfusion" -yt="Perfusion ratio" sim/rbf_pr400et.svg -l sim/c400.dat -b sim/res400.dat sim/res400etp5.dat sim/res400etn5.dat
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n===================================================================\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment