-
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 general writer #615
NXmx general writer #615
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
==========================================
- Coverage 39.08% 38.11% -0.98%
==========================================
Files 181 182 +1
Lines 15864 16268 +404
Branches 3066 3160 +94
==========================================
Hits 6201 6201
- Misses 9077 9481 +404
Partials 586 586 |
Ok, this is ready for others to look at. Notes:
I'd like to take a look at 3 and 4 before merging, but they aren't stoppers I think. |
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
- Remove hardcoded SwissFEL terms and add documention - Add and use validation function for required items that can't be found in the dxtbx object model
This way assumes adding them one at a time. For spectra, this usecase assumes only one set of energy channels and no variants.
Supports single and multi-axes goniometers Co-authored-by: Richard Gildea <richard.gildea@diamond.ac.uk>
Combine them using the offset attribute
Add the fast/slow origin offsets for a flat hierarchy detector. Usually zero for Dectris data, but the cbf_writer encodes an offset here for leaf transformations
One reads a JF16M detector and the other 10 cbf files. Currently just checks the detector model
…riting a serial crystallographic dataset to NXmx
Ok the tests should pass now. This ready for re-review! Again, depends on #612. |
@ndevenish looks ready? :) |
Yeah, I think so. The release is currently running through CI, which means the branch-off is chosen, so it'll be "official" next release, barring build failures. |
Yay! |
Writes any data that dxtbx can import, out to NeXus NXmx .
This adds a general NXmx writer to dxtbx
Implemented along the lines of the existing cbf_writer that is used by the image averager, it has these important features:
What is missing:
The plan is to add these in an upcoming DIALS code camp :)
Here's a couple of examples of running it. First, this one eats 10 cbfs files and makes a single NeXus file:
Note that there are some required NeXus keys that can't be read from the dxtbx object models. Those have to be provided somehow so I've made the API require them.
Second example. In this one I am trying to be more careful about the required NeXus metadata. This example is on a SwissFEL master with spectra, so the result combines the master and its subfiles into one file.
I think there's some room for improvement: