[Gate-users] Fixed Forced Detection Actor: bugs concerning the choice of the source

Triltsch, Nicolas nicolas.triltsch at tum.de
Fri May 5 15:06:09 CEST 2017


Hello Gate fellows,

I noticed some bugs concerning the choice of the source when using the 
Fixed Forced Detection Actor (FFDA). As I can remember, the FFDA needs a 
focused source spot to work properly. In the example folder of Gate, the 
source was chosen to be a rectangle and in this case the simulation 
works properly. However, if different source types are tested the 
simulation gives strange results.

I tried two different source types: Firstly, I changed the shape of the 
source to be a circle and secondly, I took a point source. I will 
explain the bugs I could notice in both cases.

*1) Focused circle source:* Primary image and flatfield give nan. The 
Compton and Rayleigh scatter images are calculated, but depend on the 
number of simulated photons as the can not be normalized by an 
appropriate flatfield of nan's.

---primary and flatfield---

---compton---

---rayleigh---

*2) Point source:* The primary image seems correct. However, the scatter 
images can not be calculated correctly, as they show a 
scatter-to-flatfield ratio of 80% for Compton and 40% Rayleigh. These 
values are impossible in the given simulation setup where I expect 
scatter ratios of around 1-2% (as verified with the experiment). I 
noticed that the ratios depend on the number of simulated photons which 
shouldn't be the case after flatfield normalization.

---primary/ff---

---compton/ff---

---rayleigh/ff---



*Conclusion:
*It seems that the FFDA only works if the source is chosen to be a 
focused rectangle and is bugy if other source types (circle or point 
source, maybe other types) are given.*

Can anyone comment on this behavior?

*See the used scripts attached.

Regards,
Nico

-- 
B.Sc. Nicolas Triltsch
Masterand

Technische Universität München
Physik-Department
Lehrstuhl für Biomedizinische Physik E17

James-Franck-Straße 1
85748 Garching b. München

Tel: +49 89 289 12591

nicolas.triltsch at tum.de
www.e17.ph.tum.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pnpcbmfjkkbghlhg.png
Type: image/png
Size: 94935 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admnhlbillpjppkp.png
Type: image/png
Size: 34367 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lndpiobhobfaaice.png
Type: image/png
Size: 39736 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkomdmekphkipgda.png
Type: image/png
Size: 26427 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ggkadopnkhmahdia.png
Type: image/png
Size: 44972 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bdgbfbhmimffdmld.png
Type: image/png
Size: 36971 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170505/0bf8487e/attachment-0011.png>
-------------- next part --------------
#=====================================================
# VERBOSE and VISUALISATION
#=====================================================
#/control/execute mac/visu.mac
/vis/disable
/control/execute mac/verbose.mac
/gate/geometry/setMaterialDatabase data/GateMaterials.db

#=====================================================
# GEOMETRY
#=====================================================

/gate/world/setMaterial            Vacuum
/gate/world/geometry/setXLength    1.5 m
/gate/world/geometry/setYLength    1.5 m
/gate/world/geometry/setZLength    1.5 m

#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList emlivermore

#=====================================================
# BEAM: Type of particle & Energy spectrum
#=====================================================
/gate/source/addSource mybeam gps
/gate/source/mybeam/gps/particle       gamma
/gate/source/mybeam/gps/ene/type       User
/gate/source/mybeam/gps/hist/type      energy
/control/execute mac/spectrum.mac

#=====================================================
# BEAM: Position and shape
#=====================================================
/gate/source/mybeam/gps/pos/centre          0 0 62.40 cm
/gate/source/mybeam/gps/pos/type            Plane
/gate/source/mybeam/gps/pos/shape           Circle
/gate/source/mybeam/gps/pos/radius          0.616 cm
/gate/source/mybeam/gps/ang/type            focused
/gate/source/mybeam/gps/ang/focuspoint      0 0 57.40 cm 
/gate/source/mybeam/gps/pos/rot1            1 0 0
/gate/source/mybeam/gps/pos/rot2            0 1 0

#=====================================================
# PHANTOM
#=====================================================
/gate/world/daughters/name                  phantom
/gate/world/daughters/insert                ImageNestedParametrisedVolume
/gate/phantom/geometry/setHUToMaterialFile  data/phantom_HU2mat.txt 
/gate/phantom/geometry/setImage             data/phantom.mhd
/gate/phantom/placement/setTranslation      0. 0. 0. mm
/gate/phantom/placement/setRotationAxis     0 1 0
/gate/phantom/placement/setRotationAngle    {rot_angle} deg

#=====================================================
# DETECTOR
#=====================================================
/gate/world/daughters/name                   DetectorPlane
/gate/world/daughters/insert                 box
/gate/DetectorPlane/geometry/setXLength      20. cm
/gate/DetectorPlane/geometry/setZLength      1 nm
/gate/DetectorPlane/geometry/setYLength      20. cm
/gate/DetectorPlane/placement/setTranslation 0 0 -23.77 cm
/gate/DetectorPlane/setMaterial              Vacuum
/gate/DetectorPlane/vis/setVisible           1
/gate/DetectorPlane/vis/setColor             yellow

