Sources
In GGEMS, we develop a source for each application. For the moment only dosimetry and CT/CBCT applications are allowed. Only one source has been implemented: GGEMSXRaySource
X-ray Source
The X-Ray source is defined with a cone-beam geometry. The direction of the generated photons always point to the center of the world. The source has its own axes.
Create a source by choosing a name:
xray_source = GGEMSXRaySource('xray_source')
Particle type is only photon:
xray_source.set_source_particle_type('gamma')
Number of generated particles during a run:
xray_source.set_number_of_particles(1000000000)
Position and rotation of source are defined in global world axis. The X-Ray cone-beam source can be defined with an aperture angle.
xray_source.set_position(-595.0, 0.0, 0.0, 'mm')
xray_source.set_rotation(0.0, 0.0, 0.0, 'deg')
xray_source.set_beam_aperture(12.5, 'deg')
X-ray source can be defined with a focal spot size. If defined at (0, 0, 0) mm, it is similar to a point source.
xray_source.set_focal_spot_size(0.0, 0.0, 0.0, 'mm')
Important
The focal spot size is defined in source axis reference and not in global world reference.
The energy source can be defined using a single energy value or a spectrum included in a TXT file.
# Using a custom source
xray_source.set_polyenergy('data/spectrum_120kVp_2mmAl.dat')
# Monoenergetic source
xray_source.set_monoenergy(25.0, 'keV')