[us-commits] [ehb54/ultrascan3] 5ea9ec: extrap-c0: model-independent low-q SE-correction Q...

emre brookes noreply at github.com
Thu Jul 30 13:53:04 MDT 2026


  Branch: refs/heads/ehb54-issue-920
  Home:   https://github.com/ehb54/ultrascan3
  Commit: 5ea9ec80d9f3c1ef2847d4d0b1800c08e6cd77ed
      https://github.com/ehb54/ultrascan3/commit/5ea9ec80d9f3c1ef2847d4d0b1800c08e6cd77ed
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_saxs.h
    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/develop/src/us_hydrodyn_saxs_iqq_extrap_c0_script.cpp
    M us_somo/somo/doc/manual/somo/somo_saxs_extrap_c0.html

  Log Message:
  -----------
  extrap-c0: model-independent low-q SE-correction QC + wave flag (replaces reciprocal-only warning)

A low-q point the extrapolation places far off the smooth low-q trend is almost always a
correlated buffer-subtraction / detector artifact: because the input curves agree on it, its
extrapolated intercept SE comes out falsely tiny, giving it ~10-100x false weight in any
1/sigma^2 downstream fit (Guinier, GNOM, an NNLS reconstruction). Diagnosed on Mattia Rocco's
alpha-syn curves (2026-07-30): two such points at q~0.0068/0.0073 drove a low-q wave and a bad
SAF NNLS P-value, and the fix is to widen their error bars, not to smooth.

New file-scope helper us_extrap_c0_lowq_serepair (replaces the reciprocal-only
us_extrap_c0_wave_runsz): fits a ROBUST (iteratively reweighted, Tukey biweight) quadratic-in-q^2
trend to ln I over q <= 2/Rg, then WITHOUT changing any intensity:
  (a) SE-CORRECTION: widens each low-q error bar in place to max(sd, |I - trend|) -- model
      independent, upward only, no threshold. Removes the artifacts' false leverage.
  (b) WAVE FLAG: returns the trend-residual runs-z. When automatic GCV smoothing is on it can
      spread such artifacts into a coherent low-q wave in the VALUES (which widening the errors
      cannot undo); a strongly negative z warns and recommends turning GCV off (the unsmoothed
      extrapolation keeps the artifact local, where the SE-correction handles it).

Why this replaces the earlier reciprocal-only differential wave warning: the low-q artifact and
the GCV wave are model-independent (additive waves too), so a reciprocal-vs-additive test was the
wrong tool.

- On by default (se_repair): CLI directive `se_repair 0|1`, and a GUI checkbox
  "Low-q SD correction ...". Manual updated (new section; old reciprocal wave caveat removed).
- Changes only the output sd column. Regression: se_repair 0 reproduces all 9 baselines
  byte-identical (isolation); with it on, only recip_nogcv (2) and virial2 (56) change, sd-only
  (q and I identical). Validated on compiled SOMO: the SE-correction fires on the two alpha-syn
  bad points (sd 1.5e-4 -> 2.4e-3, x16.5) and the wave flag fires on reciprocal+GCV (runs-z -4.6).

Co-Authored-By: Claude Opus 4.8 <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