-
Notifications
You must be signed in to change notification settings - Fork 128
LoadNexusProcessed: root-level NXentry groups #38324
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
LoadNexusProcessed: root-level NXentry groups #38324
Conversation
Please can you add a milestone to this PR? If you can add labels too that would be good. |
Building too much longer than verifying 😅 Code Review
Functional
Grep of the test file listing the 12 expected workspaces And a sample of the newly added metadata: all Root level groups can be see here:
|
The test written does confirm that in the presence of these other groups it will function and load the file. |
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.
Approved, please find a gatekeeper!
Mantid's interpretation of the NeXus format uses multiple root-level "NX_class: NXentry" groups to store multiple workspaces in a single NeXus HDF5 file. By using additional root-level groups, such as "NX_class: NXcollection", metadata about a group of workspaces may be stored. In addition, the NeXus format itself allows other, non-NeXus information to be stored in an HDF5 file, provided it avoids collisions with the NeXus naming system. In combination, all of this led to the requirement solved by the current PR, which allows `LoadNexusProcessed` to function correctly in the presence of other root-level non-NXentry and non-NeXus groups. This commit includes the following changes: * When `LoadNexusProcessed` is determining the number of workspaces in a NeXus HDF5 file, it now counts the number of root-level "NX_class: NXentry" groups. Previously, it counted the number of root-level groups, assuming all were of "NX_class: NXentry".
2eb2588
to
0c2cfdf
Compare
Description of work
Mantid's interpretation of the NeXus format uses multiple root-level "NX_class: NXentry" groups to store multiple workspaces in a single NeXus HDF5 file. By using additional root-level groups, such as "NX_class: NXcollection", metadata about a group of workspaces may be stored. In addition, the NeXus format itself allows other, non-NeXus information to be stored in an HDF5 file, provided it avoids collisions with the NeXus naming system. In combination, all of this led to the requirement solved by the current PR, which allows
LoadNexusProcessed
to function correctly in the presence of other root-level non-NXentry and non-NeXus groups.Summary of work
This commit includes the following changes:
LoadNexusProcessed
is determining the number of workspaces in a NeXus HDF5 file, it now counts the number of root-level "NX_class: NXentry" groups. Previously, it counted the number of root-level groups, assuming all were of "NX_class: NXentry".EWM ref:
EWM#7148
To test:
A new unit test has been added to test these changes:
LoadNexusProcessedTest::test_load_workspace_group_other_root_groups
.In order to verify these changes "by hand" it's recommended to take a look at the contents of the test-input file:
build/ExternalData/Testing/Data/UnitTest/WorkspaceGroup_other_groups.nxs
using theh5dump
tool. In addition to including twelve workspaces (, asNX_class: NXentry
"mantid_workspace_nn" groups), this file adds a root-levelNX_class: NXcollection
"metadata" group, and another root-level non-NeXus group. Following the form of the new unit test, verify thatLoadNexusProcessed
loads this file as a group workspace, and successfully ignores the other root-level groups in the file.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
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.