Skip to content

Commit 4b2c8ef

Browse files
author
Toni REEVES
committed
Adding files for different scenarios for running SimSET
1 parent a7238f8 commit 4b2c8ef

10 files changed

Lines changed: 1774 additions & 0 deletions
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#! /bin/bash
2+
3+
# This is an example run with the templates distributed with STIR (appropriate for the HR+).
4+
# The code below works in bash, sh, ksh etc, but needs to be modified for csh.
5+
# Authors: Kris Thielemans
6+
#
7+
#
8+
# Copyright (C) 2005 - 2006, Hammersmith Imanet Ltd
9+
# Copyright (C) 2011-07-01 - 2012, Kris Thielemans
10+
# This file is part of STIR.
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
#
14+
# See STIR/LICENSE.txt for details
15+
16+
# adjust location of SimSET to where you have it installed.
17+
# set SIMSET_DIR if it isnt set by the user
18+
: ${SIMSET_DIR:=/home/treeves/2.9.2}
19+
export SIMSET_DIR
20+
21+
PATH=/home/treeves/devel/build/sources/STIR/src/SimSET/scripts:$PATH
22+
23+
24+
#All STIR utilities/scripts have to be in your path, e.g. if your
25+
#INSTALL_PREFIX was ~/STIR-bin, you could do
26+
# PATH=$PATH:~/STIR-bin/bin
27+
28+
# generate emission image
29+
# generate_image generate_uniform_cylinder.par
30+
# use the same size for the attenuation in this example
31+
# above par file sets image values to 1, so line below will use water for attenuation
32+
33+
# give the simulation a name. All output files will go into a new subdirectory of this name
34+
SIM_NAME=/home/treeves/devel/build/sources/STIR/src/SimSET/examples/TOF_Scatter_Simulation
35+
# number of decays to simulate
36+
PHOTONS=300000000
37+
# specify names/locations of input files
38+
EMISS_DATA=/SAN/medic/Energy_PET_STIR_Sims/Image_Data/XCAT_data/XCAT_act_resample_171_2nd_downsample_TOF_scatter.hv
39+
ATTEN_DATA=/SAN/medic/Energy_PET_STIR_Sims/Image_Data/XCAT_data/XCAT_atn_correct_resample_171_2nd_downsample_TOF_scatter.hv
40+
templ_dir=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
41+
DIR_INPUT=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
42+
TEMPLATE_PHG=${templ_dir}/phg_with_tomos.rec
43+
#TEMPLATE_BIN=${templ_dir}/template_bin.rec
44+
#TEMPLATE_BIN_2=${templ_dir}/template_bin_energy_params_2.rec
45+
TEMPLATE_DET=${templ_dir}/template_det.rec
46+
# specify scanner
47+
SCANNER="GE Discovery 690"
48+
# maximum ring difference to store in conversion from SimSET to Interfile projdata
49+
NUM_SEG=0
50+
# export all variables
51+
export SIM_NAME EMISS_DATA ATTEN_DATA TEMPLATE_PHG
52+
export PHOTONS NUM_SEG SCANNER
53+
export DIR_INPUT
54+
DIR_OUTPUT=${SIM_NAME}
55+
export DIR_OUTPUT
56+
57+
58+
# set the simulation going
59+
run_SimSET_multi_parameter.sh
60+
61+
echo "Current working directory: $(pwd)"
62+
63+
# Start phg in background
64+
#$SIMSET_DIR/bin/phg "${DIR_OUTPUT}/phg.rec" > "${DIR_OUTPUT}/phg.log" 2>&1 &
65+
66+
PHG_PID=$!
67+
68+
# Wait for phg to finish
69+
wait $PHG_PID
70+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#! /bin/bash
2+
3+
# This is an example run with the templates distributed with STIR (appropriate for the HR+).
4+
# The code below works in bash, sh, ksh etc, but needs to be modified for csh.
5+
# Authors: Kris Thielemans
6+
#
7+
#
8+
# Copyright (C) 2005 - 2006, Hammersmith Imanet Ltd
9+
# Copyright (C) 2011-07-01 - 2012, Kris Thielemans
10+
# This file is part of STIR.
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
#
14+
# See STIR/LICENSE.txt for details
15+
16+
# adjust location of SimSET to where you have it installed.
17+
# set SIMSET_DIR if it isnt set by the user
18+
: ${SIMSET_DIR:=/home/treeves/2.9.2}
19+
export SIMSET_DIR
20+
21+
PATH=/home/treeves/devel/build/sources/STIR/src/SimSET/scripts:$PATH
22+
23+
24+
#All STIR utilities/scripts have to be in your path, e.g. if your
25+
#INSTALL_PREFIX was ~/STIR-bin, you could do
26+
# PATH=$PATH:~/STIR-bin/bin
27+
28+
# generate emission image
29+
# generate_image generate_uniform_cylinder.par
30+
# use the same size for the attenuation in this example
31+
# above par file sets image values to 1, so line below will use water for attenuation
32+
33+
# give the simulation a name. All output files will go into a new subdirectory of this name
34+
SIM_NAME=/SAN/medic/Energy_PET_STIR_Sims/SimSET_Data_output/XCAT_brain_test_omni_downsampled
35+
# number of decays to simulate
36+
PHOTONS=70000000
37+
# specify names/locations of input files
38+
EMISS_DATA=/SAN/medic/Energy_PET_STIR_Sims/Image_Data/XCAT_data/XCAT_act_resample_171_2nd_downsample.hv
39+
ATTEN_DATA=/SAN/medic/Energy_PET_STIR_Sims/Image_Data/XCAT_data/XCAT_resample_171_2nd_downsample_empty_atten.hv
40+
templ_dir=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
41+
DIR_INPUT=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
42+
TEMPLATE_PHG=${templ_dir}/template_phg_omni.rec
43+
#TEMPLATE_BIN=${templ_dir}/template_bin.rec
44+
#TEMPLATE_BIN_2=${templ_dir}/template_bin_energy_params_2.rec
45+
TEMPLATE_DET=${templ_dir}/Omni_files/detConfig/omni70cm_6R_31_May_2020_new.detcfg
46+
# specify scanner
47+
SCANNER="GE Discovery 690"
48+
# maximum ring difference to store in conversion from SimSET to Interfile projdata
49+
NUM_SEG=0
50+
# export all variables
51+
export SIM_NAME EMISS_DATA ATTEN_DATA TEMPLATE_PHG TEMPLATE_DET
52+
export PHOTONS NUM_SEG SCANNER
53+
export DIR_INPUT
54+
DIR_OUTPUT=${SIM_NAME}
55+
export DIR_OUTPUT
56+
57+
58+
# set the simulation going
59+
run_SimSET_omni.sh
60+
61+
echo "Current working directory: $(pwd)"
62+
63+
# Start phg in background
64+
#$SIMSET_DIR/bin/phg "${DIR_OUTPUT}/phg.rec" > "${DIR_OUTPUT}/phg.log" 2>&1 &
65+
66+
PHG_PID=$!
67+
68+
# Wait for phg to finish
69+
wait $PHG_PID
70+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#! /bin/bash
2+
3+
# This is an example run with the templates distributed with STIR (appropriate for the HR+).
4+
# The code below works in bash, sh, ksh etc, but needs to be modified for csh.
5+
# Authors: Kris Thielemans
6+
#
7+
#
8+
# Copyright (C) 2005 - 2006, Hammersmith Imanet Ltd
9+
# Copyright (C) 2011-07-01 - 2012, Kris Thielemans
10+
# This file is part of STIR.
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
#
14+
# See STIR/LICENSE.txt for details
15+
16+
# adjust location of SimSET to where you have it installed.
17+
# set SIMSET_DIR if it isnt set by the user
18+
: ${SIMSET_DIR:=/home/treeves/Software/2.9.2}
19+
export SIMSET_DIR
20+
21+
PATH=/home/treeves/devel/build/sources/STIR/src/SimSET/scripts:$PATH
22+
23+
24+
#All STIR utilities/scripts have to be in your path, e.g. if your
25+
#INSTALL_PREFIX was ~/STIR-bin, you could do
26+
# PATH=$PATH:~/STIR-bin/bin
27+
28+
# generate emission image
29+
# generate_image generate_uniform_cylinder.par
30+
# use the same size for the attenuation in this example
31+
# above par file sets image values to 1, so line below will use water for attenuation
32+
33+
# generate emission image
34+
generate_image generate_uniform_cylinder.par
35+
# use the same size for the attenuation in this example
36+
# above par file sets image values to 1, so line below will use water for attenuation
37+
stir_math --including-first --times-scalar 0 uniform_cylinder_atten.hv my_uniform_cylinder.hv
38+
39+
# give the simulation a name. All output files will go into a new subdirectory of this name
40+
SIM_NAME=multi_tomos_bladder_0_act_sim_bladder_normalisation
41+
# number of decays to simulate
42+
PHOTONS=40000000
43+
# specify names/locations of input files
44+
#EMISS_DATA=/SAN/medic/Energy_PET_STIR_Sims/XCAT/bladder_only_region_select_XCAT_act.hv
45+
#ATTEN_DATA=/SAN/medic/Energy_PET_STIR_Sims/XCAT/bladder_only_region_select_XCAT_atn.hv
46+
templ_dir=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
47+
DIR_INPUT=/home/treeves/devel/build/sources/STIR/src/SimSET/examples
48+
TEMPLATE_PHG=${templ_dir}/phg_with_tomos.rec
49+
#TEMPLATE_BIN=${templ_dir}/template_bin.rec
50+
#TEMPLATE_BIN_2=${templ_dir}/template_bin_energy_params_2.rec
51+
TEMPLATE_DET=${templ_dir}/template_det.rec
52+
# specify scanner
53+
SCANNER="GE Discovery 690"
54+
# maximum ring difference to store in conversion from SimSET to Interfile projdata
55+
NUM_SEG=0
56+
# export all variables
57+
export SIM_NAME EMISS_DATA ATTEN_DATA TEMPLATE_PHG
58+
export PHOTONS NUM_SEG SCANNER
59+
export DIR_INPUT
60+
DIR_OUTPUT=${DIR_INPUT}/${SIM_NAME}
61+
export DIR_OUTPUT
62+
63+
64+
# set the simulation going
65+
run_SimSET_multi_parameter_modified.sh
66+
67+
echo "Current working directory: $(pwd)"
68+
69+
# Start phg in background
70+
$SIMSET_DIR/bin/phg "${DIR_OUTPUT}/phg.rec" > "${DIR_OUTPUT}/phg.log" 2>&1 &
71+
72+
PHG_PID=$!
73+
74+
# Wait for phg to finish
75+
wait $PHG_PID
76+

0 commit comments

Comments
 (0)