#=====================================================
# ACTORS
#=====================================================
/gate/actor/addActor FixedForcedDetectionActor ffda
/gate/actor/ffda/attachTo                     world
/gate/actor/ffda/setDetector                  DetectorPlane
/gate/actor/ffda/setDetectorResolution        100 100
/gate/actor/ffda/geometryFilename             output/geometry.xml
/gate/actor/ffda/primaryFilename              output/primary{run_id}.mha
/gate/actor/ffda/attenuationFilename          output/attenuation{run_id}.mha
/gate/actor/ffda/rayleighFilename             output/rayleigh{run_id}.mha
/gate/actor/ffda/comptonFilename              output/compton{run_id}.mha
/gate/actor/ffda/secondaryFilename            output/secondary{run_id}.mha
/gate/actor/ffda/totalFilename                output/total{run_id}.mha
/gate/actor/ffda/enableUncertaintySecondary   true
/gate/actor/ffda/enableSquaredSecondary       true
/gate/actor/ffda/materialMuFilename           output/materialMu.mha
/gate/actor/ffda/flatFieldFilename            output/flatField.mha
/gate/actor/ffda/responseDetectorFilename     data/responseDetector.txt
/gate/actor/ffda/energyResolvedBinSize        0 keV

/gate/actor/addActor  SimulationStatisticActor stat
/gate/actor/stat/save output/statsMC{run_id}.txt

#=====================================================
# INITIALIZATION and START
#=====================================================
/gate/run/initialize

/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto

/gate/application/setTimeSlice 1 s
/gate/application/setTimeStart 0 s
/gate/application/setTimeStop 1 s

/gate/application/setTotalNumberOfPrimaries 100000
/gate/application/start

exit

-------------- next part --------------
#=====================================================
# VERBOSE and VISUALISATION
#=====================================================
#/control/execute mac/visu.mac
/vis/disable
/control/execute mac/verbose.mac
/gate/geometry/setMaterialDatabase data/GateMaterials.db

#=====================================================
# GEOMETRY
#=====================================================

/gate/world/setMaterial            Vacuum
/gate/world/geometry/setXLength    1.5 m
/gate/world/geometry/setYLength    1.5 m
/gate/world/geometry/setZLength    1.5 m

#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList emlivermore

#=====================================================
# BEAM: Type of particle & Energy spectrum
#=====================================================
/gate/source/addSource mybeam gps
/gate/source/mybeam/gps/particle       gamma
/gate/source/mybeam/gps/ene/type       User
/gate/source/mybeam/gps/hist/type      energy
/control/execute mac/spectrum.mac

#=====================================================
# BEAM: Position and shape
#=====================================================
/gate/source/mybeam/gps/position      0 0 57.40 cm
/gate/source/mybeam/gps/pos/type      Point
/gate/source/mybeam/gps/ang/type      iso
/gate/source/mybeam/gps/ang/mintheta  0. deg
/gate/source/mybeam/gps/ang/maxtheta  7.023 deg
/gate/source/mybeam/gps/ang/minphi    0. deg
/gate/source/mybeam/gps/ang/maxphi    360. deg
/gate/source/mybeam/gps/ang/rot1      1 0 0 
/gate/source/mybeam/gps/ang/rot2      0 1 0 
/gate/source/mybeam/gps/pos/rot1      1 0 0
/gate/source/mybeam/gps/pos/rot2      0 1 0

#=====================================================
# PHANTOM
#=====================================================
/gate/world/daughters/name                  phantom
/gate/world/daughters/insert                ImageNestedParametrisedVolume
/gate/phantom/geometry/setHUToMaterialFile  data/phantom_HU2mat.txt 
/gate/phantom/geometry/setImage             data/phantom.mhd
/gate/phantom/placement/setTranslation      0. 0. 0. mm
/gate/phantom/placement/setRotationAxis     0 1 0
/gate/phantom/placement/setRotationAngle    {rot_angle} deg

#=====================================================
# DETECTOR
#=====================================================
/gate/world/daughters/name                   DetectorPlane
/gate/world/daughters/insert                 box
/gate/DetectorPlane/geometry/setXLength      20. cm
/gate/DetectorPlane/geometry/setZLength      1 nm
/gate/DetectorPlane/geometry/setYLength      20. cm
/gate/DetectorPlane/placement/setTranslation 0 0 -23.77 cm
/gate/DetectorPlane/setMaterial              Vacuum
/gate/DetectorPlane/vis/setVisible           1
/gate/DetectorPlane/vis/setColor             yellow

#=====================================================
# ACTORS
#=====================================================
/gate/actor/addActor FixedForcedDetectionActor ffda
/gate/actor/ffda/attachTo                     world
/gate/actor/ffda/setDetector                  DetectorPlane
/gate/actor/ffda/setDetectorResolution        100 100
/gate/actor/ffda/geometryFilename             output/geometry.xml
/gate/actor/ffda/primaryFilename              output/primary{run_id}.mha
/gate/actor/ffda/attenuationFilename          output/attenuation{run_id}.mha
/gate/actor/ffda/rayleighFilename             output/rayleigh{run_id}.mha
/gate/actor/ffda/comptonFilename              output/compton{run_id}.mha
/gate/actor/ffda/secondaryFilename            output/secondary{run_id}.mha
/gate/actor/ffda/totalFilename                output/total{run_id}.mha
/gate/actor/ffda/enableUncertaintySecondary   true
/gate/actor/ffda/enableSquaredSecondary       true
/gate/actor/ffda/materialMuFilename           output/materialMu.mha
/gate/actor/ffda/flatFieldFilename            output/flatField.mha
/gate/actor/ffda/responseDetectorFilename     data/responseDetector.txt
/gate/actor/ffda/energyResolvedBinSize        0 keV

/gate/actor/addActor  SimulationStatisticActor stat
/gate/actor/stat/save output/statsMC{run_id}.txt

#=====================================================
# INITIALIZATION and START
#=====================================================
/gate/run/initialize

/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto

/gate/application/setTimeSlice 1 s
/gate/application/setTimeStart 0 s
/gate/application/setTimeStop 1 s

/gate/application/setTotalNumberOfPrimaries 500000
/gate/application/start

exit



More information about the Gate-users mailing list