API reference

Modules

The top-level parallelproj namespace deliberately exposes only the array backend helpers (Array, to_numpy_array(), empty_cuda_cache()) plus the __version__ / __citation__ / __bibtex__ dunders. Everything else lives in a submodule and is imported explicitly.

Each card below links to a submodule’s full reference and carries its exact import line (expand import statement):

PET scanner geometries

Regular-polygon, demo and general modular / block scanner geometries.

import statement
from parallelproj.pet_scanners import (
    BlockPETScannerModule,
    DemoPETScannerGeometry,
    ModularizedPETScannerGeometry,
    RegularPolygonPETScannerGeometry,
    RegularPolygonPETScannerModule,
    RingEndpointOrdering,
)
PET LOR / sinogram descriptors

Michelogram axial layout, sinogram ordering, LOR descriptors and axial compression.

import statement
from parallelproj.pet_lors import (
    EqualBlockPETLORDescriptor,
    LOREndpointOrder,
    Michelogram,
    MichelogramLayout,
    RadialDirection,
    RegularPolygonPETLORDescriptor,
    SegmentOrder,
    SinogramAxialCompressionOperator,
    SinogramMashingOperator,
    SinogramSegmentSelectionOperator,
    SinogramSpatialAxisOrder,
    SinogramZigZagOrder,
    TOFBinMashingOperator,
    ViewDirection,
    get_lor_descriptor_G1,
    get_lor_descriptor_G2,
)
PET projectors

Sinogram and list-mode forward / back projectors – the operators you reconstruct with.

import statement
from parallelproj.projectors import (
    EqualBlockPETProjector,
    ListmodePETProjector,
    ParallelViewProjector2D,
    ParallelViewProjector3D,
    RegularPolygonPETProjector,
)
PET TOF parameters

TOFParameters: the time-of-flight kernel (bin width, resolution, centre offset).

import statement
from parallelproj.tof import (
    TOFParameters,
    get_tof_parameters_G1,
    get_tof_parameters_G2,
)
Linear operators

Building blocks: resolution models, finite differences, compositions and stacking.

import statement
from parallelproj.operators import (
    AdjointLinearOperator,
    CompositeLinearOperator,
    ElementwiseMultiplicationOperator,
    FiniteForwardDifference,
    GaussianFilterOperator,
    GradientFieldProjectionOperator,
    LinearOperatorSequence,
    MatrixOperator,
    VstackOperator,
)
Functions

Data-fidelity terms and priors: Poisson log-likelihood, squared-L2, log-cosh, affine objectives.

import statement
from parallelproj.functions import (
    C1AffineObjective,
    C2AffineObjective,
    HalfSquaredL2Deviation,
    LogCosh,
    MixedL21Norm,
    NegPoissonLogL,
    NegPoissonLogLListmode,
    NonNegativeIndicator,
    SumC1Function,
    SumC2Function,
)
PET sinogram symmetries

Plane / view / radial symmetry classes and sinogram reduction / expansion helpers.

import statement
from parallelproj.sinogram_symmetries import (
    axial_block_shifted_planes,
    axially_mirrored_plane,
    build_bin_to_class,
    build_plane_class_indices,
    build_radial_class_indices,
    build_view_class_indices,
    compute_sinogram_plane_symmetries,
    expand_sinogram_by_symmetry_class,
    is_interior_ring,
    plane_orbit,
    reduce_sinogram_by_symmetry_class,
    swapped_plane,
)
PET LM unlisting

Turn detected events into sinograms; TOF-bin assignment from arrival times.

import statement
from parallelproj.unlist import (
    detection_times_to_tof_bin,
    regular_polygon_events_to_sinogram,
)
Data

Memory-mapped subset helpers for large list-mode datasets.

import statement
from parallelproj.data import (
    SubsetArrayMmap,
    count_event_multiplicity,
    to_subset_mmap,
)