27.7. Running the PET Simulation
Table of Contents
Number of events
In a PET simulation with GATE you can control how long the simulation runs in two conceptually different ways. The first is to tell GATE how many primary events to simulate. The second is to tell it how long to simulate in physical time, given a radioactive source with a certain activity. Both approaches are valid; which one you choose depends on what you want to compare your results with and how you plan to analyze them.
In a basic PET scanner simulation, you almost always start by specifying the number of events. An event corresponds to one history started from a source, for example one decay or one primary particle. In OpenGATE you usually configure this through the simulation object before you start the run. For PET, if you have already created the ring geometry, the source, and the digitizer chain, then the only remaining mandatory setting for running is the total number of events.
When choosing this number you must balance image quality and computing time. A very small number of events will give noisy statistics in hits, singles, and coincidences. A very large number of events will produce smoother energy spectra and more uniform detector occupancy, but simulation time, memory use, and output file sizes will increase.
It is useful to think of the number of events as directly controlling the Monte Carlo statistical uncertainty. For a given configuration, if you multiply the number of events by a factor of 4, then the statistical noise in any quantity that scales linearly with counts, such as the number of coincidences, typically reduces by about a factor of 2. This follows from Poisson statistics, where the relative uncertainty behaves like $1 / \sqrt{N}$ for a count $N$.
For quantities driven by counting statistics, the relative Monte Carlo uncertainty is approximately
$$
\frac{\sigma}{N} \approx \frac{1}{\sqrt{N}}
$$
where $N$ is the number of counts in a bin or region of interest.
In practical PET simulations, beginners often start with very small runs, for example $10^4$ or $10^5$ events, just to verify that the geometry, source, physics, and digitizers are all configured correctly. These quick tests help you see that hits are recorded in the right crystals, that singles and coincidences are not empty, and that the energy spectra look reasonable. Once everything works, you can increase the number of events by one or two orders of magnitude to obtain meaningful data for analysis.
The number of events that you need also depends on the purpose of the simulation. If you are testing the geometry of the PET ring or checking detector indexing, you can accept large fluctuations in count rates and a rough energy spectrum. If you want to compute PET performance metrics like sensitivity or scatter fraction, or examine subtle differences between scanner designs, you generally need many more events so that random fluctuations do not dominate your conclusions.
Since PET simulations often involve full detector rings, many voxels, and digitizer chains, you should always monitor the terminal output during the first larger runs. GATE will report the progress of events and often prints summary statistics at the end of the run. These messages help you estimate how long a given number of events will take on your system and whether you should adjust the requested events up or down.
Another practical aspect is the interaction between the number of events and the random seed. Changing the seed while keeping the same number of events allows you to repeat the simulation and obtain independent statistical samples. This is especially important when you want to study uncertainties, combine several runs to reduce noise, or use a high performance computing environment where the same PET configuration is run many times in parallel.
Acquisition time
For PET scanners, the more intuitive way to describe data taking is in terms of acquisition time, for example a 10 minute clinical scan. In GATE, acquisition time enters naturally when you define a radioactive source with a given activity. The activity $A$ determines how many decays occur per unit time. If you run the simulation for a duration $T$, then the mean number of decays is $A \times T$, up to the effects of radioactive decay of the source over time.
In a PET simulation, the link between the Monte Carlo configuration and the scanner acquisition is established by combining the source activity with the simulated duration. Many actors and digitizers will record event times and use time windows, for example for coincidence sorting. To model a realistic PET acquisition, you must therefore configure not only the geometry and physics but also a suitable acquisition time that matches the activity and count rates you want to emulate.
When you increase the acquisition time for a fixed activity, the total number of decays increases proportionally, which generates more hits, singles, and coincidences. This improves statistics but also increases the data volume and computing time. Conversely, shortening the acquisition time reduces the number of detected coincidences and increases statistical noise in images and performance metrics.
If you aim to compare your simulated PET data to a real scanner study, it is important that the product of activity and acquisition time in the simulation matches that of the experiment, at least approximately. For a constant activity source, the expected number of decays during the acquisition is simply $A \times T$. In real situations, however, activity may decay significantly during long scans, especially for short lived radionuclides. GATE can handle this kind of time dependence when you configure time dependent sources, but even in simple fixed activity simulations you should keep the concept in mind.
For a constant activity source, the expected number of decays during an acquisition of duration $T$ is
$$
N_{\text{decays}} = A \times T
$$
where $A$ is the activity in Bq and $T$ is the acquisition time in seconds.
In the context of coincidence sorting for PET, acquisition time also sets the overall time range in which singles can be paired. Within that range, the digitizer uses a much shorter coincidence timing window to decide whether two singles form a coincidence event. As you extend the acquisition time, you obtain more singles and therefore more random coincidences, which affect PET performance metrics like the noise equivalent count rate.
When you run your PET simulation, it is helpful to think of acquisition time and number of events as two connected but distinct controls. Setting a very long acquisition time while keeping the number of primary events small does not increase statistics; the simulation will still stop after the requested events are processed. To truly simulate a longer scan, you must either allow the simulation to generate enough events corresponding to that time, or configure the simulation through time rather than event count, depending on the capabilities of your GATE version and interface.
For beginners, a practical strategy is to first decide on a target acquisition time based on the physical scenario, for example a few minutes for a simple phantom study. Next, choose a source activity that yields a reasonable count rate, and finally adjust the total number of simulated events so that $A \times T$ is represented by enough Monte Carlo histories to give acceptable uncertainty. After the simulation, you can check actors that report counts per second or coincidences per second to confirm that the simulated acquisition time, activity, and number of events are consistent with the PET scanner behavior you are trying to model.
Views: 11
KAHIBARO