Python tutorials
Hands-on Python guides for Nucleide. Each tutorial is short, self-contained, and assumes you have already installed the project (see Getting started).
Suggested order
- Parse MCNP output — read common MCNP output files.
- Parse Serpent output — read Serpent
_res.m,_dep.m, and_det.mfiles. - Parse FLUKA output — read FLUKA USRBIN
.listally files. - Build materials — build, mix, and serialize materials.
- Run depletion — run a CRAM depletion solve.
- Enrichment cascade — solve a multicomponent enrichment cascade.
- Activation analysis — read ALARA, FISPACT-II, and ORIGEN files and assemble an R2S workflow.
- Deterministic I/O — read ISOTXS and flux files and write PARTISN decks.
- Emit code cards — render one material to MCNP, Serpent, FLUKA, ALARA, and PARTISN cards with a mass-drift report showing how much mass each dialect kept.
- Run kinetics — solve prescribed-reactivity point-kinetics transients.
- Run spectroscopy — smooth spectra, count peaks,
calibrate energy/efficiency, evaluate X-ray lines, and read
.spefiles. - MCPL particle interchange — read and write MCPL particle lists; merge, subset, and summarize them; repair interrupted writes.
- UQ sampling — draw seeded MVN, log-normal, and LHS samples over caller-supplied covariance blocks and perturb decay and fission-yield data.
- VR and MAGIC — derive weight-window lower bounds with MAGIC and sample birth voxels through alias tables.
- Reaction names — resolve reaction names/ids/MT numbers and walk the parent/daughter reaction graph.
- Translate CSG — translate scoped MCNP CSG decks to OpenMC, Serpent, or PHITS geometry with a drift report listing every approximation the translator made.
- Run tritium — steady-state and transient 1D tritium permeation solves with traps and recombination boundaries.
- Damage metrics — fold multigroup fluxes into dpa and gas production, and propagate uncertainty through the fold.
- Fusion sources — build ring, point, and parametric tokamak neutron sources and emit MCNP/Serpent source cards.
- Unfold a spectrum — recover a neutron spectrum from activation detector measurements with SAND-II, least-squares, or GRAVEL adjustment, including the IRDFF response pack.
- Clearance screening — classify parsed activation inventories against the EU or Spanish clearance tables.
End-to-end notebooks
Single-topic pages above compose into full workflows in
notebooks/:
first-wall damage + UQ, activation screening + radiological totals, and
tokamak source sampling + card emission. Every notebook executes in CI with
fixed seeds over committed fixtures, so the workflows are verified examples,
not sketches.