Commit 71ea1922 authored by Vesa Oikonen's avatar Vesa Oikonen

added demonstration of mixing error in PK

parent 6c3fe40e
time[minutes] 1[kBq/cc]
0.23300 2.100000e-02
0.55000 2.266900e+01
0.76700 1.234900e+02
1.00000 1.020310e+02
1.25000 7.589800e+01
1.50000 5.056600e+01
1.75000 4.181500e+01
2.00000 3.787000e+01
2.33300 3.707600e+01
2.66700 3.519600e+01
3.00000 3.243600e+01
4.00000 2.819300e+01
5.00000 2.396400e+01
7.50000 1.557100e+01
10.00000 1.162600e+01
15.00000 7.459000e+00
20.00000 5.099000e+00
30.00000 2.722000e+00
40.06700 1.784000e+00
50.20000 1.111000e+00
60.00000 8.960000e-01
70.00000 6.580000e-01
79.96700 5.190000e-01
90.03300 4.960000e-01
100.00000 4.290000e-01
110.00000 3.920000e-01
# Isotope := F-18
# Radiotracer: FDG
# Sampling := arterial plasma
Example of mixing error
=======================
In PK studies plasma sampling is usually started a few minutes after bolus injection.
This can lead to so called mixing error or bolus error.
This example from a FDG study aims to demonstrate the error, or, to show that it can be negligible.
See http://www.turkupetcentre.net/petanalysis/input_pk.html
#!/bin/bash
#: Title : Mixing error
#: Date : 2019-02-13
#: 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 " Cut off samples before 2 min to simulate traditional PK plasma data \n"
printf "=====================================================================\n"
taccut fdg.bld 2 99999 res/pk.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Fit sum-of-exponentials function to it. \n"
printf " Three exponentials are needed to get decent fit in this case. \n"
printf " Plot fitted TAC and data starting from 2 min. \n"
printf "=====================================================================\n"
fit_dexp -3 res/pk.bld res/pk.par
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
fit2dat -c=2,111,0.1 res/pk.par res/pkfit2.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tac2svg -mt="" -yt="" res/pkfit.svg -s res/pk.bld -l res/pkfit2.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Plot fitted and original TACs starting from zero time until 10 min. \n"
printf "=====================================================================\n"
fit2dat -a=15 res/pk.par res/pkfit.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tac2svg -mt="" -yt="" -x2=10 res/pk10.svg fdg.bld -l res/pkfit.bld
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
printf "\n=====================================================================\n"
printf " Calculate AUCs before 2 min from fitted and original TAC. \n"
printf "=====================================================================\n"
printf "\nDot-to-dot AUC 0-2 min\n" > res/auc.txt
interpol -i -x=2 -header=no fdg.bld >> res/auc.txt
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "Exp fit AUC 0-2 min\n" >> res/auc.txt
interpol -i -x=2 -header=no res/pkfit.bld >> res/auc.txt
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
cat res/auc.txt
printf "\n===================================================================\n"
printf " All done! \n"
printf "===================================================================\n"
exit 0
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