NVIDIA cuPhoton Accelerates Astronomical Image Analysis with a GPU-Native Pipeline
Public- 07 Oct, 2026

High-throughput scientific instruments such as observatories, telescopes, and X-ray light sources generate image data at rates that exceed the processing capabilities of CPU-bound pipelines. The computational bottleneck is rarely a single slow kernel but rather the entire path from raw sensor data to a scientific decision, which includes reading data, matching point-spread functions, subtracting backgrounds, fitting models, and classifying objects. Modern facilities accumulate petabytes of multidimensional data per campaign, and CPU-first implementations can take hours to months to yield useful results from data produced in seconds. This delay hinders timely scientific insights. NVIDIA cuPhoton addresses this by providing a GPU-native path that covers every stage from sensor read through classification, collapsing the wait time to seconds and allowing researchers to run tight interactive loops.
NVIDIA cuPhoton is an open-source NVIDIA CUDA-X toolkit consisting of GPU-accelerated building blocks for spectral and optical astronomy, as well as time-domain laser and X-ray analysis. By keeping image data on the GPU from the initial sensor read through final classification, the toolkit significantly reduces latency. For example, the NSF-DOE Vera C. Rubin Observatory records a new 3.2-gigapixel exposure every 39 seconds after dark. Its Prompt Processing pipeline must classify roughly 10,000 detections as astrophysical transients or artifacts within 60-120 seconds. Across a single night, this amounts to up to 20 terabytes of images and 10 million candidate objects. cuPhoton scales across multi-GPU, multi-node NVIDIA Grace Blackwell and Vera Rubin systems, accelerating image loading by up to 14,900x and signal processing by up to 14,550x on representative workloads involving hundreds of terabytes.

The toolkit includes five primary components for the imaging workflow: xDataReader, xRep, xPois, xFit, and xScan, along with xRay for time-domain X-ray detector analysis. The setup requires cloning the repository and provisioning a locked Linux environment using the command uv sync --locked --extra dev --extra gpu --extra viz. This environment supports the NVIDIA CUDA 13 ecosystem, including CuPy, PyTorch, Numba-CUDA, KvikIO, and NVIDIA nvCOMP, alongside visualization libraries such as Bokeh and Pillow. cuPhoton version 0.1.3 supports Python 3.12-3.14 on Linux. Building the xDataReader component from source requires a C++17 compiler, CUDA and cuFile development headers, and a reentrant CFITSIO development installation. The complete workflow script is available in the repository for automated runs or interactive use in Jupyter notebooks.

The xDataReader module accelerates the loading of Flexible Image Transport System (FITS) files directly to the GPU, bypassing the traditional CPU parsing and PCIe transfer overhead. It splits the workload by using CFITSIO to plan byte ranges on the CPU, KvikIO to read them via GPUDirect Storage when available, and nvCOMP to decompress GZIP tiles on the GPU. The public API function batch_to_device returns stacked CuPy arrays, supporting uncompressed 2-16-axis image HDUs and two-dimensional images with GZIP_1 or GZIP_2 tile compression. Rice compression and dithered floating-point quantization are not supported. For images in the primary HDU, users must pass hdu_indices=(0,), while the default is HDU index 1. Files grouped into a single call must match in shape and data type at each selected HDU.
The xRep module resamples two-dimensional images onto a shared north-up celestial grid to align visits that do not share a pixel grid due to dithering, rotation, or plate scale differences. The function build_stack_spec_from_fits reads World Coordinate System solutions from FITS headers to build a destination footprint, while reproject_stack warps every member onto that grid. The backend parameter defaults to "auto," preferring CuPy, then CUDA PyTorch, and finally CPU if no GPU is available. Interpolation uses Lanczos-3 by default. This alignment ensures that static stars in the template and science frames occupy the same coordinates, allowing the moving source to be isolated as the only changed position in the sky before subtraction.