Skip to content

Plotting framework for SOFT, the Synchrotron-detecting Orbit Following Toolkit

Notifications You must be signed in to change notification settings

hoppe93/softplot

Repository files navigation

softplot

A plotting framework for SOFT, the Synchrotron-detecting Orbit Following Toolkit, used to simulate the radiation emitted by relativistic runaway electrons in tokamaks.

softplot provides a number of Python classes and GUIs for plotting and working with the various output files generated by SOFT. The framework is under active and constant development, and is for that reason currently lacking in terms of documentation.

Some of the classes and GUI programs need to know where the SOFT executable is located on the system, and for this one has to define the environment variable SOFTPATH. This can be done directly in the terminal just before running softplot or a program using softplot, or it can be done globally by adding the following to the .bashrc (or equivalent) file:

export SOFTPATH="/path/to/SOFT2/build/src"

Note that the path to the directory containing the SOFT executable should be specified. By default, this is the build/src directory in the SOFT2 directory.

Classes

To be written...

GUI programs

softplot provides a number of GUI programs for plotting and working with the output files from SOFT. The GUIs are launched using the script gui/main.py, which expects at least the name of the GUI to launch. Available GUIs are listed below.

detcal

SOFT detector calibration using PNG images...

distfunc

Visualize SOFT distribution functions...

image

Display SOFT images and top-views...

meq

Visualize SOFT magnetic field data...

greenij

Visualize SOFT Green's functions with formats *ij, i.e. any combination of first dimensions, and two image dimensions as the final dimensions. The program provides sliders for the other parameters.

r12

Visualize SOFT Green's functions with formats r12, i.e. consisting of a radial dimension and two momentum dimensions. This GUI also works if the Green's function only has two momentum dimensions, i.e. has format 12.

orbits

Visualize output from the SOFT @Orbits tool.

png

Not a GUI. Converts a given SOFT image or top-view to a PNG image.

rij

Apply a radial distribution function to a Green's function with format rij. This program can be used to (manually) fit radial profiles to SOFT images.

s12ij

Apply a simple pitch distribution function to a SOFT Green's function with format s12ij. The energy distribution is assumed to be a delta function (hence s1 = "single first momentum"), while an exponential function with a variable exponent factor is used.

About

Plotting framework for SOFT, the Synchrotron-detecting Orbit Following Toolkit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published