xopto.dataset.validation.mcml_comparison module¶
- compare(test_dir: str, reference_dir: str, out_dir: Optional[str] = None, verbose: bool = False)[source]¶
Compares the results of two “MCML comparison” datasets that include data on several configurations computed with layered (mcml) and voxelized (mcvox) Monte Carlo simulator cores.
- Parameters
test_dir (str) – Path to the root directory of the test dataset.
reference_dir (str) – Path to the root directory of the reference dataset.
out_dir (str) – Optional directory for producing error plots. The error plots follow the directory structure of the dataset.
verbose (bool) – Enable verbose reporting to stdout.
- Returns
results – A collection of Relative Root-Mean-Square error (RRMSE) and Mean Relative Error (MRE) values for all the dataset configurations defined in the
CONFIG
dict. The MRE and RRMSE values are given in multidimensional numpy arrays. The following code illustrates the organization of the returned data. note that the fields are fully expanded only for configuration1-layer-100mm
simulated with the Monte Carlo core for layered media (mcml
).{ 'mcml': { '1-layer-100mm': { 'transmittance': {'mre': values, 'rrmse': values}, 'reflectance': {'mre': values, 'rrmse': values}, 'total_transmittance': {'mre': values, 'rrmse': values}, 'total_reflectance': {'mre': values, 'rrmse': values}, 'fluence_data': {'mre': values, 'rrmse': values}, 'indexing': ('mua', 'musr', 'g') 'mua': mua_values, 'musr': msr_values, 'g': g_values }, '1-layer-1mm': {...}, '2-layer-100um-1mm': {...} }, 'mcvox': { '1-layer-100mm': {...}, '1-layer-1mm': {...}, '2-layer-100um-1mm': {...} } }
- Return type
dict