Repository navigation
Write the DIALS file format attributes on reflection tables - #67
Merged
Merged
Conversation
DIALS 3.31 refuses to read a reflection file whose root lacks them. Also warn when the target group falls outside the layout the attributes claim, since DIALS would reject that file further in.
dimitrivlachos
enabled auto-merge (squash)
November 16, 2026 15:59
jbeilstenedmands
approved these changes
Nov 16, 2026
jbeilstenedmands
left a comment
Contributor
There was a problem hiding this comment.
Thanks, tested and confirmed this works 👍
dimitrivlachos
disabled auto-merge
November 16, 2026 16:06
dimitrivlachos
added a commit
to DiamondLightSource/fast-feedback-service
that referenced
this pull request
Nov 16, 2026
Thismakes the reflection files fast-feedback-service writes readable by DIALS 3.31. Since dials/dials#3255 02bb48d, the DIALS reflection table reader refuses any HDF5 file whose root lacks a `file_type` attribute equal to `"dials_processed_data"` and a `file_version` of 1. Nothing we write carries either attribute, so the downstream pipeline on the cluster has been held at an older DIALS to read our `integrated.refl`; this lets it move back to the latest release. Every C++ writer goes through dx2's `ReflectionTable::write`, which now writes both attributes (dials/dx2#67), so that half of the fix is a submodule bump. The stills indexer writes its own file with h5py and gets the same two attributes by hand. ### Changes - Bumped dx2 to 9f4e599, which brings in dials/dx2#67 for the file format attributes. - `ssx_index.py` writes `file_type` and `file_version` on the file root. h5py stores a Python `str` and `int` as a scalar variable-length string and a scalar int64, the types the DIALS check compares against and the same ones dx2 writes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR marks the reflection files
ReflectionTable::writeproduces asDIALS processed data. Since dials/dials#3255 (DIALS 3.31) the reflection
table reader refuses any
.reflfile whose root lacks afile_typeattribute equal to
"dials_processed_data"and afile_versionof 1(check), so DIALS 3.31 could not read anything dx2 wrote, which includes
the fast-feedback-service output in the downstream pipeline. Now both
attributes are written with the types h5py gives a Python
strandint, which is what the DIALS check compares against.Changes
write_file_format_attributes, called fromReflectionTable::writestraight after the file is created.write()warns when the target group is not of the form/dials/<process>/<group>, since DIALS rejects a file laid out anyother way regardless of the attributes.
dataspace, type and value, and that the layout warning fires only
when it should.