pymkm.mktable.compute¶
Computation engine for MKTable.
This module defines the logic to compute microdosimetric quantities (z̄*, z̄_d, z̄_n) for a set of ions based on the MKM or SMK model using energy–LET tables.
It integrates track structure modeling, specific energy calculation, saturation correction, and optional oxygen-effect scaling (OSMK 2023).
- pymkm.mktable.compute.compute(self: MKTable, ions: List[str | int] | None = None, energy: float | List[float] | ndarray | None = None, parallel: bool = True, integration_method: str = 'trapz') None [source]¶
Compute per-ion microdosimetric tables using MKM or SMK model.
- For each ion:
Retrieves energy–LET grid
Computes specific energy and dose-averaged quantities
Applies saturation correction and optional OSMK
Aggregates into a structured table
- Parameters:
self (MKTable) – MKTable instance.
ions (list[str or int], optional) – Ion identifiers to compute. If None, all available ions are used.
energy (float or list or np.ndarray, optional) – Custom energy grid for resampling (if any).
parallel (bool) – Whether to enable multiprocessing.
integration_method (str) – Integration scheme (‘trapz’, ‘simps’, ‘quad’).
- Raises:
RuntimeError – If MKTable is not initialized.