pytrip.tripexecuter.plan module

Structure: A Plan() may hold one or multiple Field() objects. When a Plan() is proper setup, it can be executed with methods in Execute().

class pytrip.tripexecuter.plan.Plan(basename='', comment='')[source]

Bases: object

Class of handling plans.

clean_voi_caches()[source]

TODO: document me

destroy()[source]

Destructor for Vois and Fields in this class.

load_dose(path, _type, target_dose=0.0)[source]

Load and append a new DOS cube from path to self.doscubes.

load_let(path)[source]

Load and append a new LET cube from path to self.letcubes.

make_exec(no_output=False)[source]

Generates the .exec script from the plan and stores it into self._trip_exec.

make_sis(projectile, focus=(), intensity=(), position=(), path='', write=False)[source]

Creates a SIS table based on path, focus, intensity and position. example: plan.make_sis(“1H”, “4”, “1E6,1E7,1E8”, (2, 20, 0.1)) results in: makesis 1H / focus(4) intensity(1E6,1E7,1E8) position(2 TO 20 BY 0.1)

:params str projectile” such as “12C” or “1H” :params str focus: comma-delimited list of FWHM focus positions in [mm], such as “2,4,6,8” :params str intensities: tuple/list of intensities, such as “1E6,1E7,1E8” :params float position: tuple describing min/max/step range, i.e. (5,40,0.1) for 5 to 40 cm in 1 mm steps. :params path: write path :params write: Set to True, if the generated sis file should be written to path when executed.

save_data(images, path)[source]

Save this plan, including associated data. TODO: may have to be implemented in a better way.

save_exec(exec_path=None)[source]

Generates (overwriting) self._trip_exec, and saves it to exec_path.

save_plan(images, path)[source]

Saves the complete plan to path. 1) *.exec 2) *.dos