topas2numpy

PyPI Package Build Status Code Coverage Documentation Status

Reading TOPAS results into NumPy arrays.

Features

TOPAS is a Monte Carlo tool for particle simulation, designed for medical physics research. It can output two data types:

  • binned: a quantity (e.g. dose) is accumulated within a binned geometry component
  • ntuple: multiple data columns are recorded per particle history

This package is able to read both data types, enabling analysis within Python.

Basic Usage

from topas2numpy import BinnedResult
x = BinnedResult('Dose.csv')

from topas2numpy import read_ntuple
y = read_ntuple('Beam.phsp')