[us-commits] [ehb54/ultrascan3] 6ba2c5: extrap_c0: allow explicit reference-curve selectio...
emre brookes
noreply at github.com
Mon Jul 20 14:16:43 MDT 2026
Branch: refs/heads/ehb54-issue-920
Home: https://github.com/ehb54/ultrascan3
Commit: 6ba2c51a18bf32051322bdf25b0c0d66d05b3678
https://github.com/ehb54/ultrascan3/commit/6ba2c51a18bf32051322bdf25b0c0d66d05b3678
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-07-20 (Mon, 20 Jul 2026)
Changed paths:
M us_somo/develop/include/us_hydrodyn_saxs.h
M us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.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: allow explicit reference-curve selection, with guards
The reference used for the absolute scale and the high-q splice was always the
highest-concentration curve. That is the right DEFAULT -- intensity scales with
concentration, so the top curve normally has the best high-q signal-to-noise, which
is exactly what the splice consumes -- but it is wrong when that curve is itself
unsound (aggregation, mis-set concentration, radiation damage, bad subtraction).
The program cannot detect that case: the top-concentration curve is the extreme x in
the per-q fit, so its leverage approaches 1, the line passes essentially through it,
and its residual carries almost no information about it. Judging it needs knowledge
from outside the regression (e.g. MW from I(0) against the known value), which the
user may have. So expose the choice rather than guess: new `reference <name|conc>`
control-file directive, matching either a curve name (or a distinctive part of one)
or a concentration. A non-matching value is reported and the default used, never
silently ignored.
Two guards, because overriding interacts badly with the splice:
- selecting a non-highest concentration while merge_ref is on is warned about. The
merge point is where the extrapolation stops differing from the reference, and a
lower-concentration reference is both nearer dilute already and noisier, so the
test passes almost immediately.
- a merge point in the first 10% of the grid is flagged: the output is then the raw
reference curve rather than the extrapolation, discarding both the de-noising and
the c=0 correction. This guard also protects the default path.
Verified: override selects correctly by concentration and by name substring;
non-matching falls back with a warning; both guards fire on a lower-concentration
reference (merge collapses to index 0 of 1045, as predicted); all 9 regression
baselines byte-identical, so the default path is unchanged. Manual updated with the
directive, why highest-concentration is the right default, why the program cannot
audit that curve itself, and the splice 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