Skip to main content

Python toolkit for SHIELD-HIT12A and Fluka

Project description

WHAT IS THIS ?

pymchelper is a toolkit for manipulating output and input files of particle transport codes, such as FLUKA and SHIELD-HIT12A. It provides a command line program, called convertmc which simplifies process of converting binary output files to graphs, tabulated plain data files (which can be open by MS Excel) and other formats. Toolkit can also serve as a library in Python language, which can be used to read data from binary files into convenient Python objects. This allows further data processing using other Python tools and libraries.

Installation

First be sure to have Python framework installed, then type:

pip install pymchelper

In case you don’t have administrator rights, add --user flag to pip command. In this situation converter will be probably installed in ~/.local/bin directory.

To be able to use tripcube converter install also pytrip98 Python package using pip.

For more detailed instruction, see installation guide.

Documentation

To convert single SHIELDHIT12A output file, called dose.bdo file to a PNG image run:

convertmc dose.bdo plot_dose.png --converter image

Let us assume you ran SHIELD-HIT12A on a cluster specifying 5 different estimators in detect.dat and running 100 parallel jobs. As an output you have 500 .bdo files. convertmc converter can automatically discover which files belong to which estimator and automatically generate 5 output files. To convert all *.bdo files to a set of PNG images you shouldn’t specify output file name, just run:

convertmc --many "*.bdo" --converter image

The same output format as in standard convertmc converter, shipped with SHIELD-HIT12A code can be achieved with --converter standard option. In this case ASCII file with 4 columns will be saved.

Reduced ASCII output (i.e. only two columns for 1D scoring) can be produced with --converter plotdata option. Converters can be combined. Following command will generate ASCII data which can be digested by gnuplot and accompanying gnuplot scripts:

convertmc --many "*.bdo" --converter plotdata gnuplot

TRiP98 binary .dos cubes (two files: ASCII .hed and binary .dos) can be generated with --converter tripcube. It will produce output only for MSH and VOXMESH SHIELD-HIT12A scorers.

More on https://pymchelper.readthedocs.io/

Features

  • reading *.bdo files generated by SHIELD-HIT12A code

  • reading *_fort* files generated by FLUKA

  • writing PNG images (1 and 2D plots)

  • writing tabulated ASCII files

  • writing gnuplot scripts

  • writing binary files with .dos cubes in TRiP98 format

MORE DOCUMENTATION

Full documentation can be found here: https://pymchelper.readthedocs.io/

If you would like to download the code and modify it, read first this.

Project details


Release history Release notifications | RSS feed

This version

0.4.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymchelper-0.4.2-py2.py3-none-any.whl (121.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pymchelper-0.4.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pymchelper-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 150d8db9da60b79544d35f6b63527b6a7280dd6e9190c4dea5c7b9d6cbf2d33b
MD5 7a87202d45935f7635028be571572578
BLAKE2b-256 094a8243c77e5b11d1de618c7a24553455d15c09606c111d9e62db669384bc27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page