[us-commits] [ehb54/ultrascan3] 2a9ff0: extrap_c0: add "Weight regression by curve errors ...
emre brookes
noreply at github.com
Tue Jul 14 09:23:31 MDT 2026
Branch: refs/heads/ehb54-issue-920
Home: https://github.com/ehb54/ultrascan3
Commit: 2a9ff087427182a7eb9220032e4c8b41459ed907
https://github.com/ehb54/ultrascan3/commit/2a9ff087427182a7eb9220032e4c8b41459ed907
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M us_somo/develop/include/us_hydrodyn_saxs_iqq_extrap_c0_conc.h
M us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.cpp
M us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0_conc.cpp
M us_somo/somo/doc/manual/somo/somo_saxs_extrap_c0.html
Log Message:
-----------
extrap_c0: add "Weight regression by curve errors (1/sigma^2)" toggle
New dialog checkbox (on by default) controlling whether the concentration
regressions use the curve SDs as inverse-variance weights.
- ON (default): all three fit paths (GCV precompute, 2nd-virial precompute, and
the plain per-q linear fit) weight by 1/sigma^2 with sigma propagated onto the
fit axis, and the intercept error bar is now taken from the WEIGHTED linear_fit
overload. This fixes a prior inconsistency where the reported SE was always the
unweighted OLS residual SE even on the (weighted) GCV path -- so default error
bars change vs earlier builds (fit values on the default GCV path are unchanged;
the non-default plain path changes both value and SE).
- OFF: ordinary least squares -- curve errors are still shown as regplot error
bars but not used in the fit; the intercept error bar is the residual scatter.
More robust when SDs are missing or mis-scaled (common in SAXS, and documented
on this pipeline via recompute_errors). Output name gains _uw.
Scope: only the concentration regression, including the outlier detector, which
under OFF standardizes residuals by their per-q RMS instead of by sigma (so the
QC still works without trustworthy errors). The high-q reference merge test and
the post-fit SD reassessment are intrinsically error-based and unchanged.
Weighting uses the weighted linear_fit only when every point at a q has a usable
error (that overload divides by e^2 and only self-guards when ALL errors are
zero); q with any missing SD fall back to unweighted and the count is reported,
instead of silently mixing weighted and unweighted points.
Manual updated (weighting paragraph, scope boundary, _uw token, SE caveat).
Co-Authored-By: Claude Fable 5 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/ultrascan3/settings/notifications
More information about the us-commits
mailing list