Commit 6c3fe40e authored by vesoik@utu.fi's avatar vesoik@utu.fi

Initial simulation for A-V difference

parent 4f303c63
#!/bin/bash
#: Title : A-V difference sim1
#: Date : 2019-01-22
#: Author : "Vesa Oikonen" <vesa.oikonen@utu.fi>
#: Options : None
printf "\n=====================================================================\n"
printf " Making or emptying result folder to not mess with data and script \n"
if [ ! -d res ]; then
mkdir res
else
rm -f res/*
fi
printf "\n=====================================================================\n"
printf " Calculate discrete BTACs from fitted BTACs \n"
printf " Arterial and arterialized venous blood data is collected in a human [F-18]FMPEP-d2 study. \n"
printf " The appearance time of venous BTAC is changed to that of arterial BTAC, \n"
printf " because sampling is from different arms and does not represent A-V delay. \n"
printf "=====================================================================\n"
fit2dat -c=0,90,0.02 subj1_ab.fit res/subj1_ab.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
fit2dat -c=0,90,0.02 subj1_vb.fit res/subj1_vb.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Plot first 20 min \n"
printf "=====================================================================\n"
tac2svg -mt="" -x2=20 res/subj1.svg -l res/subj1_ab.bld res/subj1_vb.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Simulate dispersion to show that A-V difference cannot be explained by dispersion. \n"
printf "=====================================================================\n"
disp4dft ON res/subj1_ab.bld 1 res/subj1_ab_d1.bld
disp4dft ON res/subj1_ab.bld 2 res/subj1_ab_d2.bld
disp4dft ON res/subj1_ab.bld 3 res/subj1_ab_d3.bld
tac2svg -mt="" -x2=20 res/subj1_disp.svg -l res/subj1_ab.bld res/subj1_ab_d1.bld res/subj1_ab_d2.bld res/subj1_ab_d3.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Simulate venous BTAC using CM. \n"
printf "=====================================================================\n"
p2t_v3c -sub res/subj1_ab.bld res/subj1_ab.bld 0.10 0.10 0 0 0 0 0.15 5 25 res/subj1_sim1.tac
tacadd res/subj1_sim1_vb.tac res/subj1_sim1.tac 6
# correct from tissue contribution
taccalc res/subj1_sim1_vb.tac / 0.0375 res/subj1_sim1_vb.bld
p2t_v3c -sub res/subj1_ab.bld res/subj1_ab.bld 0.10 0.04 0 0 0 0 0.15 5 25 res/subj1_sim2.tac
tacadd res/subj1_sim2_vb.tac res/subj1_sim2.tac 6
# correct from tissue contribution
taccalc res/subj1_sim2_vb.tac / 0.0375 res/subj1_sim2_vb.bld
tac2svg -mt="" -x2=20 res/subj1_cm.svg -l res/subj1_ab.bld res/subj1_sim1_vb.bld res/subj1_sim2_vb.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n===================================================================\n"
printf " All done! \n"
printf "===================================================================\n"
exit 0
FIT1 fit_feng 0.7.0 (c) 2018 by Turku PET Centre
Date: 2019-01-22 11:48:37
Data file: PTAC/P111139AB_2.kBq
Data unit: kBq/mL
Time unit: min
Nr of VOIs: 1
Region Plane Start End dataNr WSS parNr Type Parameters
artery . . 0.233 102.633 16 4.78E-02 7 1313 3.193032E+02 -3.509155E+00 1.399463E+01 -7.382264E-01 3.377301E+00 -9.254806E-03 2.915000E-01
FIT1 fit_feng 0.7.0 (c) 2018 by Turku PET Centre
Date: 2019-01-22 11:48:36
Data file: PTAC/P111138VB_2.kBq
Data unit: kBq/mL
Time unit: min
Nr of VOIs: 1
Region Plane Start End dataNr WSS parNr Type Parameters
vena . . 0.233 102.583 20 2.85E+00 7 1313 6.501367E+01 -2.095762E+00 4.049866E+00 -3.850027E-01 2.698440E+00 -6.171539E-03 2.915000E-01
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