Skip to content

Conversation

@dlcaballero16
Copy link
Contributor

@dlcaballero16 dlcaballero16 commented Jan 7, 2026

Description of work

This work modifies HFIRPowderReduction so that when a user updates a field, other fields will automatically get updated based on what the user input. This will also attempt to read the experiment run files to grab data to set the fields. For example, when the user fills out the SampleFileName field with a valid file, the algorithm will attempt to read the sample file and set the Instrument field. All cases will be described in the testing section.

EWM 13209

To test:

Open the HFIRPowderReduction algorithm in Mantid and set the SampleFileName to the file that gets generated with the attached script. You must generate the file with the attached script as github won't let me attach a .h5 file.
generate_test_h5.py
Make sure the following fields get set:

Instrument
Wavelength
Vanadium diameter
Vanadium IPTS and run numbers
Vanadium bg. IPTS and run numbers

Toggle the instrument and notice that the NormalizeBy field gets updated. Make sure that it matches like so:

Wand^2 <-> Monitor
MIDAS <-> Time

Also make sure that you can overwrite any value that got prepopulated.

The user should also be able to set the Sample Run and IPTS numbers to prepopulate the same fields, but this requires run files to exist in a specific location. Since there are no real sample run files yet, just check the unit tests and make sure they test for this and that they pass.


Reviewer

Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.

As per the review guidelines:

  • Is the code of an acceptable quality? (Code standards/GUI standards)
  • Has a thorough functional test been performed? Do the changes handle unexpected input/situations?
  • Are appropriately scoped unit and/or system tests provided?
  • Do the release notes conform to the guidelines and describe the changes appropriately?
  • Has the relevant (user and developer) documentation been added/updated?
  • If the PR author isn’t in the mantid-developers or mantid-contributors teams, add a review comment rerun ci to authorize/rerun the CI

Gatekeeper

As per the gatekeeping guidelines:

  • Has a thorough first line review been conducted, including functional testing?
  • At a high-level, is the code quality sufficient?
  • Are the base, milestone and labels correct?

@dlcaballero16 dlcaballero16 added this to the Release 6.15 milestone Jan 7, 2026
@dlcaballero16 dlcaballero16 added Diffraction Issues and pull requests related to diffraction ORNL Team Issues and pull requests managed by the ORNL development team labels Jan 7, 2026
@dlcaballero16 dlcaballero16 marked this pull request as ready for review January 7, 2026 18:22
return False
else:
if instrument == "WAND^2":
runs = ["/HFIR/HB2C/IPTS-{}/nexus/HB2C_{}.nxs.h5".format(sampleIPTS, run) for run in sampleRunNumbers]
Copy link
Member

Choose a reason for hiding this comment

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

Why would you not use FileFinder for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot about FileFinder, I'll update it to use FileFinder

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 ORNL Team Issues and pull requests managed by the ORNL development team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants