Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve user experience #151

Merged
merged 7 commits into from
Jan 7, 2025
Merged

Improve user experience #151

merged 7 commits into from
Jan 7, 2025

Conversation

GuiMacielPereira
Copy link
Collaborator

@GuiMacielPereira GuiMacielPereira commented Dec 10, 2024

Description of work:

  • Changed names of variables in input script
  • Changed names of workspaces produced by y-fit so that re-runs do not override workspaces
  • Saved some useful files automatically

To test:

Code review
+
Manual testing:
Activate an environment with mantidworkbench installed:

  • Checkout this branch and install with pip install -e .
  • Delete directory ~/.mvesuvio
  • Run mvesuvio config, this should create a new ~/.mvesuvio
  • Open Mantid workbench and open file ~/.mvesuvio/analysis_inputs.py
  • In the class ForwardAnalysisInputs change the field mask_time_of_flight_range = '112-120'
  • Open data for workspace analysis_inputs_fwd_0 and check that dataY has zeros in columns between 112 and 120
  • Click Run
  • In the class YSpaceFitInputs change fitting_model = "gcc4c6"
  • Click Run (without clearing the previous workspaces)
  • You should see workspace for both the gauss and gcc4c6 fits and the data and the fits should look sensible.
  • Go to directory ~/.mvesuvio/analysis_inputs/figures/ and check that figures ending in _fitglobal.png and _gauss_autominos.png were saved.
  • Open figure ending in _gauss_Workspace.pdf and check that residuals (blue dots) appear in the figure
  • Go to ~/.mvesuvio/analysis_inputs/output_files/ and check that several ASCII files ending in _Workspace and _Parameters were saved.

Fixes #145 .

Previously the range in tof to be masked was being specified by ','.
It makes more sense to use '-' to describe the range.
Previously the workspaces for the y-space fit were being overwritten
when the fitting model changed. This change changes the name of the workspace
which makes sure the workspaces do not get overwritten.
Save some plots by default that were not being saved
Added function to save workspaces containing the result in y space fit
in Ascii format, and made minor esthetic improvements to plots that are
also saved.
Re-running y-space fit with subtraction of fse turned on
was picking up the wrong workspace that also ended in 'fse'.
This correction guarantees the right workspace is chosen.
@GuiMacielPereira GuiMacielPereira marked this pull request as ready for review December 13, 2024 17:50
@GuiMacielPereira GuiMacielPereira linked an issue Dec 13, 2024 that may be closed by this pull request
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.

When running the analysis script with different fitting models, previous workspaces are not overwritten anymore. Also, the naming makes it easy to match output files to the corresponding fitting model. The variable names are now easier to understand and there are some new useful comments, especially in the input sections of the different analysis algorithms.

@GuiMacielPereira GuiMacielPereira merged commit ade7d8f into main Jan 7, 2025
1 check passed
@GuiMacielPereira GuiMacielPereira deleted the better-user-experience branch January 7, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve user experience Update names of inputs on analysis inputs script
2 participants