Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 16f9791

Browse files
committed
Lack of dx, dy maps affects processing, so be strict about loading
them. If they are expected but not loaded, then fail. Thanks to @ndevenish for the suggestion.
1 parent 2b5c90b commit 16f9791

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/dxtbx/model/experiment_list.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ def _imageset_from_imageset_data(self, imageset_data, models):
334334
dx_filename, dx = self._load_pickle_path(imageset_data, "dx")
335335
dy_filename, dy = self._load_pickle_path(imageset_data, "dy")
336336

337+
# If dx, dy maps are expected then they must be loaded even when
338+
# self._check_format == False, because they affect the operation of
339+
# programs (dials.index, dials.refine) that do not need the image data.
340+
if (dx_filename or dy_filename) and not all((dx, dx)):
341+
raise RuntimeError(
342+
f"dx ({dx_filename}) and dy ({dy_filename}) maps are expected"
343+
)
344+
337345
if imageset_data["__id__"] == "ImageSet":
338346
imageset = self._make_stills(imageset_data, format_kwargs=format_kwargs)
339347
elif imageset_data["__id__"] == "ImageGrid":

0 commit comments

Comments
 (0)