Skip to main content

Python toolkit for SHIELDHIT and Fluka

Project description

pymchelper

https://img.shields.io/pypi/v/pymchelper.svg https://img.shields.io/travis/DataMedSci/pymchelper.svg Documentation Status

Overview

docs

Documentation Status

tests

Travis-CI Build Status Appveyor Build Status

package

PyPI Package latest release PyPI Package monthly downloads PyPI Wheel Supported versions Supported implementations

Python toolkit for SHIELDHIT and Fluka

Installation

Official version

pip install pymchelper

Development version directly from GIT:

pip install versioneer
pip install git+https://github.com/DataMedSci/pymchelper.git

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 dose.bdo file to a PNG image run:

bdo2txt dose.bdo plot_dose.png --converter image

Let us assume you ran SHIELDHIT on a cluster specifying 5 different estimators in detect.dat and running 100 parallel jobs. As an output you have 500 .bdo files. bdo2txt 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:

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

The same output format as in standard bdo2txt converter, shipped with SHIELDHIT 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:

bdo2txt --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 SHIELDHIT scorers.

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

Features

  • reading *.bdo files generated by SHIELDHIT code

  • writing PNG images (1 and 2D plots)

  • writing tabulated ASCII files

  • writing gnuplot scripts

  • writing binary files with .dos cubes in TRiP98 format

Credits

This package was created with Cookiecutter and the grzanka/cookiecutter-pip-docker-versioneer project template.

Project details


Release history Release notifications | RSS feed

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

pymchelper-0.2.0-py2.py3-none-any.whl (15.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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