Provide clear error message when delta_r is not provided in scripted reduction #38509
Labels
ISIS Team: LSS
Issue and pull requests managed by the LSS subteam at ISIS
Reported By User
Issues that were found or highlighted by a user/scientist
SANS
Issues and pull requests related to SANS
Original reporter: Rob Dalgliesh in the ISIS SANS Group
Describe the bug
If the
delta_r
value in theq_resolution
section of a SANS TOML user file is commented out then the SANS GUI recognises this and inserts a value of0.0
.However, if you run the reduction through a script an error is thrown because the value of
delta_r
is left undefined asNone
. The error is long and difficult to interpret.Example of TOML file
q_resolution
section:To Reproduce
To reproduce the error from the following script you will need access to the ISIS archive. Do the following:
SANS2D
and addNDXSANS2D/User/Masks/
to your Data Search Directories (via the Manage User Directories dialog).NDXSANS2D/User/Masks/USER_SANS2D_233O_4m_2p4_M3_8mm_Gentile_Rheometer_merged.TOML
[q_resolution]
section comment out thedelta_r
setting by adding a # to the start of that line (i.e.#delta_r = ....
).path_to_file
with the path to your local copy of the user file:You should see the following error:
Expected behavior
Request from our scientists:
Can the user file interpreter/parser have an extra error check added so that if
delta_r
is not defined then a sensible error message is thrown and the data reduction terminates appropriately. We could substitute a value of0.0
in all cases but this is probably not desirable. It shouldn’t really work through the GUI either but there is no need to fix this.Note on the final point that fixing it for the command interface is likely to fix the problem in the GUI too, as both ways of performing the reduction use a lot of shared code. We should test the GUI as part of making this change to ensure that the fix for the scripted reduction doesn't have any unintended effects on the GUI reduction.
The text was updated successfully, but these errors were encountered: