pytrip.models package

The models module provides functions for calculating cell survival and RBE.

pytrip.models.rbe_carabe(dose, let, abx)[source]

Carabe proton RBE model

input parameters may be either numpy.array or scalars TODO: handle Cube() class directly

Params dose:physical proton dose in [Gy]
Params let:LET in [keV/um]
Params abx:alpha_x / beta_x [Gy^-1]
Returns:RBE for the given parameters
Ref:https://doi.org/10.1088/0031-9155/57/5/1159
pytrip.models.rbe_wedenberg(dose, let, abx)[source]

Wedenberg proton RBE model

input parameters may be either numpy.array or scalars TODO: handle Cube() class directly

Params dose:physical proton dose in [Gy]
Params let:LET in [keV/um]
Params abx:alpha_x / beta_x [Gy^-1]
Returns:RBE for the given parameters
Ref:http://dx.doi.org/10.3109/0284186X.2012.705892
pytrip.models.rbe_mcnamara(dose, let, abx)[source]

McNamara proton RBE model

input parameters may be either numpy.array or scalars TODO: handle Cube() class directly

Params dose:physical proton dose in [Gy]
Params let:LET in [keV/um]
Params abx:alpha_x / beta_x [Gy^-1]
Returns:RBE for the given parameters
Ref:https://doi.org/10.1088/0031-9155/60/21/8399
pytrip.models.rbe_rcr(dose_ion, let, alpha_x, beta_x, oxy=None)[source]

Returns the RBE for a given dose/let cube.

input parameters may be either numpy.array or scalars TODO: handle real cubes.

Params dose_ion:
 ion physical dose in [Gy]
Params let:LET in [keV/um]
Params alpha_x:alpha for X-rays in [Gy^-1]
Params beta_x:beta for X-rays in [Gy^-2]
Params oxy:optional oxygenation cube in [mmHgO_2]
pytrip.models.sf_rcr(dose, let, oxy=None)[source]

Function which returns surving fraction Equation (3) in https://doi.org/10.1093/jrr/rru020

input parameters may be either numpy.array or scalars TODO: handle real cubes.

Params dose:physical ion dose in [Gy]
Params let:LET in keV/um
Params oxy:optional oxygenation in [mmHgO_2]
pytrip.models.oer_rcr(let)[source]

~O dose modifying factor. Equation (2) in https://doi.org/10.1093/jrr/rru020

input parameters may be either numpy.array or scalars TODO: handle real cubes.

Params let:LET in [keV/um]
Returns:cube containing the oxygen enhancement ratio
pytrip.models.oer_po2_rcr(let, oxy)[source]

~O dose modifying factor, taking varying pO2 into account Equation (1) in https://doi.org/10.1093/jrr/rru020

input parameters may be either numpy.array or scalars TODO: handle real cubes.

Params let:LET in [keV/um]
Params oxy:oxygenation in [mmHgO_2]
Returns:cube containing the oxygen enhancement ratio
pytrip.models.tcp_voi(sf, voi=None, ncells=1.0, fractions=1)[source]

Returns TCP within VOI. If VOI is not give, TCP of entire cube is calculated. This is equation (7) in https://doi.org/10.1093/jrr/rru020 assuming static oxygenation during all fractions. (Equation (8) would require a new oxy cube after every fractionation, not implemented.)

Params numpy.array sf:
 numpy array, surviving fraction cube
Params Voi voi:pytrip Voi() class object
Params float ncells:
 number of cells in each voxel, or a cube of surviving fractions
Params int fractions:
 number of fractions, default is 1
pytrip.models.rbe_from_sf(sf_ion, dose_ion, alpha_x, beta_x)[source]

Returns the RBE for given ion survivng fraction and (alpha/beta)x-ray :params float dose: ion physical dose in [Gy] (cube or scalar) :params float sf_ion: surviving fraction in ion beam (cube of scalar) :params float alpha_x: alpha for X-rays in [Gy^-1] (cube or scalar) :params float beta_x: beta for X-rays in [Gy^-2] (cube or scalar)

pytrip.models.lq(dose_x, alpha_x, beta_x)[source]

Linear-quadratic survival model. (LQ-model)

Returns surviving fraction for a given dose, alpha and beta for X-rays.

Params float dose:
 x-ray physical dose in [Gy] (cube or scalar)
Params float alpha_x:
 alpha value for x-rays [Gy^-1] (cube or scalar)
Params float beta_x:
 beta value for x-rays [Gy^-2] (cube or scalar)