pytrip.raster module¶
This module provides the top-level Rst class which can handle accelerator control files generated by TRiP98. It also provides the SubMachine class which treats individual energy layers.
-
class
pytrip.raster.Rst[source]¶ This class handles raster scan data, which are accelerator control files in GSI format. Raster scan data are stored in .rst file, and describe the amount of particles going into each spot in each energy layer. Each energy layer is called a ‘submachine’.
-
gaussian_blur(sigma)[source]¶ For a loaded .rst file, apply a normal distributed setup error to each energy layer of sigma magnitude. :params float sigma” 1-sigma error to be applied to all positions.
-
get_min_max()[source]¶ Retrieve the largest and smallest x,y position found in all energy layers.
Returns: A list of four values in [x_min,x_max,y_min,y_max] in [mm].
-
get_stepsize()[source]¶ Returns the distance between each spot in the first energy plane.
Most likely the distance will be the same in all planes.
Returns: Distancce between spots in [mm]. If no submachines are found, None is returned.
-
read(path)[source]¶ Load and parse a raster scan (.rst) file.
Parameters: path (str) – Full path to the file to be loaded, including file extension.
-