Skip to content

Native Bridge

Python wrappers for the Rust physics engine (hyrr-core via PyO3).

_native_bridge

Bridge to native Rust extension (hyrr._native via PyO3/maturin).

When the native extension is available, physics compute is routed through hyrr-core (Rust). The native extension is required — there is no pure-Python fallback for physics computation.

bateman_activity

bateman_activity(production_rate: float, half_life_s: float | None, irradiation_time_s: float, cooling_time_s: float, n_time_points: int = 200) -> tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]]

Compute time-dependent activity via Bateman equations (Rust).

saturation_yield

saturation_yield(production_rate: float, half_life_s: float | None, beam_current_mA: float) -> float

Compute saturation yield [Bq/µA] (Rust).

dedx_MeV_per_cm

dedx_MeV_per_cm(db: object, projectile: str, composition: list[tuple[int, float]], density_g_cm3: float, energy_MeV: float | NDArray[float64]) -> float | npt.NDArray[np.float64]

Compute linear stopping power [MeV/cm] via Rust.

Accepts the same signature as the old stopping.dedx_MeV_per_cm for backwards compatibility with compute3d.py.