Skip to content

Conversation

RichardWaiteSTFC
Copy link
Contributor

Description of work

Fix error on create_vanadium if no sample details in ISIS powder reduction - was checking if the sample details had been set on the class, but the sample details for vanadium are set in the advanced config automatically.

Purpose of work

Bug report from Helen Playford (POLARIS, ISIS) - was getting ValueError when calling create_vanadium and no sample details set.

It seems to have been introduced in this PR #36809 in v6.11

There is no associated issue.

Report to: Helen Playford (POLARIS, ISIS)

To test:

(1) Ask me for the config files

(2) Run this script with updated paths

from isis_powder import polaris, SampleDetails

config_file_path = r"C:\Users\xhg73778\Downloads\POLARISPowderDiffractionFolderSmall\polaris_config_example.yaml"
polaris = polaris.Polaris(config_file=config_file_path, user_name="test", mode="PDF")

polaris.create_vanadium(first_cycle_run_no="98533", multiple_scattering=True, 
                         do_absorb_corrections=True, mayers_mult_scat_events=1)   

Should execute without error.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@RichardWaiteSTFC RichardWaiteSTFC added Diffraction Issues and pull requests related to diffraction Powder Issues and pull requests related to powder diffraction ISIS: Diffraction Issue and pull requests relating to Diffraction at ISIS labels Nov 15, 2024
@sf1919 sf1919 added this to the Release 6.12 milestone Nov 15, 2024
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

Ran the script without problems. Unit tests added check for both vanadium present and not present.

@robertapplin robertapplin self-assigned this Nov 15, 2024
@robertapplin robertapplin merged commit 537864e into main Nov 15, 2024
10 checks passed
@robertapplin robertapplin deleted the fix_polaris_error_on_create_van_if_no_sample_detials branch November 15, 2024 11:16
peterfpeterson pushed a commit to peterfpeterson/mantid that referenced this pull request Dec 5, 2024
…ction (mantidproject#38399)

* Check if not vanadium before throw error for no sample details

* Add unit test for check sample details

* Add release note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Diffraction Issues and pull requests related to diffraction ISIS: Diffraction Issue and pull requests relating to Diffraction at ISIS Powder Issues and pull requests related to powder diffraction
Projects
Status: Merged
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants