-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhowto_run_SimSET_multi_tomos.sh
More file actions
70 lines (56 loc) · 2.17 KB
/
howto_run_SimSET_multi_tomos.sh
File metadata and controls
70 lines (56 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#! /bin/bash
# This is an example run with the templates distributed with STIR (appropriate for the HR+).
# The code below works in bash, sh, ksh etc, but needs to be modified for csh.
# Authors: Kris Thielemans
#
#
# Copyright (C) 2005 - 2006, Hammersmith Imanet Ltd
# Copyright (C) 2011-07-01 - 2012, Kris Thielemans
# This file is part of STIR.
#
# SPDX-License-Identifier: Apache-2.0
#
# See STIR/LICENSE.txt for details
# adjust location of SimSET to where you have it installed.
# set SIMSET_DIR if it isnt set by the user
: ${SIMSET_DIR:=/home/treeves/2.9.2}
export SIMSET_DIR
PATH=/home/treeves/devel/build/sources/STIR/src/SimSET/scripts:$PATH
#All STIR utilities/scripts have to be in your path, e.g. if your
#INSTALL_PREFIX was ~/STIR-bin, you could do
# PATH=$PATH:~/STIR-bin/bin
# generate emission image
# generate_image generate_uniform_cylinder.par
# use the same size for the attenuation in this example
# above par file sets image values to 1, so line below will use water for attenuation
# give the simulation a name. All output files will go into a new subdirectory of this name
SIM_NAME=/home/treeves/devel/build/sources/STIR/src/SimSET/examples/TOF_Scatter_Simulation
# number of decays to simulate
PHOTONS=300000000
# specify names/locations of input files
EMISS_DATA=Initial_phantom_activity_path
ATTEN_DATA=Atten_image_path
templ_dir=SimSET_examples_directory
DIR_INPUT=SimSET_examples_directory
TEMPLATE_PHG=${templ_dir}/phg_with_tomos.rec
#TEMPLATE_BIN=${templ_dir}/template_bin.rec
#TEMPLATE_BIN_2=${templ_dir}/template_bin_energy_params_2.rec
TEMPLATE_DET=${templ_dir}/template_det.rec
# specify scanner
SCANNER="GE Discovery 690" # this doesn't matter much
# maximum ring difference to store in conversion from SimSET to Interfile projdata
NUM_SEG=0
# export all variables
export SIM_NAME EMISS_DATA ATTEN_DATA TEMPLATE_PHG
export PHOTONS NUM_SEG SCANNER
export DIR_INPUT
DIR_OUTPUT=${SIM_NAME}
export DIR_OUTPUT
# set the simulation going
run_SimSET_multi_parameter.sh
echo "Current working directory: $(pwd)"
# Start phg in background
#$SIMSET_DIR/bin/phg "${DIR_OUTPUT}/phg.rec" > "${DIR_OUTPUT}/phg.log" 2>&1 &
PHG_PID=$!
# Wait for phg to finish
wait $PHG_PID