Skip to content

Conversation

GuiMacielPereira
Copy link
Collaborator

@GuiMacielPereira GuiMacielPereira commented Aug 7, 2025

Description of work:
Following the feedback from Damien, I updated the inputs script to make it clearer to the users.

  • Hide VesuvioThickness option
  • Allow user to fix H ratio to a mass index of their choice
  • When workspace for y-sapce fit is not found, catch the error and continue procedure
  • Add system test for estimating H ratio
  • Change name of fitting function ansiogauss -> gauss2d
  • Add useful comments

To test:

  • In a conda environment with mantid workbench installed, checkout this branch and do pip install -e . to install this version of the package

  • Open workbench

  • Open the following script from inside workbench:
    analysis_inputs_mod.zip

  • Click Run

  • A window will appear, click OK or press Enter

  • Wait a few minutes until the procedure is complete, at the very end you should see that a table called hydrogen_intensity_ratios_estimates is printed to the console

  • Now edit the script in the backward class, change intensity_ratio_of_hydrogen_to_lowest_mass to the number that is commented out

  • In the same backward class, change number_of_iterations_for_corrections to 1

  • Clear all workspaces

  • Click Run and wait until its finished

  • Script should run without errors

  • Check that fitted curves look okay

  • Check that CI ran 5 system tests

Fixes #xxxx.

- This value used to be hidden and hardcoded into the routine
- Following feedback from scientists, this change should be reverted to
how it was before
- Allow users to select mass to base hydrogen ratio from
- This change comes directly out of scientist's feedback since more
often than not they can estimate the ratio to one of the masses based
from stochiometry
- Avoids having to run the preliminary procedure so often
Previously the error looked very intimidating and was not very
informative. Catching the error also allows the routine to continue
normally.
Due to change in numpy API
- Renamed `ansiogauss` (which should have been `anisogauss` anyway) to
`gauss2d`
- Added useful comments explaining several parameters to the user
@SilkeSchomann
Copy link
Collaborator

In the second part of the test I see this warning twice: invalid value encountered in divide. The script still runs successfully, though.

Copy link
Collaborator

@SilkeSchomann SilkeSchomann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new code works as expected and both renaming and new comments increase readability. Also, it is good to have more system tests.

@GuiMacielPereira GuiMacielPereira merged commit 041adb1 into main Aug 14, 2025
1 check passed
@github-project-automation github-project-automation bot moved this to Done v6.12 in ISIS mvesuvio Aug 14, 2025
@GuiMacielPereira GuiMacielPereira deleted the inputs-script-improvements branch September 8, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done v6.12
Development

Successfully merging this pull request may close these issues.

2 participants