-
Notifications
You must be signed in to change notification settings - Fork 18
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
NXmx: handle multidimensional arrays #612
Conversation
Data in NeXus can be 3 or 4 dimensional. 3D: Nimages by slow by fast 4D: Nimages by Nmodules by slow fast Slice image_size and reshape the raw_data in these cases
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #612 +/- ##
==========================================
+ Coverage 39.11% 39.13% +0.01%
==========================================
Files 179 179
Lines 15823 15828 +5
Branches 3057 3057
==========================================
+ Hits 6189 6194 +5
Misses 9052 9052
Partials 582 582 |
I think this line needs to be worked on as well, but I don't have a use case for it right now: |
Fixed! I have a usecase for a 3D mask now |
Do you have any test files/files we can make in the right shape, to add to the testing? |
Co-authored-by: Nicholas Devenish <[email protected]>
@phyy-nx I've attempted to add a basic test for what I understand of this use case. Could you take a look and verify that it makes sense from your perspective? |
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.
This adds support for a use case that wasn't previously handled, LGTM 👍
Hi @ndevenish I reviewed @rjgildea's test and it looks perfect. I think this is ok to merge as is. |
Data in NeXus can be 3 or 4 dimensional. 3D: Nimages by slow by fast 4D: Nimages by Nmodules by slow fast Slice image_size and reshape the raw_data in these cases. Co-authored-by: Richard Gildea <[email protected]>
Data in NeXus can be 3 or 4 dimensional:
3D: Nimages by slow by fast
4D: Nimages by Nmodules by slow fast
Slice image_size and reshape the raw_data in these cases
Adapted from FormatNexus.py:
https://github.com/cctbx/dxtbx/blob/main/src/dxtbx/format/nexus.py#L852-L857
https://github.com/cctbx/dxtbx/blob/main/src/dxtbx/format/nexus.py#L1329-L1331