Skip to main content

GUI to plot the results of a topas simulation

Project description

topasgraphsim

Am interface to automatically plot and interpret the results of TOPAS simulations

This GUI can visualize and analyze percentage depth dose (pdd) and dose profiles (dp) simulations from TOPAS. Depth dose measurements are assumed to be in the z-direction, dose profiles in the x- or y-directions. Data read-in is handled by topas2numpy.

Features

  • Reproducible graphing and analysis of TOPAS simulation for medical physics
  • Simultaneous plotting and parameter calculation for up to 5 datasets
  • Graph adjustment options
    • Normalization (On/Off)
    • Error bars (On/Off)
    • Difference plot between two datasets
    • Graph order and colors
    • Marker size
    • Line width
    • Zoom-in window
    • Half view of dose profiles
  • Center axis deviation correction
  • Import of EGS simulation results
  • Import of custom measurements (as numpy .txt files)
  • Import of PTW tbaScan (MEPHYSTO mc2) measurements
  • Easy to use keyboard shortcuts (see manual below)
  • German and english language support
  • Dark mode

Screenshots

dpp

dp

Manual

Most customization options are available via the menubar, however the workflow can be sped up greatly by using the included keyboard and mouse shortcuts documented below.

Loading and saving data

Keyboard Shortcut Associated Function
Ctrl + O Open a TOPAS simulation file [*.csv *.bin]
Ctrl + P Open a PTW tbaScan file [*.mcc]
Ctrl + T Open a PDD measurement file [*.txt]
Ctrl + D Open a DP measurement file [*.txt]
Ctrl + S Save the current graph [*.png *.jpg]
Ctrl + Z Remove the last imported dataset
Escape Close the current project

Adjusting the Graph Style

Mouse/Keyboard Shortcut Associated Function
Ctrl + Increase/decrease the marker size
Ctrl + Increase/decrease the line width
Scrollwheel Increase/decrease the X-axis limits
Ctrl + Alt + + - Increase/decrease the error plot upper limits
Ctrl + Shift + + - Increase/decrease the error plot lower limits
Double Left Click on Graph Change zoom window location

Adjusting the Graph Legend

Mouse/Keyboard Shortcut Associated Function
Hover over Graph Name + Change the graph order
Left Click on Graph Name Rename the selected graph
Right Click on Graph Name Change color of the selected graph

Installation

Install using pip:

$ pip install topasgraphsim     

Then, start the GUI by running:

$ python -m topasgraphsim

Or, if your Python is added to $PATH, simply run:

$ topasgraphsim

Parameters

Depending on the imported measurement, the following parameters can be calculated:

Measurement type Parameters
Depth dose Q-Factor zmax
Dose profile FWHM CAXdev FLATKrieger FLATstddev Penumbra (L&R) Integral (L&R)
  • Q-Factor : Radiation Quality Factor

  • zmax : Depth at Maximum

  • FWHM : Full-Width at Half-Maximum

  • CAXdev : Centre Axis Deviation

  • FLATKrieger : Flatness of Dose Plateau (Definition by Krieger)

  • FLATstddev : Flatness of Dose Plateau (Standard Deviation)

  • Penumbra (L&R) : Width of Left and Right Penumbra

  • Integral (L&R) : Integral below Left and Right Penumbra

Dependencies

Built using the beautiful Azure-ttk theme by @rdbende. Requires python3, numpy, scipy, matplotlib, Pillow, python-opencv, pynput, topas2numpy and tkinter.

Note: Linux users need to have python3-tk installed. If it isnt installed yet, use:

sudo apt-get install python3-tk

Project details


Release history Release notifications | RSS feed

This version

17.0

Download files

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

Source Distribution

topasgraphsim-17.0.tar.gz (947.0 kB view details)

Uploaded Source

Built Distribution

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

topasgraphsim-17.0-py3-none-any.whl (984.9 kB view details)

Uploaded Python 3

File details

Details for the file topasgraphsim-17.0.tar.gz.

File metadata

  • Download URL: topasgraphsim-17.0.tar.gz
  • Upload date:
  • Size: 947.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for topasgraphsim-17.0.tar.gz
Algorithm Hash digest
SHA256 91cceff38491e645c6651c977138c1ef2055ce1a305930609444038c7d30ba98
MD5 8f7dc974e140e6040bf14948238652f5
BLAKE2b-256 f778b52c427d654df331daf47f19ac6d109ef14458b123ca7e5c568899dbdfca

See more details on using hashes here.

File details

Details for the file topasgraphsim-17.0-py3-none-any.whl.

File metadata

  • Download URL: topasgraphsim-17.0-py3-none-any.whl
  • Upload date:
  • Size: 984.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for topasgraphsim-17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b78cf4ed12d26e25264bcd25ff469bd4ee9880ad8b3e77644d62adf6eacb2240
MD5 8b6e43767bb4397bbe87cf58889d742a
BLAKE2b-256 db59ed5978d50228d190fae4b6e19c61e18928bd8263b7a278299c68b0c6c1bf

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