You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML summary goodness-of-fit is always 'N/A' — Project._last_fit_results is never written #375
src/easyreflectometry/summary/summary.py:317 reads getattr(self._project, '_last_fit_results', None), but nothing in the codebase ever sets _last_fit_results (verified by grep over src/). _compute_goodness_of_fit therefore always returns 'N/A' in the generated report. The fit results live on Project.fitter / MultiFitter but were never wired to the attribute the summary reads.
Even if wired, the single-result branch reads .reduced_chi2, while fitting.py:152 deliberately probes both reduced_chi and reduced_chi2 because the attribute name varies across minimizers — the summary needs the same dual probe.
Suggested fix
Have the fit path store results on the project (or have the summary read them from project.fitter), apply the dual attribute probe, and add a test asserting a non-'N/A' goodness-of-fit after a successful fit.
Related cosmetic: template token num_constriants (sic) in summary/html_templates.py:144 / summary.py:312.
Found during deep code review (DEEP_ANALYSIS.md §5.9).
Activity
fixes for summary printout #375 (#385)
🎉 Release: merge develop into master (#442)
Release 2.0.0 (#454)