Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix calculation of simple statistics of filtered logs #35499

Merged
merged 11 commits into from
May 3, 2023

Conversation

peterfpeterson
Copy link
Member

@peterfpeterson peterfpeterson commented May 2, 2023

Change back the old behavior that the simple statistical measures were calculated from faked values and times. These are only temporary. This also fixes a bug where filteredValuesAsVector() and filteredTimesAsVector() weren't always returning the same length.

Further detail of work

You will see that there is two tests that were commented out that are now back.

To test:

# import mantid algorithms
from mantid.simpleapi import *

Load(Filename="HYS_13656-13658", OutputWorkspace="sum")  # in system test data
FilterByLogValue(InputWorkspace="sum", OutputWorkspace="sum", LogName="s1", MinimumValue=0, MaximumValue=24.5, LogBoundary="Left")
runObj = mtd['sum'].run()
print(f"min={runObj.getStatistics('s1').minimum} max={runObj.getStatistics('s1').maximum}")

Where the minimum value is no longer negative even though FilterByLogValue was configure to remove negative values.

Refs #34794

This does not require release notes because it is already covered in a previous set of release notes.


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?
  • Are the release notes saved in a separate file, using Issue or PR number for file name and in the correct location?
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.

@peterfpeterson peterfpeterson added this to the Release 6.7 milestone May 2, 2023
@peterfpeterson peterfpeterson marked this pull request as ready for review May 2, 2023 18:52
@AndreiSavici AndreiSavici merged commit eb41d02 into main May 3, 2023
@AndreiSavici AndreiSavici deleted the ewm1355_mean_math branch May 3, 2023 20:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants