calamari.fitting.windows.FitWindowsResult#

class calamari.fitting.windows.FitWindowsResult(table, results, params)#

Bases: object

The outcome of fit_windows(): one fit per window, tabulated.

table#

One row per window, in the order the windows were given. Columns are x_min, x_max, n_points, success, dof, reduced_chi_squared and yerr_assumed, followed by <p> and <p>_err for every model parameter p:

x_min, x_max

The window’s inclusive bounds, as given.

n_points

How many points fell inside it.

success

Whether the fit converged to a valid minimum. A window with no more points than free parameters is a failure: fit() refuses it rather than interpolating it.

dof

n_points minus the number of free parameters, from the fit. Reported as is, so an underdetermined window shows zero or a negative number, which is the reason it failed.

reduced_chi_squared

From the fit; NaN on a failure row.

yerr_assumed

True when no yerr was supplied (see FitResult).

<p>, <p>_err

The best-fit value and its HESSE uncertainty. A fixed parameter reports its fixed value and an error of 0. A failure row is NaN throughout: where MIGRAD stopped is not an estimate, and a number in the table would invite plotting it. Drill into results for that.

<q>, <q>_err

One pair per entry of derived, after the parameter columns and in the mapping’s order: the quantity at the best fit and its first-order propagated uncertainty (see derive(), which also says when that approximation fails). NaN on a failure row, like the parameters; <q>_err alone is NaN when the window has no covariance to propagate.

Type:

pandas.DataFrame

results#

The per-window fit results, aligned with the rows of table (results[i] is row i), for drill-down: covariances, MINOS bands, curve(). A failed window’s entry is fit()’s own success=False result.

Type:

list of calamari.fitting.engine.FitResult

params#

The recipe: 'model' (the model name), 'windows' (the bounds as float pairs), 'fit_kwargs' (the forwarded fit() keywords, copied), 'derived' (each derived quantity’s name mapped to a qualified function/type or partial(function) description; empty without derived) and 'calamari_version'. Callable labels do not serialise configured state; retain callable source and configuration with the recipe.

Type:

dict