Installation#
pnps needs Python 3.14 or newer:
pip install pnps
or with uv, in a project:
uv add pnps
That installs solprop and its compiled backend, solprop-native, which every run uses
(backend="auto" is native). solprop-native has wheels for Linux, Windows and macOS
14 or newer on Apple silicon; on any other platform, including Intel macOS, the
installer reports that no matching distribution exists (see solprop’s installation
guide). The backends and their threads are described in The propagation engine: solprop.
On a GPU#
There are no GPU wheels. solprop’s native backend runs on an NVIDIA GPU (CUDA 13, an
architecture such as HOPPER90 for the H100 and H200) or an AMD GPU (ROCm 7) from a
source build, described in solprop’s guide to building the native package. In short,
for an NVIDIA GPU:
git clone https://github.com/LupoLab/solprop
cd solprop
export CUDA_ROOT=/usr/local/cuda CXX=g++ NVCC_WRAPPER_DEFAULT_COMPILER=g++
export CMAKE_ARGS="-DSOLPROP_NATIVE_ENABLE_CUDA=ON -DSOLPROP_NATIVE_ENABLE_OPENMP=OFF \
-DSOLPROP_NATIVE_CUDA_ARCH=HOPPER90"
pip install . ./native pnps
solprop_native.check_build() confirms the build sees the device. A run then uses it
with backend="native" (The propagation engine: solprop). Set SOLPROP_REQUIRE_DEVICE=cuda (or hip) in
a GPU job, so that a run refuses before allocating anything if it would fall onto a CPU
wheel, as it would if a later install replaced the source build.
From a checkout#
git clone https://github.com/LupoLab/pnps
cd pnps
uv sync
uv run pytest
The development tools and the checks a change must pass are in
AGENTS.md and Developer’s guide.
The examples#
uv run python examples/tgfrog_window_series.py # smoke scan, a few minutes
uv run python examples/tgfrog_window_series.py --full # the production grid
uv run python examples/calibrate_production.py # certify the step
uv run python examples/injected_pulse.py # inject a pulse from a file
uv run python examples/mask_study.py # the mask renderings
examples/runs/ holds a run file and a Slurm script for the pnps command
(Run files, the command line and clusters).