Commit e5d539ad authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

tiny changes in tests

parent 870bf7bb
......@@ -56,12 +56,12 @@ printf " Test case 1: Normal use with default settings. \n"
printf " Test case 2: Input file contains only frame mid times. \n"
printf " Expected result: Output TAC file with correct contents is made. \n\n"
rm -f output.dft
rm -f output1.dft
$PROGRAM test.dft output.dft
$PROGRAM test.dft output1.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output1.dft output.dft
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output1.dft output1.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......@@ -71,12 +71,12 @@ printf " Test case 1: Input file contains frame start and end times. \n"
printf " Test case 2: Option -mid is used to use frame mid times. \n"
printf " Expected result: Output TAC file with correct contents is made. \n\n"
rm -f output.dft
rm -f output11.dft
$PROGRAM -mid testf.dft output.dft
$PROGRAM -mid testf.dft output11.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output1.dft output.dft
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output1.dft output11.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......@@ -86,12 +86,12 @@ printf " Test case 1: Input file contains frame start and end times. \n"
printf " Test case 2: Option -mid is NOT used. \n"
printf " Expected result: Output TAC file with correct contents is made. \n\n"
rm -f output.dft
rm -f output12.dft
$PROGRAM testf.dft output.dft
$PROGRAM testf.dft output12.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output2.dft output.dft
tacmatch -abs=0.0001 -rel=0.0001 -x=y -y=y -xunit=y -yunit=y true_output2.dft output12.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......
FIT1 fit_feng 1.2.5 (c) 2001-2006 by Turku PET Centre
Date: 2007-01-10
Data file: o15-h2o_onkol.kbq
Data unit:
Time unit: sec
Nr of VOIs: 1
Region Plane Start End dataNr WSS parNr Type Parameters
000001 . . 2.500 457.500 92 9.95E+003 9 1314 8.825492E+001 -8.030293E-002 2.901970E+002 -8.268758E-002 2.041815E+003 -7.855320E-002 1.674327E+002 -1.378363E-003 5.092856E+001
#!/bin/bash
#: Title : test_sim_3tcm
#: Date : 2020-03-11
#: Date : 2021-02-09
#: Author : "Vesa Oikonen" <vesa.oikonen@utu.fi>
#: Options : None
......@@ -40,8 +40,11 @@ if [ ! -f bolus_toofew.dat ] || [ ! -f bolus_wrongorder.dat ] ; then
printf "Failed: required data does not exist.\n"
exit 1
fi
if [ ! -f correct_pb_v3cm.dat ] || [ ! -f correct_pb_vp3cm.dat ] ; then
if [ ! -f correct_3cmp.dat ] || [ ! -f correct_3cms.dat ] ; then
printf "Failed: required data does not exist.\n"
exit 1
fi
if [ ! -f input_3cm.dat ] ; then
printf "Failed: required data does not exist.\n"
exit 1
fi
......@@ -787,7 +790,7 @@ simframe output.dat o15_h2o.fra output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tac2svg -mt="p2t_3c vs RFIT 4.4: radiowater" o15_h2o_rfit.svg -s o15_h2o_rfit.dft -l output.dft
tac2svg -mt="sim_3tcm vs RFIT 4.4: radiowater" o15_h2o_rfit.svg -s o15_h2o_rfit.dft -l output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
......@@ -796,7 +799,7 @@ if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
interpol -y -x=20,50,75,90,120,180,300 output.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.1 -rel=0.01 temp1.dft temp2.dft
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.15 -rel=0.01 temp1.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......@@ -825,7 +828,7 @@ simframe -mid output.dat f18_fdg.fra output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tac2svg -mt="p2t_3c vs RFIT 4.4: FDG" f18_fdg_rfit.svg -s f18_fdg_rfit_min.dft -l output.dft
tac2svg -mt="sim_3tcm vs RFIT 4.4: FDG" f18_fdg_rfit.svg -s f18_fdg_rfit_min.dft -l output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
interpol -y -x=1.3,2,2.5,5,7,10,20,30,40,50,60,70,80 f18_fdg_rfit_min.dft temp1.dft
......@@ -833,7 +836,7 @@ if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
interpol -y -x=1.3,2,2.5,5,7,10,20,30,40,50,60,70,80 output.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.01 -rel=0.01 temp1.dft temp2.dft
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.015 -rel=0.01 temp1.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......@@ -858,7 +861,7 @@ simframe -mid output.dat c11_way100635.fra output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tac2svg -mt="p2t_3c vs RFIT 4.4: [C-11]WAY-100635" c11_way_rfit.svg -s c11_way_rfit_min.dft -l output.dft
tac2svg -mt="sim_3tcm vs RFIT 4.4: [C-11]WAY-100635" c11_way_rfit.svg -s c11_way_rfit_min.dft -l output.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
interpol -y -x=1,2,3,4,5,7,10,15,20,30,40,50,60 c11_way_rfit_min.dft temp1.dft
......@@ -866,7 +869,7 @@ if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
interpol -y -x=1,2,3,4,5,7,10,15,20,30,40,50,60 output.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n ok \n"
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.01 -rel=0.01 temp1.dft temp2.dft
tacmatch -x=y -y=y -tacnames=n -xunit=n -yunit=n -abs=0.015 -rel=0.01 temp1.dft temp2.dft
if [ $? -ne 0 ] ; then printf "Failed!\n" ; exit 1 ; fi
printf "\n passed. \n\n"
......
......@@ -248,7 +248,7 @@ printf "\n passed. \n\n"
printf "=====================================================================\n"
printf " All current tests passed, but more testing needed!\n"
printf "=====================================================================\n"
exit 1
exit 0
printf "=====================================================================\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