[us-commits] [ehb54/ultrascan3] 041c52: extrap_c0: optional robust one-outlier-concentrati...

emre brookes noreply at github.com
Tue Jul 14 08:28:31 MDT 2026


  Branch: refs/heads/ehb54-issue-920
  Home:   https://github.com/ehb54/ultrascan3
  Commit: 041c52f2120cac4f100dbf8026f9c5771f27349f
      https://github.com/ehb54/ultrascan3/commit/041c52f2120cac4f100dbf8026f9c5771f27349f
  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/include/us_hydrodyn_saxs_iqq_extrap_c0_regplot.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/develop/src/us_hydrodyn_saxs_iqq_extrap_c0_regplot.cpp
    M us_somo/somo/doc/manual/somo/somo_saxs_extrap_c0.html

  Log Message:
  -----------
  extrap_c0: optional robust one-outlier-concentration QC

Add a "Automatically discard one outlier concentration (robust QC)" checkbox
(off by default) with two threshold fields to the extrapolation dialog. A curve
with a mis-entered concentration, a scaling error, or aggregation sits off the
concentration trend at essentially every q; because it is on the wrong x-axis
rather than merely noisy, inverse-variance weighting does not suppress it, so it
biases every per-q fit and can be picked as the high-q reference.

Detection is at the curve level (never per-q, which would overfit at 3-8 points
and stitch discontinuities into the output): file-scope us_extrap_c0_detect_outlier()
runs a cheap per-q weighted OLS on the model axis, takes each curve's median
standardized residual across q plus its one-sided fraction, and nominates the
worst. Gates: median residual >= sigma (field, default 3.0), one-sided >= 70%,
separation >= 2x the others, and pooled reduced chi^2 improved by >= the chi^2-gain
factor (field, default 1.5) if removed. Guarded so >= 3 curves remain (>= 4 for
2nd-order virial) with >= 3 distinct concentrations.

Removal happens before reference selection, so a bad curve cannot become the
reference. At most one curve is dropped. A strong outlier is always flagged in the
log even when auto-discard is off. The excluded curve is drawn as a red x
(QwtSymbol::XCross, the removed-Guinier-point convention) in the per-q regression
plots and noted there; the output name gains _qc1. Targets concentration/scale
outliers; aggregation stays the Guinier QC's job. Manual updated.

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