[ehb54/ultrascan3] 6c91cf: Add gui_script commands for the UV-Vis module
Branch: refs/heads/ehb54-issue-994 Home: https://github.com/ehb54/ultrascan3 Commit: 6c91cf6a276ec740abe198a0a3421a3eddd91daf https://github.com/ehb54/ultrascan3/commit/6c91cf6a276ec740abe198a0a3421a3ed... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-08-07 (Fri, 07 Aug 2026) Changed paths: M us_somo/develop/include/us_hydrodyn_dad.h M us_somo/develop/libus_somo.pro M us_somo/develop/src/us_hydrodyn.cpp M us_somo/develop/src/us_hydrodyn_dad.cpp A us_somo/develop/src/us_hydrodyn_dad_script.cpp M us_somo/develop/src/us_hydrodyn_dad_util.cpp M us_somo/develop/src/us_hydrodyn_script.cpp Log Message: ----------- Add gui_script commands for the UV-Vis module The UV-Vis module had no scripted path: gui_script knew nothing about it and us_saxs_cmds_t does not reach it, so every change to the module could only be exercised by hand in the GUI. Add a "dad" command family to gui_script_run(): open, settimes, lambdarange, lambdas, load, list, select, makealambda and save. Together these load a wavelength list and an absorption matrix, build the A(t) curves, make A(lambda) and write the results, with no interaction. That needs the module to run without dialogs, so US_Hydrodyn_Dad gains a script_mode plus the values dad_load() would otherwise prompt for. With it set, the wavelength confirmation, the wavelength crop and the start time and interval dialogs are all answered from the script. The non-interactive entry points live in a new us_hydrodyn_dad_script.cpp. Also add saxs_options iqscaleangstrom and iqscalenm, since whether q values are converted from 1/nm on load was otherwise unreachable from a script. dad open reaches US_Hydrodyn_Saxs::dad() through the meta-object rather than making the slot public, so no interface widens for scripting alone. Fix an unrelated crash found by the first script run: US_Hydrodyn's constructor initialises around thirty *_widget flags but misses dad_widget, mals_widget and mals_saxs_widget, added later with those windows, and nulls no window pointer. US_Hydrodyn_Saxs::dad(), mals() and mals_saxs() test the flag and then dereference the matching window, so an indeterminate read is a segmentation fault. Interactive runs survive on zeroed heap; the headless run did not. Refs ehb54/ultrascan-tickets#994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/ultrascan3/settings/notifications
participants (1)
-
emre brookes