Metadata-Version: 2.0
Name: pymchelper
Version: 0.3.5
Summary: Python toolkit for SHIELD-HIT12A and Fluka
Home-page: https://github.com/DataMedSci/pymchelper
Author: Leszek Grzanka
Author-email: grzanka@agh.edu.pl
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: enum34
Requires-Dist: numpy

WHAT IS THIS ?
==============

pymchelper is a toolkit for manipulating output and input files of particle transport codes,
such as Fluka and SHIELDHIT12-A.
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``.

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 <docs/technical.rst>`__.


