Generate config files for Gate script generation
Location
~/software/build/gate\_tools/cpp
File
makePhantomConfig
Setup
~/software/build/gate\_tools/config\_files/phantom{,2}\_{pc,grid}.cfg
Generate Gate scripts
Location
~/software/build/Gate/umSetup/scripts
Scripts:
For projects (uniform, edge) use:
generateProject.sh
For phantom use
generatePhantom.sh
Config
Phantom uses generated config files (see above). Nevertheless, they are all in
~/software/build/Gate/umSetup/config
Usually they come in standard and Grid labelled variety. They mostly differ in location of the generated scripts and path to data files (none for grid!).
Generate xrsl file from templates
Location
/data0/studen/jobs/umSetup/scripts
File
For projects use:
multiplyJobs.sh [tmplt] [N] [output file] [Nstart]
For phantom use:
phantomJobs.sh [tmplt] [N] [output file]
In both casses number of repetitions is specified. In first case, the same project
is repeated N times, in the second case rods up to N are concatenated to the job list.
For simulation continuation or failed submissions, Nstart is provided to provide means
to generate jobs from Nstart to N-1 rather than 0 to N-1. In this case, only N-Nstart
jobs are placed in the output file. Parameters from N onwards are optional, output file
defaults to fullJob.xrsl
and Nstart
defaults to 0
.
Config
Templates are stored in
/data0/studen/data/jobs/umSetup/tmplt
There is one for each type of run (uniform,edge,phantom; the same for setup2).
Submit
Location
/data0/studen/jobs/umSetup/scripts
File
sub.sh *.xrsl [joblist.xml]
Remember to do arcproxy
before submission. Adjust joblist; although optional,
running multiple jobs will be easier if jobs are delegated to contextual files.
Use aglomerated xrsl file generated in the previous step
Config
None
Query status
Use arc:
arcstat -i joblist.xml
Get the results
Location
/data0/studen/jobs/umSetup/scripts
File
updateJobs.sh matches.config
Config
In
/data0/studen/jobs/umSetup/setup/matches.config
is a defult list of matches between joblist files and done files. Done
files contain jobid descriptors of jobs succesfully completed. When issuing
updateJobs.sh
all jobs are querried, and finished jobs are transferred and
erased from the joblist file and added to the done file.
Update dirlist
Location
Scripts are still grid based:
/data0/studen/jobs/umSetup/scripts
Resulting output is outside of grid area, together with pc generated data:
/data0/studen/data/Gate/dirlist/umSetup{,2}
File
copyDirList.sh file.matches
The scripts will check all xml files containing done
keyword in the file name. The
file.matches
associate a particular done.xml file and a dirlist in the data area. The
scripts extracts directory name from the jobid and adds it to the dirlist file that gets
copied to the Gate area.
Config
In
/data0/studen/jobs/umSetup/setup
a file matchesDirlist.config
has a corelation of grid side done.xml filename convention and
Gate side file name convention.
Converting raw Gate (ROOT) files to umSetup format
Location
~/software/build/gate\_tools/scripts
File
processList.sh dirlist setup
Generates a filelist of the same base as dirlist (exepct with suffix dirlist replaced with
filelist) where files of umSetup format as generated (coincidence type wise). processList.sh
uses gate2um
executable which searches for coincidences, does the gate to um module id
matching, performs a randomization of the collected bgo positions and stores the files
in the appropriate formats. The required parameters for conversion are drawn from the setup
file, for setup0 by default and to be supplied directly for setup2.
Config
Uses by default:
/data0/studen/data/imageRec/layout/setup0/gateSetup.in
and should use
/data0/studen/data/imageRec/layout/setup2/gateSetup.in
for setup2 simulation.
Usage in reconstruction routines
Location
~/software/build/observer_tools/coinc/root_scripts
After new data is generated, sinograms etc. need to be remade.
File
scripts_drawPositions.C
scripts_gateSensitivity.C
scripts_importData.C
File drawPositions
contains routine draw
, which, for a supplied filelist
(with _sp in the name) draws source positions of generated events:
root [] draw(h2,"/data0/studen/data/Gate/dirlist/umSetup/umSetup_phantom_grid_sp.filelist")
File gateSensitivity
collects MC data generated by a uniform source and performs scaling along
the p sinogram axis. Needs a configuration file (gateSensitivity.in
).
File importData
stores sinogram of the (newly) simulated MC data. Requires a configuration
file (setupGate10.in
).
Configuration
File:
/data0/studen/data/imageRec/layout/setup{0,2}/gateSensitivity.in
is used in sensitivity generation. In there, specify which filelist are used in sensitivity generation and where sensitivity will be stored.
File:
/data0/studen/data/imageRec/layout/setup{0,2}/setupGate10.in
is an equivalent of the data file setup10.in
in the same directory. Rather than pointing
to real data, it points to sinograms created from MC generated data. One can adjust filters,
etc.