pytrip.let module

This module provides the LETCube for handling LET data.

class pytrip.let.LETCube(cube=None)[source]

Bases: pytrip.cube.Cube

This class handles LETCubes.

It is similar to DosCubes and CtxCubes, but is intended to hold LET data. The object has build-in methods to read and write the LET data cubes, calculate the LET-volume historgrams, and write these to disk. It is inherited from Cube, which contains many additional methods and attributes.

calculate_lvh(voi)[source]

Calculate a LET-volume historgram.

Parameters:voi (Voi) – The volume of interest, in the form of a Voi object.
Returns:A tuple containing - lvh: the LET-volume histogram - min_lvh: array of LET values below 2% - max_lvh: array of LET values above 98% - area: TODO - what is this?
data_file_extension = '.dosemlet.dos'
get_max()[source]

Returns the largest value in the LETCube.

Returns:the largets value found in the in the LETCube.
header_file_extension = '.dosemlet.hed'
write(path)[source]

Write the LETCube and its header to a file with the filename ‘path’.

Parameters:path (str) – path to header file, data file or basename (without extension)
write_lvh_to_file(voi, path)[source]

Write the LET-volume historgram to a file.

Parameters:
  • voi (Voi) – The volume of interest, n the form of a Voi object.
  • path (str) – Full path of file to be written.