-
Notifications
You must be signed in to change notification settings - Fork 125
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
38254 Introducing PeakShapeDetectorBin peak shape #38433
Conversation
3454d1c
to
409be08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and the unit tests are comprehensive. The script provided for testing runs without issue.
I have only a few requests and I noticed that the ==
is not quite working?
When I run
from mantid.dataobjects import PeakShapeDetectorBin
from mantid.kernel import SpecialCoordinateSystem
detBinList = [(101, 27.0, 100.0), (202, 3000.0, 5000.0)]
shape1 = PeakShapeDetectorBin(detBinList, SpecialCoordinateSystem.NONE, "ParentAlgoName", 1)
shape2 = PeakShapeDetectorBin(detBinList, SpecialCoordinateSystem.NONE, "ParentAlgoName", 1)
print(shape1==shape2)
It prints False
, but from the code it looks like the intention is to print True
?
Unless I misunderstood in which case you can ignore this.
Framework/DataObjects/inc/MantidDataObjects/PeakShapeDetectorBinFactory.h
Show resolved
Hide resolved
Thanks for the detailed review @GuiMacielPereira ! The same behaviour can be observed in the existing peak shapes such as
However I have fixed this for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your explanation, I think we should keep __eq__
doing the same thing as the other classes. If you change it back and the tests pass, I'll be happy to aprove.
Apologies for my oversight
Framework/PythonInterface/mantid/dataobjects/src/Exports/PeakShapeDetectorBin.cpp
Outdated
Show resolved
Hide resolved
bcd4c8e
to
a13ecbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, thanks for changing the equality back!
Description of work
A new peak shape
PeakShapeDetectorBin
was introduced to save the shape of each peak including the detector IDs and limits of eitherTOF
ordSpacing
. This shape can be used forPartially fixes #38254.
Further detail of work
To test:
PeakShapeDetectorBin
should be visible to python and can be inspected with below code snippetReviewer
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
Functional Tests
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.