pytrip.tripexecuter package¶
The tripexecuter module provides functions for executing TRiP98 locally or remotely.
-
class
pytrip.tripexecuter.Field(basename='')[source]¶ Bases:
objectOne or more Field() object, which then can be added to a Plan() object. :params str basename: basename of field without file extension (input or output will be suffixed with proper file extension)
-
set_isocenter_from_string(isocenter_str)[source]¶ Override the automatically determined isocenter from TRiP98. :params str isocenter_str: x,y,z coordinates of the isocenter/target in [mm] in a comma delimted string. such as “123.33,158.4,143.5”. If and empty string is provided, then the isocenter is unset, and TRiP98 will calculate it itself.
Following the target() option in the TRiP98 field command, one can specify the isocenter of the target. If not used, TRiP98 will determine the isocenter from the target Voi provided.
-
-
class
pytrip.tripexecuter.Execute(ctx, vdx, ctx_path='', vdx_path='')[source]¶ Bases:
objectExecute class for running trip using attached Ctx, Vdx and Plan objects.
-
class
pytrip.tripexecuter.Plan(basename='', comment='')[source]¶ Bases:
objectClass of handling plans.
-
load_dose(path, _type, target_dose=0.0)[source]¶ Load and append a new DOS cube from path to self.doscubes.
-
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.
-