Skip to content

Conversation

peterfpeterson
Copy link
Member

@peterfpeterson peterfpeterson commented Aug 16, 2024

Since histogramming is inclusive on the lower bound, there is need to shift the lower boundary to the left. The effect of the current implementation is that when the smallest TOF is <1, the workspace histogram started at negative values which makes a mess for log (re)binning.

There is no associated issue, but this is tracked with EWM6796

To test:

This was originally seen with SNAP_61408, but load any event file where the minimum time-of-flight is between zero and one. After using LoadEventNexus, view the data and see what the minimum x-value is using the "show data" visualization. Also note that the logs will say something like

LoadEventNexus-[Information] Read 1677139 events. Shortest TOF: 0.7 microsec; longest TOF: 16666.6 microsec.

before this change, the minimum bin boundary will be -0.3 micorseconds; after this change it will be 0.7 microseconds.


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.

@peterfpeterson peterfpeterson force-pushed the ewm6796_loadeventnxs_tof_min_bug branch from ea1fac0 to 58d88f4 Compare August 16, 2024 16:26
@peterfpeterson peterfpeterson added this to the Release 6.11 milestone Aug 16, 2024
@peterfpeterson peterfpeterson added the Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) label Aug 16, 2024
@peterfpeterson peterfpeterson force-pushed the ewm6796_loadeventnxs_tof_min_bug branch from 58d88f4 to 822f328 Compare August 16, 2024 18:41
@sf1919
Copy link
Contributor

sf1919 commented Aug 21, 2024

It looks like the failing tests for linux might be genuine now so I will not re-run the tests on this one.

@peterfpeterson
Copy link
Member Author

Thanks for looking into this. There are indeed 4 failing system tests and it is just taking me time to get back to this and fix them.

Since histogramming is inclusive on the lower bound, there is need
to shift the lower boundary to the left. The effect of the current
implementation is that when the smallest TOF is <1, the workspace
histogram started at negative values which makes a mess for log
(re)binning.
@peterfpeterson peterfpeterson force-pushed the ewm6796_loadeventnxs_tof_min_bug branch 2 times, most recently from b51100d to 4059351 Compare August 23, 2024 17:37
@peterfpeterson peterfpeterson force-pushed the ewm6796_loadeventnxs_tof_min_bug branch from 4059351 to 1af3dc5 Compare August 23, 2024 18:53
@peterfpeterson peterfpeterson marked this pull request as ready for review August 23, 2024 20:06
@dlcaballero16 dlcaballero16 self-requested a review August 27, 2024 19:54
Copy link
Contributor

@dlcaballero16 dlcaballero16 left a comment

Choose a reason for hiding this comment

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

Tested LoadEventNexus with SNAP 61408 and was able to confirm X values were no longer starting with negative numbers.

@AndreiSavici AndreiSavici merged commit 442688a into mantidproject:main Aug 28, 2024
10 checks passed
@peterfpeterson peterfpeterson deleted the ewm6796_loadeventnxs_tof_min_bug branch August 29, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants