[us-commits] [ehb54/ultrascan3] 72352e: Add extrapolation to zero concentration for I(q) C...

emre brookes noreply at github.com
Mon Jun 22 12:02:29 MDT 2026


  Branch: refs/heads/somo-dev
  Home:   https://github.com/ehb54/ultrascan3
  Commit: 72352e626deaa05e5ae3b7f742897c42960f6602
      https://github.com/ehb54/ultrascan3/commit/72352e626deaa05e5ae3b7f742897c42960f6602
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_saxs.h
    A us_somo/develop/include/us_hydrodyn_saxs_iqq_extrap_c0_conc.h
    M us_somo/develop/include/us_hydrodyn_saxs_iqq_load_csv.h
    M us_somo/develop/libus_somo.pro
    A us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.cpp
    A us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_iqq_load_csv.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_loads.cpp

  Log Message:
  -----------
  Add extrapolation to zero concentration for I(q) CSV load dialog

Adds a Zimm-plot-style q-pointwise linear extrapolation to zero
concentration in US_Hydrodyn_Saxs_Iqq_Load_Csv: select >=3 curves,
assign each a concentration via a new modal dialog, and add the
resulting intercept curve (with fit-derived intercept SE as error
bars) to the plot.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 1ecc8ce4ff282a725727bdc3f76ceb6b57104f78
      https://github.com/ehb54/ultrascan3/commit/1ecc8ce4ff282a725727bdc3f76ceb6b57104f78
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    A test_data/extrap_c0_test_iqq.csv
    A test_data/extrap_c0_test_iqq_poisson.csv
    A test_data/gen_extrap_c0_test_iqq.py
    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

  Log Message:
  -----------
  Fix conc_csv name-key mismatch, widen conc dialog, fix cancel flow, raw test data

- do_extrap_c0: prepopulation lookup and write-back now also try the
  dequoted curve name against conc_csv, fixing concentrations not being
  found for curves pushed in from SAXS Hplc (to_saxs() keys conc_csv by
  the bare unquoted plotted name, while curves selected via the "just
  plotted curves" load path are quoted to match the CSV-row convention).
- Cancelling the concentration-assignment dialog now raises/shows the
  main plot window and logs a message instead of silently returning.
- The concentration-assignment dialog is now sized to the longest
  selected curve name instead of a fixed width.
- Regenerated the synthetic test CSVs to use raw, concentration-
  proportional intensities (I(0) scales with c, plus a small
  structure-factor-like nonlinearity) instead of pre-normalized
  intensities, since load_iqq_csv curves are expected to be raw.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: e54705492a8105b4997dc81f9b3ed185ab60a43b
      https://github.com/ehb54/ultrascan3/commit/e54705492a8105b4997dc81f9b3ed185ab60a43b
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_saxs_loads.cpp

  Log Message:
  -----------
  Parse Conc:/PSV:/I0se: header tags when loading .dat/.txt/.sprr directly

load_saxs() and load_sans() (the main SAXS/SANS window's direct file
loader, used when picking individual .dat/.txt/.sprr files rather than
going through the HPLC module) never read the Conc:/PSV:/I0se: header
comment line, so conc_csv was never populated for curves loaded this
way -- do_extrap_c0's concentration pre-population had nothing to find.
Reuses the exact regexes already established in
US_Hydrodyn_Saxs_Hplc::load_file() and calls update_conc_csv() right
after the curve is plotted, keyed by the same name plot_one_iqq() uses.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 2d5bca3b5b3a7110db6eefcdb28ef3ff644fad9c
      https://github.com/ehb54/ultrascan3/commit/2d5bca3b5b3a7110db6eefcdb28ef3ff644fad9c
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.cpp

  Log Message:
  -----------
  Normalize by concentration before per-q regression in do_extrap_c0

Raw SAXS intensity is dominated by a term directly proportional to
concentration, so fitting raw I(q) vs c trivially extrapolates to ~0
at c=0 -- confirmed on real asyn data, where the output curve was
just noise oscillating around zero. The standard SAXS technique (the
Zimm-plot analogue) fits I(q,c)/c against c instead; its c=0 intercept
recovers the ideal, structure-factor-free dilute-limit curve.

Concentration (x-axis) stays the real, distinct entered values --
only the intensity (y-axis) is divided by each curve's own
concentration. Curves with concentration <= 0 are excluded from the
regression (can't normalize by zero) with a warning. Output curve is
now in concentration-normalized units, noted in the summary message.

Validated against the 6 real asyn .dat files: the normalized
intercept now produces a smooth, positive, Guinier-shaped curve
instead of near-zero noise.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 0df3387554c95a4ed1d6c69615a7e992e584a4ef
      https://github.com/ehb54/ultrascan3/commit/0df3387554c95a4ed1d6c69615a7e992e584a4ef
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.cpp

  Log Message:
  -----------
  Tag extrap_c0 output curve as concentration-normalized (Conc:1)

The extrapolated curve is I(q)/c extrapolated to c=0, i.e. already
concentration-normalized -- mark it conc=1 in conc_csv per SOMO's
existing Conc:1-means-normalized convention, so anything downstream
that respects conc_csv (e.g. selecting it for a further extrapolation)
treats it correctly rather than as a raw curve with concentration 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 243154e9c162112ff1cc51a473c9da664e041c38
      https://github.com/ehb54/ultrascan3/commit/243154e9c162112ff1cc51a473c9da664e041c38
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_saxs_iqq_load_csv.cpp

  Log Message:
  -----------
  Don't clear the plot before extrapolate-to-zero-conc has been confirmed

load_iqq_csv() clears the entire plot right after the load dialog
closes, whenever "Clear plot" is checked (the default) -- this
happened unconditionally before the new concentration-assignment
dialog even opened, so cancelling that dialog left the user with an
empty plot and no way to recover the previously plotted curves.

run_ift already avoids this exact problem by force-disabling "Clear
plot" while it's active; set_extrapolate_c0() now does the same, so
the plot is left untouched until/unless the extrapolation actually
completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 5e5d55ff38ee408d8bfb00d765599dbcf1acdb7f
      https://github.com/ehb54/ultrascan3/commit/5e5d55ff38ee408d8bfb00d765599dbcf1acdb7f
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_saxs_hplc.h
    M us_somo/develop/src/us_hydrodyn_saxs.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc.cpp

  Log Message:
  -----------
  Propagate concentrations when pushing curves from SOMO SAS to HPLC

US_Hydrodyn_Saxs::saxs_hplc() (the "Hplc/Saxs" button in SOMO SAS) added
curves to the HPLC window via add_plot() with no concentration at all,
so f_conc in HPLC was always 0/unknown for curves arriving this way --
the reverse direction of the to_saxs() push, which already carried
concentration across.

- US_Hydrodyn_Saxs_Hplc::add_plot() (both overloads) gains an optional
  trailing conc parameter (default -1, meaning "not specified", fully
  backward compatible with existing callers); when >= 0 it's written to
  f_conc, overriding the previous "preserve existing or default 0e0"
  fallback.
- saxs_hplc() now looks up each plotted curve's concentration via the
  SAXS window's own get_conc_csv_values() and passes it through.
- update_csv_conc() (HPLC's own "Solution Concentrations" table) now
  backfills new rows from f_conc instead of seeding them blank, so a
  propagated concentration is also visible in that window, not just
  used internally.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: c7ebdda2f2175331c0231fbc2fe4e7cc9eebbeda
      https://github.com/ehb54/ultrascan3/commit/c7ebdda2f2175331c0231fbc2fe4e7cc9eebbeda
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-21 (Sun, 21 Jun 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_dad_conc.cpp
    M us_somo/develop/src/us_hydrodyn_dad_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_mals_conc.cpp
    M us_somo/develop/src/us_hydrodyn_mals_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_mals_saxs_conc.cpp
    M us_somo/develop/src/us_hydrodyn_mals_saxs_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_buffer_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_buffer_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc_conc_load.cpp

  Log Message:
  -----------
  Fix "No such signal QHeaderView::released(int)" warning in conc dialogs

QHeaderView::released(int) is a Qt3/Qt4 signal name that doesn't exist
in Qt5 (it's the column/row header click handler in the various
"Concentrations" table dialogs across DAD, MALS, MALS+SAXS, SAXS,
SAXS buffer, and SAXS Hplc/Kin). The connect() silently failed at
runtime with a console warning, and the header-click slot (col/row
_header_released) never fired.

us_hydrodyn_saxs_conc.cpp already had the correct fix, properly guarded
behind #if QT_VERSION < 0x040000 / #else sectionClicked(int) / #endif --
the other 10 copy-pasted variants of this dialog never got that fix and
had the broken signal name unconditionally. Replaced with
sectionClicked(int) (the Qt5 equivalent) in all of them, matching the
already-proven-working pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>


  Commit: 7f1178ad2883095f6ddaee0b8da45ee644b1d378
      https://github.com/ehb54/ultrascan3/commit/7f1178ad2883095f6ddaee0b8da45ee644b1d378
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    R test_data/extrap_c0_test_iqq.csv
    R test_data/extrap_c0_test_iqq_poisson.csv
    R test_data/gen_extrap_c0_test_iqq.py

  Log Message:
  -----------
  Remove test data from top-level test_data/

Synthetic CSV fixtures and the generator script do not belong committed
to the repo, least of all in a top-level directory.


  Commit: 68f716a1a230bef74d05fdb5d76b442aadff4c53
      https://github.com/ehb54/ultrascan3/commit/68f716a1a230bef74d05fdb5d76b442aadff4c53
  Author: emre brookes <ehb54 at users.noreply.github.com>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_saxs.h
    M us_somo/develop/include/us_hydrodyn_saxs_hplc.h
    A us_somo/develop/include/us_hydrodyn_saxs_iqq_extrap_c0_conc.h
    M us_somo/develop/include/us_hydrodyn_saxs_iqq_load_csv.h
    M us_somo/develop/libus_somo.pro
    M us_somo/develop/src/us_hydrodyn_dad_conc.cpp
    M us_somo/develop/src/us_hydrodyn_dad_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_mals_conc.cpp
    M us_somo/develop/src/us_hydrodyn_mals_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_mals_saxs_conc.cpp
    M us_somo/develop/src/us_hydrodyn_mals_saxs_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_saxs.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_buffer_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_buffer_conc_load.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_hplc_conc_load.cpp
    A us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0.cpp
    A us_somo/develop/src/us_hydrodyn_saxs_iqq_extrap_c0_conc.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_iqq_load_csv.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_loads.cpp

  Log Message:
  -----------
  Merge pull request #455 from ehb54/somo-dev-claude

SAXS: extrapolation to zero concentration + concentration propagation fixes


Compare: https://github.com/ehb54/ultrascan3/compare/49c520dd6e3d...68f716a1a230

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