chromasurr.sensitivity module
- chromasurr.sensitivity.run_sensitivity_analysis(process, param_config, bounds, metric_names=None, n_samples=512)[source]
Perform Sobol sensitivity analysis using a CADETProcess simulation.
- Parameters:
process (Any) – A CADET
Processobject representing the base model (type is untyped because CADET does not ship type hints).param_config (Mapping[str, str]) – Maps parameter name → attribute path inside the process object. Example path:
"binding_model.adsorption_rate[0]".bounds (Mapping[str, Sequence[float]]) – Parameter bounds as
[min, max]per parameter name.metric_names (Sequence[str] or None, optional) – Which metrics to extract via
chromasurr.metrics.extract(). Defaults to["retention_time"].n_samples (int, optional) – Base sample size for Saltelli; total sims ~
n_samples * (2D + 2).
- Returns:
dict[str, dict[str, ArrayF | float]] – Mapping
metric_name→ Sobol result dict from SALib. Each dict typically contains keys like"S1","ST","S2"and their confidence intervals (some values are arrays, some scalars).- Raises:
KeyError – If a requested metric is not present in extracted results.
ValueError – If simulation repeatedly fails and no metrics can be produced.
- chromasurr.sensitivity.set_nested_attr(obj, attr_path, value)[source]
Set a nested attribute on an object, including indexed lists.
- Parameters:
- Return type:
Notes
This walks the object graph following the components in
attr_path. When a component looks likename[index], it indexes the list/sequence.