PyTracerLab.gui.uncertainty module

Measurement uncertainty settings of the GUI (shared by all solvers).

Translates the settings in AppState into the sigma / sigma_rel arguments of the solvers (see Solver). The module does not depend on Qt.

Settings

  • use_file_uncertainty: use the uncertainties from the _sd columns of the observation file where given.

  • uncertainty_mode for all other observations: "none" (DE and least squares unweighted, MCMC and DREAM estimate the standard deviation of each tracer), "absolute" (sigma_abs, one standard deviation per tracer) or "relative" (sigma_rel_percent of the observed value).

PyTracerLab.gui.uncertainty.effective_sigma(state) → numpy.ndarray | None[source]

Standard deviation of each observation as used by the solvers (for plots).

Returns None if no uncertainties are specified. If the settings leave some observations without uncertainty (the solver would report an error), only the values from the observation file are returned.

PyTracerLab.gui.uncertainty.file_uncertainty(state) → numpy.ndarray | None[source]

Uncertainties from the observation file as an array (N, K).

None if no observation file is loaded or the file has no _sd values.

PyTracerLab.gui.uncertainty.observations(state) → numpy.ndarray | None[source]

Observed values as an array (N, K), or None.

PyTracerLab.gui.uncertainty.solver_sigma_kwargs(state) → Dict[str, Any][source]

sigma and sigma_rel for the solvers from the GUI settings.

PyTracerLab.gui.uncertainty.summary(state) → str[source]

One-line description of the current settings for the GUI.