hyri.interface.imaging_param#
Build runtime parameter dictionaries for RI imaging components.
This file converts a flattened configuration dictionary into the three parameter dictionaries consumed by the imaging pipeline: measurement operator, regulariser/prox operator, and optimiser.
Functions
Construct validated imaging parameters for RI reconstruction. |
- hyri.interface.imaging_param.set_imaging_params_ri(param_general: dict[str, Any]) tuple[dict[str, Any], dict[str, Any], dict[str, Any]]#
Construct validated imaging parameters for RI reconstruction.
This function maps user/config inputs into algorithm-ready dictionaries, applies defaults and value guards, selects device/dtype settings, and prepares output paths and filename prefixes.
- Parameters:
param_general (Dict[str, Any]) – Flattened input parameter dictionary produced by interface parsing utilities.
- Returns:
Sorted
(param_measop, param_regulariser, param_optimiser)dictionaries used to instantiate measurement operators, regularisers, and optimisers.- Return type:
- Raises:
KeyError – If required keys such as
algorithmordata_fileare missing fromparam_general.
Note
The output dictionaries expose a stable grouped contract for runtime initialisation:
param_measop: Measurement-model controls including pixel/gridsettings, weighting, NUFFT options, device, and dtype.
param_regulariser: Regulariser runtime options including device,dtype, verbosity, and AIRI/HyperAIRI denoiser controls.
param_optimiser: Iteration controls, convergence tolerances,channel partitioning, distributed setup, output paths, and algorithm-specific optimisation settings.
Important defaults and guards include:
Invalid image/channel counts are clamped to valid ranges.
Unsupported backend/mode values fall back to safe defaults.
Device selection falls back to available accelerator, then CPU.
Examples
>>> pg = {"algorithm": "airi", "data_file": "demo.mat"} >>> pm, pr, po = set_imaging_params_ri(pg) >>> po["algorithm"] 'airi' >>> isinstance(po["img_size"], tuple) True