Skip to main content

KIKA

Version Documentation Status PyPI Python License Website

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.

Features

MCNP Processing

  • Parse and manipulate MCNP input files (materials, PERT cards)
  • Read and analyze MCTAL output files
  • Tally data extraction and visualization

Sensitivity Analysis

  • Compute sensitivity data using PERT cards
  • Generate and visualize sensitivity profiles
  • Create Sensitivity Data Files (SDF) compatible with SCALE

Nuclear Data

  • 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

What "GNDS support" means here

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 declare

The 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.

Additional Tools

  • Energy group structure definitions
  • Serpent Monte Carlo code support
  • Uncertainty quantification utilities

Installation

pip install kika-nd

For development features:

# Install with development dependencies
pip install kika-nd[dev]

# Install with documentation dependencies
pip install kika-nd[docs]

Quick Start

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-detected

SDF uncertainty convention

KIKA 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")

Sensitivity/covariance alignment and c-k

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.

Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Release files for kika-nd 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kika-nd 0.4.0
File Size Uploaded
kika_nd-0.4.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for kika-nd 0.4.0
File Interpreter ABI Platform
kika_nd-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.6 MB

Release files / kika_nd-0.4.0.tar.gz

Download URL kika_nd-0.4.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
aeda864788f0ececa9dc7bd53736aa6af3ddfc4c6f4f8238a237dcf591ce98f8
BLAKE2b-256 checksum
How to use checksums
36e091897308f61de99ec7f08be908601a79f45856c0009abfd5427063a0ac10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / kika_nd-0.4.0-py3-none-any.whl

Download URL kika_nd-0.4.0-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
266c1ccfdb437b98a16bae1e5b490d500e9c04b5675adf691f0c690b7f8d9884
BLAKE2b-256 checksum
How to use checksums
1d3777e4129769a9677eb31b1e393acc1128a94ab1cc6fb7caaffd786468db39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page