pymkm.biology.oxygen_effect¶
Oxygen effect modeling (OSMK 2021 and 2023) for microdosimetry.
This module implements functions to compute:
Relative radioresistance
compute_relative_radioresistance()
OSMK 2023 scaling factors
compute_scaling_factors()
Oxygen-corrected α and β LQ parameters for hypoxia
It supports both OSMK 2021 (γ, zR, Rm formulation) and OSMK 2023 (scaling model) based on microdosimetric specific energies and a parameter container.
Intended for use during SMK post-processing when apply_oxygen_effect=True.
- pymkm.biology.oxygen_effect.apply_oxygen_correction_alpha(z_bar_star_domain: ndarray, R: ndarray, params) ndarray [source]¶
Compute oxygen-corrected alpha (LQ model) using the OSMK model.
- Parameters:
z_bar_star_domain – Saturation-corrected specific energy.
R – Relative radioresistance.
params – Object with attributes: alphaL, alphaS, beta0.
- Returns:
Oxygen-corrected alpha values.
- Return type:
np.ndarray
- pymkm.biology.oxygen_effect.apply_oxygen_correction_beta(z_bar_star_domain: ndarray, z_bar_domain: ndarray, R: ndarray, params) ndarray [source]¶
Compute oxygen-corrected beta (LQ model) using the OSMK model.
- Parameters:
z_bar_star_domain – Saturation-corrected specific energy (Gy).
z_bar_domain – Dose-mean specific energy (Gy).
R – Relative radioresistance.
params – Object with attribute beta0.
- Returns:
Oxygen-corrected beta values.
- Return type:
np.ndarray
- pymkm.biology.oxygen_effect.compute_osmk_radioresistance(version: str, z_bar_domain: ndarray, params) Tuple[ndarray, ndarray | None, ndarray | None] [source]¶
Compute relative radioresistance R using the OSMK model.
Supports both OSMK 2021 and OSMK 2023. Also computes scaling factors (f_rd, f_z0) for OSMK 2023 if requested.
- Parameters:
version – OSMK model version (‘2021’ or ‘2023’).
z_bar_domain – Dose-mean specific energy of the domain.
params – Parameter object with required attributes.
- Returns:
Tuple (R, f_rd, f_z0). f_rd and f_z0 are None for version ‘2021’.
- Return type:
tuple[np.ndarray, Optional[np.ndarray], Optional[np.ndarray]]
- Raises:
ValueError – If the version is unsupported.
- pymkm.biology.oxygen_effect.compute_relative_radioresistance(K: float, pO2: float, K_mult: ndarray) ndarray [source]¶
Compute the relative radioresistance R based on oxygen tension and model-dependent scaling.
This function is used in both OSMK 2021 and OSMK 2023 models.
- Parameters:
K – Oxygen pressure [mmHg] at which R = (1 + Rmax)/2.
pO2 – Partial pressure of oxygen [mmHg].
K_mult – Model-specific multiplicative term for the denominator.
- Returns:
Relative radioresistance values (R).
- Return type:
np.ndarray
- pymkm.biology.oxygen_effect.compute_scaling_factors(R: ndarray, f_rd_max: float, f_z0_max: float, Rmax: float) Tuple[ndarray, ndarray] [source]¶
Compute scaling factors for domain radius and z0 (OSMK 2023).
- Parameters:
R – Relative radioresistance.
f_rd_max – Max scaling factor for domain radius at pO2 = 0.
f_z0_max – Max scaling factor for z0 at pO2 = 0.
Rmax – Maximum radioresistance at pO2 = 0.
- Returns:
Tuple of (f_rd, f_z0) scaling factors.
- Return type:
tuple[np.ndarray, np.ndarray]