pyskindose.calculate_dose package
Submodules
pyskindose.calculate_dose.add_correction_and_event_dose_to_output module
- add_corrections_and_event_dose_to_output(normalized_data: pandas.core.frame.DataFrame, event: int, hits: List[bool], table_hits: List[bool], patient: pyskindose.phantom_class.Phantom, back_scatter_interpolation: List[scipy.interpolate._cubic.CubicSpline], field_area: List[float], k_tab: List[float], output: Dict[str, Any]) Dict[str, Any]
Add correction factors and event dose to output dictionary.
- Parameters
normalized_data (pd.DataFrame) – RDSR data, normalized for compliance with PySkinDose.
event (int) – Irradiation event index.
hits (List[bool]) – A boolean list of the same length as the number of patient skin cells. True for all entrance skin cells that are hit by the beam for a specific irradiation event.
table_hits (List[bool]) – A boolean list that specfies (for each hit), if the bean passes through the patient support table, by default None
patient (Phantom) – Patient phantom, either of type plane, cylinder or human, i.e. instance of class Phantom
back_scatter_interpolation (List[CubicSpline]) – List of interpolation objects to used to estimate backscatter correction from the correction database
field_area (List[float]) – X-ray field area in (cm^2) for each phantom skin cell that are hit by the X-ray beam
k_tab (List[float]) – List of table correction factors
output (Dict[str, Any]) – Dictionary containing outputs to store from the calculations. E.g. dose map and correction factors.
- Returns
Dictionary containing outputs to store from the calculations. E.g. dose map and correction factors.
- Return type
Dict[str, Any]
pyskindose.calculate_dose.calculate_dose module
- calculate_dose(normalized_data: pandas.core.frame.DataFrame, settings: pyskindose.settings_pyskindose.PyskindoseSettings, table: pyskindose.phantom_class.Phantom, pad: pyskindose.phantom_class.Phantom) Tuple[pyskindose.phantom_class.Phantom, Optional[Dict[str, Any]]]
Calculate skin dose.
This function initializes the skin dose calculations.
- Parameters
normalized_data (pd.DataFrame) – RDSR data, normalized for compliance with PySkinDose.
settings (PyskindoseSettings) – Settings class for PySkinDose
table (Phantom) – Patient support table phantom
pad (Phantom) – Patient support pad phantom
- Returns
[description]
- Return type
Tuple[Phantom, Optional[Dict[str, Any]]]
pyskindose.calculate_dose.calculate_irradiation_event_result module
- calculate_irradiation_event_result(normalized_data: pandas.core.frame.DataFrame, event: int, total_events: int, new_geometry: List[bool], k_tab: List[float], hits: List[bool], patient: pyskindose.phantom_class.Phantom, table: pyskindose.phantom_class.Phantom, pad: pyskindose.phantom_class.Phantom, back_scatter_interpolation: List[scipy.interpolate._cubic.CubicSpline], output: Dict[str, Any], table_hits: Optional[List[bool]] = None, field_area: Optional[List[float]] = None, k_isq: Optional[numpy.array] = None, pbar: Optional[tqdm.std.tqdm] = None) Dict[str, Any]
Conducts skin dose calculation.
This function loops though all irradiation events in the the normalized data, and calculates the skin dose contribution from each event.
- Parameters
normalized_data (pd.DataFrame) – RDSR data, normalized for compliance with PySkinDose.
event (starting event index) – Index of starting irradiation event
total_events – Total number of irradiation events
new_geometry (List[bool]) – A boolean list that specifies whether the irradiation geometry has changes since the preceding event. See the function check_new_geometry
k_tab (List[float]) – List of table correction factors
hits (List[bool]) – A boolean list that specifies (for a single event) the hit/miss status of each skin cell upon the patient phantom.
patient (Phantom) – Patient skin surface phantom
table (Phantom) – Patient support table phantom
pad (Phantom) – Patient support pad phantom
back_scatter_interpolation (List[CubicSpline]) – List of interpolation objects to used to estimate backscatter correction from the correction database
output (Dict[str, Any]) – Dictionary containing outputs to store from the calculations. E.g. dose map and correction factors.
table_hits (List[bool], optional) – A boolean list that specfies (for each hit), if the bean passes through the patient support table, by default None
field_area (List[float], optional) – X-ray field area in (cm^2) for each phantom skin cell that are hit by the X-ray beam, by default None
k_isq (np.array, optional) – Inverse-square-law correction factors, by default None
pbar (tqdm) – progress bar object
- Returns
Dictionary containing skin dose calculation results.
- Return type
Dict[str, Any]
pyskindose.calculate_dose.perform_calculations_for_new_geometries module
- perform_calculations_for_new_geometries(normalized_data: pandas.core.frame.DataFrame, event: int, new_geometry: bool, patient: pyskindose.phantom_class.Phantom, table: pyskindose.phantom_class.Phantom, pad: pyskindose.phantom_class.Phantom, hits: List[bool], table_hits: List[bool], field_area: List[float], k_isq: numpy.array)