georges.ptw package#
Submodules#
georges.ptw.ptw module#
TODO
- georges.ptw.ptw.compute_dvh(dose_data, voxel_volume)[source]#
- Parameters:
dose_data – 3D-array of the dose values.
voxel_volume – The volume of a unique voxel. We consider the same size for all voxels.
- Returns:
The dvh stored into a 2 columns dataframe
- Return type:
dvh_dataframe
- class georges.ptw.ptw.BraggPeakAnalysis(bp: DataFrame, method: str, low_dose=1, high_dose=70)[source]#
Bases:
object
This class processes a normalized 1D depth dose profile, or a pristine Bragg peak, to extract key information such as the maximum dose position, the distal range at a given percentage of the maximum, and the distal fall-off (DFO). The user must provide both the dose data and the corresponding positions in depth.
- class georges.ptw.ptw.SpreadOutBraggPeakAnalysis(dose_data: ~pandas.core.frame.DataFrame | None = None, method: str = <module 'scipy.optimize' from '/home/runner/work/georges/georges/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.py'>, z_axis: ~numpy.array | None = None, color: str = 'blue', str_on_legend: str = '', adjust_last_peak: float = 1.0)[source]#
Bases:
object
This class takes a set of Bragg peaks, or a Bragg peak library, as input and computes the relative weights required to obtain a uniform depth dose profile, known as the SOBP. Additionally, this class processes the resulting SOBP and provides the flatness, DFO, and distal range at a given percentage of the maximum to the user.
- class georges.ptw.ptw.LateralProfileAnalysis(dose_profile: array, positions: array)[source]#
Bases:
object
This class takes a normalized 1D transverse dose profile as input and computes various parameters such as the field size, the uniform region (defined as 80% of the field size), the transverse flatness of the uniform region, and the lateral penumbra at the left and right of this region. The user must provide both the dose data and the corresponding transverse positions.
- class georges.ptw.ptw.RegularSpotScanning(sigma, fieldsize, n_spots_per_axis)[source]#
Bases:
object
This class provides a method to calculate the required spot spacing for a regular grid irradiation scheme in order to obtain a two-dimensional uniform dose deposition profile for a given spot width (1 sigma) and a targeted circular field. The user inputs the half value of the field size, the desired number of spots along each axis of the field, and the standard deviation (1 sigma) of the beam. The required spot spacing to achieve a 2D dose uniformity of at least 98% is directly outputted.
- class georges.ptw.ptw.ContourSpotScanning(sigma, fieldsize, desired_angle, shoot_on_aperture: bool = True, angle_imposed: bool = False)[source]#
Bases:
object
This class works similarly to RegularSpotScanning but uses a circular, contour-based irradiation scheme with a central spot placed at the center of the field. The user can choose whether to impose the irradiation radius. The output of the calculation includes the relative weight of the contour spots compared to the central spot and the angle spacing between these spots.