Changelog#

All notable changes to pnps are recorded here. The format follows Keep a Changelog; versions come from git tags.

Unreleased#

[0.2.0] - 2026-11-29#

Collection windows integrated exactly over their hard discs, on solprop’s backend, and recorded as such in the scan file; the step certified on the signal; a photon-number stability check; and accurate mask defaults, which change computed traces. Requires solprop 0.4.

Added#

  • Config.exact_windows collects a scan’s windowed spectra through each window’s exact hard disc, applied to the nonlinear part of every plane, in place of its rendering on the momentum grid. With the solprop reduction (what reduction='auto' resolves to) solprop does it on its backend, as apertures with the exact profile on the nonlinear field (its SEP 53), so a GPU run keeps its speed and no field leaves the device. With reduction='host' this package does it with its own masks, the reference; the memory budget then counts the masks and the held input. A window whose disc reaches the grid’s Nyquist limit on the band is refused.

  • pnps.exact_windows.ExactWindows integrates the nonlinear part of a plane exactly over each window’s hard disc, on the run’s own grid, as one precomputed mask per window and frequency (exact_window_spectra is its one-plane form), with wrap_share to check the compact support it relies on; examples/window_accuracy.py measures each window’s quadrature against it and against padded references, and examples/step_certification.py separates the step’s effect on the linear and the nonlinear parts of the field.

  • pnps.calibrate.richardson_table gives the step-calibration differences per save plane, window and observable, with the peaks and each plane’s alias_fraction; richardson_metric is its worst entry.

  • pnps.simulate.visit_nonlinear streams a delay point plane by plane with the field’s nonlinear part, the field minus the linearly propagated input, and pnps.bridge.Bridge.visit streams the planes of any input, one at a time.

  • With Config.exact_windows the scan file records the collected windows: each window_def*_apod is "hard" (_apod_param 0, _weighting "quadrature"), so a reader that rebuilds the aperture from these records builds the disc. New /grid scalars exact_windows (0 or 1) and window_field ("nonlinear" or "total") say what the windows hold, and the configured rendering is kept as window_def*_configured_apod, _configured_apod_param and _configured_weighting. An exact window that overlaps the far field of an input hole emits a pnps.exceptions.WindowOverlapWarning, since it leaves out the transmitted input light a detector there would see.

Changed#

  • The check that stops a run as numerically unstable now watches the photon number, sum eta |E|^2 / omega, not the energy. The envelope Kerr and Raman responses conserve the photon number while moving the energy in proportion to the nonlinear phase (a blue shift of 8.4e-8 per radian for the 1 fs PNPS input), so no fixed energy bound was both tight and safe: 1e-9 stopped sound runs and 1e-6 would stop one near 12 rad. Between two save planes the photon number may now grow only by rounding plus 1e-2 (Gamma h)^2 per step of length h (Bridge.photon_allowance), with Gamma the configuration’s peak nonlinear wavenumber, new as pnps.bridge.peak_kerr_rate and Bridge.kerr_rate. The measurements are in docs/dev/numerics.md.

  • The order rung of the validation ladder reads the march through the default compact windows from 0.156 µm and asks that the error fall at least at the march’s order.

  • pnps now requires solprop 0.4 or later, whose far-field apertures can reduce the nonlinear part of the field through exact hard discs (its SEP 53): Config.exact_windows uses them.

Changed (breaking)#

  • The masks default to their accurate renderings, the ones docs/windows.md recommends: input holes are the exact hard aperture (Config.apod="area", apod_param=4.0, in place of a supergaussian of order 16, which passed 86 % of a 1 mm hole), and collection windows are a raised-cosine edge two momentum bins wide used as a quadrature weight (WindowSpec.apod="rcos", weighting="quadrature", in place of a three-pixel tanh amplitude filter, whose two observables described effective apertures from 0.74 to 1.12 of the nominal one). Traces computed with the defaults change. To keep the previous rendering, set apod="supergauss", apod_param=16.0 on Config and apod="tanh", weighting="amplitude" on each WindowSpec; a Planck edge, which lies outside the hole, now needs weighting="amplitude" given explicitly.

