A comprehensive Python toolkit for nuclear data analysis, Monte Carlo simulation support, and uncertainty quantification. KIKA provides tools for working with MCNP, ENDF, ACE files, covariance matrices, and sensitivity analysis, and powers the KIKA desktop workspace.
Looking for the desktop application? Visit kika-app.com to download KIKA for Windows, macOS, or Linux and explore the user guides. No Python installation is required.
- Parse and manipulate MCNP input files (materials, PERT cards)
- Read and analyze MCTAL output files
- Tally data extraction and visualization
- Compute sensitivity data using PERT cards
- Generate and visualize sensitivity profiles
- Create Sensitivity Data Files (SDF) compatible with SCALE
- ACE: Parse ACE format nuclear data files
- ENDF: Read Evaluated Nuclear Data Files
- GNDS: Read and write GNDS 2.0/2.1 — see What "GNDS support" means here
- Covariance: Handle covariance matrices from SCALE and NJOY
kika reads and writes GNDS. It does not implement GNDS 2.1, and those are different claims: it covers the parts the ENDF/B-VIII.1 neutron evaluations use. Rather than leave you to find the edge, the library states it:
>>> import kika.gnds
>>> print(kika.gnds.capabilities().summary())
300 of GNDS's nodes: 134 full, 7 partial, 159 unsupported (17 lost without a report line); and 12 nodes kika names that gnds.xsd does not declareThe left-hand column is every element gnds.xsd and covariances.xsd
declare, so a node kika does not touch is listed as unsupported rather than
being missing from the list. Every row says why, citing a section of the
specification or a line of the source. In short: the covariance chapter (§25)
is complete; the thermal scattering law and the double-differential cross
sections are not read at all.
>>> print(kika.gnds.capabilities(coverage="partial").text())
>>> print(kika.gnds.capabilities(group="thermalScattering").text())capabilities() says what the library can lose without opening a file; the
report on a suite you read says what your file lost.
- Energy group structure definitions
- Serpent Monte Carlo code support
- Uncertainty quantification utilities
pip install kika-ndFor development features:
# Install with development dependencies
pip install kika-nd[dev]
# Install with documentation dependencies
pip install kika-nd[docs]import kika
# Read an MCNP input file
input_data = kika.read_mcnp("path/to/input_file")
# Read a MCTAL file
mctal = kika.read_mctal("path/to/mctal_file")
# Access materials
materials = input_data.materials
# Compute sensitivity data
sens_data = kika.compute_sensitivity(
inputfile="path/to/input_file",
mctalfile="path/to/mctal_file",
tally=4,
nuclide=26056,
label='Sensitivity Fe-56'
)
# Read ACE data
ace_data = kika.read_ace("path/to/ace_file")
# Read covariance matrices
cov = kika.read_coverx("path/to/covmat_file") # text or binary, auto-detectedKIKA follows the SCALE SDF convention: reaction error arrays and e0 are absolute one-sigma standard deviations. Energy boundaries are represented internally in MeV and written to SDF files in eV.
# Standard SCALE/KIKA SDF (absolute uncertainties)
sdf = kika.read_sdf("profile.sdf")
# Historical KIKA SDF written with relative uncertainties
legacy = kika.read_sdf("old_profile.sdf", uncertainty_convention="relative")UQ calculations use a format-neutral SensitivityProfile. Alignment is exact
by default: energy grids and units must agree, and missing covariance raises an
actionable error instead of silently reducing the calculation.
from kika.UQ import align_sensitivity_covariance, similarity_ck
import kika.benchmarks as benchmarks
application = kika.read_sdf("application.sdf").to_sensitivity_profile()
benchmark = benchmarks.get_sensitivity_profile(profile_id)
aligned = align_sensitivity_covariance(
[application, benchmark], covariance,
alias_policy="tsurfer", # explicit SCALE/TSURFER aliases
missing="drop", # explicit opt-in; inspect aligned.report
)
ck = similarity_ck(application, benchmark, covariance)
ranking = benchmarks.rank_benchmarks_by_ck(
application, covariance, benchmark_ids=candidate_ids
)Ranking and propagation never condense grids implicitly. Until explicit SDF condensation is implemented, candidates must use the same grid as the supplied covariance.
- Desktop application and workflow guides
- Python library documentation and API reference
- Latest desktop installers
Contributions are welcome! Please feel free to submit a Pull Request.