| context rad: Rad | rad.builtin(string) -> Material | Load a built-in material: water, air, lead, iron, aluminum, copper, tungsten, silicon, germanium, concrete, nai, polyethylene, tissue, bone, or pmma. |
| Rad | rad.material(string, float) -> Material | Create a custom material with a name and density in g/cm3. |
| Rad | rad.element_table(string, int, string) -> void | Register or replace an element symbol and atomic number Z from XCOM-format rows (E coherent incoherent photo pair_nuclear pair_electron in cm2/g, covering 0.001..20 MeV). |
| Rad | rad.geometry() -> Geometry | rad.source() -> Source | rad.simulation(Geometry, Source) -> Sim | Construct empty Geometry, Source, or Sim builder handles. |
| Rad | rad.klein_nishina(float) -> float | rad.compton_mean_transfer(float) -> float | rad.sample_compton_mean(float, int, int) -> float | Compute total Klein-Nishina cross section (cm2/electron), analytic mean Compton energy transfer (MeV), or Monte Carlo sampled mean transfer for (E, samples, seed). |
| Rad | rad.assert_close(float, float, float) -> void | rad.assert_true(bool) -> void | Assert |actual - expected| <= tol or boolean truth; fails with exit code 3 on violation. |
| Rad | rad.save_text(string, string) -> void | rad.print(string) -> void | rad.version() -> string | Write text to a file, print a diagnostic line to stderr, or return the host version string. |
| Material | m.element(string, float) -> Material | Add an element mass fraction (built-in: H, C, N, O, Na, Mg, Al, Si, P, S, Ar, K, Ca, Fe, Cu, Ge, I, W, Pb, or custom element_table symbols). |
| Material | m.name() -> string | m.density() -> float | Return the material name or density in g/cm3. |
| Material | m.mu(float) -> float | m.mu_mass(float) -> float | m.mu_partial(float, string) -> float | Return linear attenuation coefficient (1/cm), mass attenuation coefficient (cm2/g), or partial linear coefficient for rayleigh, compton, photo, or pair at energy E (MeV). |
| Material | m.mfp(float) -> float | m.hvl(float) -> float | Return mean free path (1/mu) or half-value layer (ln(2)/mu) in cm at energy E (MeV). |
| Geometry | g.box(string, Material, float, float, float, float, float, float) -> Geometry | Add an axis-aligned box region named name over [x0, x1] x [y0, y1] x [z0, z1] in cm. |
| Geometry | g.slab(string, Material, float, float) -> Geometry | Add an infinite x-y slab region named name over [z0, z1] in cm. |
| Geometry | g.sphere(string, Material, float, float, float, float) -> Geometry | Add a spherical region named name with center (cx, cy, cz) and radius r in cm. |
| Geometry | g.cylinder(string, Material, float, float, float, float, float) -> Geometry | Add a z-axis cylindrical region named name with center (cx, cy), radius r, and z span [z0, z1] in cm. |
| Geometry | g.regions() -> int | Return the number of defined regions in the geometry. |
| Source | s.point(float, float, float) -> Source | s.disc(float) -> Source | Set source position (x, y, z) in cm, optionally spread uniformly over a disc of radius r perpendicular to the beam. |
| Source | s.beam(float, float, float) -> Source | s.cone(float, float, float, float) -> Source | s.isotropic() -> Source | Set pencil beam direction (dx, dy, dz), cone direction with half-angle in degrees, or 4-pi isotropic emission. |
| Source | s.energy(float) -> Source | s.line(float, float) -> Source | Set a monoenergetic source energy in MeV (replacing prior lines) or add a discrete spectral line (energy_MeV, relative_weight). |
| Sim | sim.plane(string, string, float) -> Sim | Add an infinite scoring plane named name normal to axis x, y, or z at coordinate pos (cm) counting forward crossings. |
| Sim | sim.spectrum(int, float) -> Sim | sim.pulse_height(string) -> Sim | Configure energy histogram binning (bins, emax_MeV) and enable per-history pulse-height tallying in a named region. |
| Sim | sim.cutoff(float) -> Sim | sim.no_rayleigh() -> Sim | sim.implicit_capture(float) -> Sim | Set absorption energy cutoff in MeV (>= 0.001), disable Rayleigh scattering, or enable implicit capture with Russian roulette weight cutoff (0 < w < 1). |
| Sim | sim.tracks(int) -> Sim | sim.seed(int) -> Sim | sim.run(int) -> Result | Record interaction vertices for the first n histories (0..100000), set the RNG seed, and run n histories. |
| Result | r.histories() -> int | r.source_energy() -> float | r.track_points() -> int | Return simulated history count, mean emitted energy per source photon (MeV), or recorded track vertex count. |
| Result | r.deposited(string) | r.deposited_err(string) | r.deposited_uncollided(string) | r.deposited_uncollided_err(string) -> float | Return total or first-collision kerma deposited in a named region (MeV per source photon) and its standard error. |
| Result | r.total_deposited() | r.total_deposited_err() | r.escaped() | r.escaped_err() | r.escaped_uncollided() | r.escaped_uncollided_err() | r.escaped_energy() -> float | Return total energy deposited across all regions or fraction/energy of photons escaping the geometry. |
| Result | r.plane_count(string) | r.plane_count_err(string) | r.plane_uncollided(string) | r.plane_uncollided_err(string) | r.plane_energy(string) -> float | Return total or uncollided forward crossings and forward energy per source photon across a named scoring plane. |
| Result | r.interactions(string) -> float | r.pulse_fraction(string, float, float) -> float | Return interactions per source photon by process (rayleigh, compton, photo, pair, total) or pulse-height fraction in [lo, hi) MeV. |
| Result | r.save_regions(string) | r.save_plane_spectrum(string, string) | r.save_leakage_spectrum(string) | r.save_pulse_height(string, string) | r.save_tracks(string) -> void | Write space-separated region kerma table, plane spectrum, leakage spectrum, pulse-height histogram, or interaction tracks to disk. |