Fixed#

  • A run started with OpenMP’s thread binding in the environment (OMP_PROC_BIND, OMP_PLACES) no longer runs on one core. Starting solprop’s native backend under binding pins the main thread to one CPU, and numba’s pool and the march then ran on it: five times slower per step at the production shape on 16 cores. pnps now restores the thread’s CPUs and emits a ThreadBindingWarning (pnps.kernels.release_main_thread). The example Slurm script no longer sets the binding, and the README and the manual’s clusters, engine and performance pages say to leave it unset.

[0.1.0] - 2026-11-29#

The first public release, and an experimental one: a forward model of PNPS (TG-FROG and self-diffraction FROG) traces in bulk media, with the propagation integrated by solprop. The interface may still change between minor releases.

Added#

  • The instrument. The folded-boxcar transient-grating layout and the two-beam self-diffraction layout (Config.geometry); hollow-capillary (HE11), Gaussian and uniform illumination; chromatic input holes and collection windows with supergaussian, tanh, raised-cosine, Planck and exact pixel-area edges, as amplitude filters or quadrature weights, and achromatic windows as a diagnostic.

  • Input pulses. Transform-limited or chirped Gaussians, or a measured or simulated field injected from a file, resampled exactly and centred, with its provenance recorded.

  • The model. The 3-D envelope unidirectional propagation equation in fused silica, integrated by solprop on its free-space route: dispersion, exact diffraction, the Kerr effect and optionally the delayed Raman response, from optmat’s silica model; spectral and transverse-wavevector absorbers inside the exact linear operator, and a group-delay lap budget in place of a time window.

  • The measure of energy. Energy is measured by the medium’s axial Poynting flux, as solprop measures it: the beam enters the slab keeping each component’s flux, so a stated pulse energy is the physical energy there, and every spectrum, energy and absorbed power is the flux a spectrometer would receive.

  • Runs on solprop’s runner. Every delay point runs through Simulation.runner() with an output handler that reduces each plane as it is saved, instead of driving the backend protocol by hand. The input is freed once loaded and named by the configuration and the delay, not hashed. solprop’s boundary monitor watches the transverse edge (Config.transverse_monitor); the time window stays the lap budget’s.

  • A transverse-aliasing reading. Every plane records alias_fraction, the share of the energy outside half the momentum span, where a cubic product of the field folds back into its own band (solprop’s reading, LupoLab/solprop#216), on the host and in solprop’s statistics alike.

  • Self-diffraction on the device. The SD signal region, the half of the mask beyond the gate-side edge, is a half-plane row of solprop’s aperture set, so an SD run reduces with solprop’s statistics like a TG one and copies no plane out. The region keeps to air’s light cone on both paths, the light that can leave the slab.

  • What the lap budget removes. Its absorption is reported apart from the band edges’ (absorb_lap, solprop’s custom channel), and per delay as the energy per frequency bin it removed over the slab (lap_lost, from an exact per-bin energy balance between planes), with the whole beam’s spectrum (Iω_beam) to set it against: lap_loss_share gives a band’s share. Building a configuration whose window is too short for its band logs the band it keeps and the window that would keep all of it (required_trange).

  • Verified numerics. A fixed, replayed step schedule with the low-storage RK4IP march (or DOPRI5); Richardson step calibration and observed order on the measured observables; a validation ladder of four rungs: exact linear parity with an independent propagator, a first-Born computation of the signal (in both layouts), the observed order, and the invariants.

  • Scale. solprop’s native backend, on CPUs and on NVIDIA and AMD GPUs, with its NumPy reference for checking; field-free save planes reduced by solprop’s statistics; sharded, resumable scans; TOML run files and the pnps command (scan, merge, budget); a memory budget before launch, read from the backend’s own ledger (27 GiB at the production shape); every thread pool, this package’s numba kernels included, held within solprop’s thread budget, so a container’s CPU quota is respected.

  • Continuous integration and releases. CI runs the whole gate on Linux, macOS and Windows, a lane on solprop’s NumPy reference backend and the dependency floors; the release workflow builds, checks and (by trusted publishing) publishes the distributions.

  • Output. HDF5 scan files in the layout the Croak retrieval package reads, with the input and vignetted-beamlet truths, the engine’s provenance and the silica model used; load_simulated_scan to read them back.

  • Dependencies. solprop 0.3 or later, from PyPI, which brings its compiled backend, solprop-native, with it (pip install pnps).