PET TOF parameters parallelproj.tof¶
Time-of-flight parameters for TOF projectors. Construct a
TOFParameters object (number of TOF bins, bin width and TOF
resolution) and assign it to a projector’s tof_parameters attribute to turn a
non-TOF projector into a TOF projector; the forward projection then gains a
trailing TOF-bin axis. See the 02_pet_sinogram_projections gallery examples
for end-to-end usage.
Time-of-flight (TOF) parameter dataclass for PET scanners.
Defines the bin width, Gaussian kernel width, truncation threshold, and
centre offset that parameterise the TOF response model used by the projectors
in parallelproj.projectors.
- parallelproj.tof.C_MM_PER_NS: float = 299.792458¶
Speed of light in mm per nanosecond.
- class parallelproj.tof.TOFParameters(num_tofbins: int, tofbin_width: float, sigma_tof: float, num_sigmas: float = 3.0, tofcenter_offset: float = 0)[source]¶
Bases:
objectTOF kernel parameters for a PET scanner.
All spatial quantities are in mm. To convert a timing quantity \(t\) (in ns) to a spatial displacement along the LOR, use
\[d \;[\text{mm}] = \frac{c}{2} \cdot t \;[\text{ns}]\]where \(c\) =
C_MM_PER_NSmm/ns (= 299.792 mm/ns). The factor of 1/2 arises because both photons travel simultaneously toward the two detectors.- Parameters:
num_tofbins (int) – Number of TOF bins covering the full LOR.
tofbin_width (float) – Width of each TOF bin in mm.
sigma_tof (float) – Standard deviation of the Gaussian TOF kernel in mm.
num_sigmas (float, optional) – Number of sigmas at which the Gaussian kernel is truncated. default
3.0.tofcenter_offset (float, optional) – Global shift of the TOF bin grid centre from the LOR midpoint in mm. This is a scalar approximation (identical for all LORs); default
0. A non-zero value is needed when systematic timing offsets are present, e.g. due to unequal cable lengths or electronics delays. The offset is measured along thexstart -> xenddirection of each LOR, so if the LOR endpoint convention is reversed (seeLOREndpointOrderEND_START) a non-zero offset must be negated to keep the same physical meaning.
- Raises:
ValueError – If
num_tofbinsis not a positive integer, iftofbin_width,sigma_tofornum_sigmasis not strictly positive, or if any value is not finite. A common cause is passing timing quantities in seconds/ps instead of the expected spatial mm (see the conversion above).
Example
A scanner with 385 ps FWHM TOF resolution and 13 fine bins of 0.01302 ns each grouped into one sinogram bin:
# sigma_tof: FWHM [ns] / 2.355 * c/2 [mm/ns] sigma_tof = (385e-3 / 2.355) * (C_MM_PER_NS / 2) # ~ 24.5 mm # tofbin_width: 13 fine bins * 0.01302 ns * c/2 tofbin_width = 13 * 0.01302 * (C_MM_PER_NS / 2) # ~ 25.4 mm p = TOFParameters( num_tofbins=29, tofbin_width=tofbin_width, sigma_tof=sigma_tof, num_sigmas=3.0, )
Examples
Non-TOF and TOF projections using a modularized (block) PET scanner geometry
Non-TOF and TOF projections using a modularized (block) PET scanner geometry
Convergence comparison: SGD vs SVRG with logcosh regularization
Convergence comparison: SGD vs SVRG with logcosh regularization
PDHG and SPDHG for PET reconstruction with a directional TV prior
PDHG and SPDHG for PET reconstruction with a directional TV prior
TOF vs non-TOF: variance reduction in a uniform cylinder
TOF vs non-TOF: variance reduction in a uniform cylinder
Convergence comparison: SGD vs SVRG with regularization (sinogram and listmode)
Convergence comparison: SGD vs SVRG with regularization (sinogram and listmode)
PDHG and LM-SPDHG to optimize the Poisson logL and total variation
PDHG and LM-SPDHG to optimize the Poisson logL and total variation
Joint activity and attenuation reconstruction (MLAA) for TOF PET
Joint activity and attenuation reconstruction (MLAA) for TOF PET- num_sigmas: float = 3.0¶
- num_tofbins: int¶
- sigma_tof: float¶
- tofbin_width: float¶
- tofcenter_offset: float = 0¶
- parallelproj.tof.get_tof_parameters_G1(**kwargs) TOFParameters[source]¶
Demo
TOFParametersG1 (matches the G1 scanner).Defaults to 27 TOF bins with a 385 ps coincidence timing resolution (
sigma_tof) and a 169 ps TOF-bin width, converted from ns to mm viax = t * C_MM_PER_NS / 2. Pair it withparallelproj.pet_lors.get_lor_descriptor_G1(). AnyTOFParametersfield (num_tofbins,tofbin_width,sigma_tof,num_sigmas,tofcenter_offset) can be overridden via keyword.Examples
- Return type:
- parallelproj.tof.get_tof_parameters_G2(**kwargs) TOFParameters[source]¶
Demo
TOFParametersG2 (matches the G2 scanner).Identical to
get_tof_parameters_G1()but with 29 TOF bins by default. Pair it withparallelproj.pet_lors.get_lor_descriptor_G2(). AnyTOFParametersfield can be overridden via keyword.Examples
- Return type: