Skip to main content

brana

Brana is toolkit for working with MCNP calculations.

Installation

pip install brana

Input

Flexible and tolerant parsing of MCNP input files. Enables extraction of geometry and limited editing.

Output

Multi-dimensional numpy array based processing of tally results:

  • Easily distinguish individual cell bins based on array axis.

Example:

from brana.output import OutputFile

of = OutputFile('mcnp_out')

of.GetResults()
of.results # --> dictionary with results

of.ReadLostPart()
of.lost_particles # --> list of lost particles

Meshtal

Multi-dimensional numpy array based processing of meshtally results:

  • Simple numpy slice based plotting.
  • Easy to plot in 3D with pyvista.

Features:

  • Export MeshtallyFile object to HDF5 format and importing from HDF5 format -- does not yet support HDF5 format introduced in MCNP 6.3.
  • Tacebility: Internal log keeps track of where files were created, imported, exported, modified, ...
  • Merging: Merge multiple meshtally files with optimal merging which consideres individual voxel uncertinaties.

Limitations:

  • Cylindircal geometry.

Example:

import brana.meshtal.MeshtallyFile as mtf

# read MCNP meshtally output file 
mf = mtf.FromMCNP('my_meshtally')

# check file
print(mf) # --> prints structure, header information, tally ids, array shapes, tally name

# access resuts 
mf.results # --> python dictionary with tally IDs as keys

# export to HDF5
mf_a = mtf.FromMCNP('meshtal_a')
mf_a.ToHFD5('meshtal_a.h5')

# import from HDF5
mf_a_import = mtf.FromHDF5('meshtal_a.h5')

# merging
mf_b = mtf.FromMCNP('meshtal_b')
merged = mtf.Merge([mf_a_import, mf_b, 'meshtal_c'])

Metadata

Release files for brana 0.1.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 brana 0.1.0
File Size Uploaded Provenance Actions
brana-0.1.0.tar.gz 31.1 kB With provenance Details for brana-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brana 0.1.0
File Interpreter ABI Platform Actions
brana-0.1.0-py3-none-any.whl Python 3 none any Details for brana-0.1.0-py3-none-any.whl

Total release size: 63.0 kB

Release files / brana-0.1.0.tar.gz

Download URL brana-0.1.0.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
630c1734b014b4f11daffeac3c795bc45b26373895ff3e708db793d76e8dc525
BLAKE2b-256 checksum
How to use checksums
573b96ebcb89250cc9204361ea9cbe328883f717f46d10f64dfbb760045aef02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / brana-0.1.0-py3-none-any.whl

Download URL brana-0.1.0-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9873fbc36c1b1fb68ff8450aebdc37d8a8f3cce84a7039c2bdcd910a856ca03e
BLAKE2b-256 checksum
How to use checksums
92124d2bb6a25b731618e588c80ea95f9b21a10790d1d5d997e9262dad37c294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for brana 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brana-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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