Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/866.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``FormatNXmxEigerFilewriter``: if dependencies missing, make some (prpbably valid) assumptions about dependencies between fast, slow pixel directions and module offset
12 changes: 7 additions & 5 deletions src/dxtbx/nexus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def equipment_component_key(dependency):
# Flat detector model

# Apply any rotation components of the dependency chain to the fast axis
assert module.fast_pixel_direction.depends_on is not None
# assert module.fast_pixel_direction.depends_on is not None
fast_axis_depends_on = [
t
for t in nxmx.get_dependency_chain(
Expand All @@ -372,7 +372,7 @@ def equipment_component_key(dependency):
fast_axis = MCSTAS_TO_IMGCIF @ R @ module.fast_pixel_direction.vector

# Apply any rotation components of the dependency chain to the slow axis
assert module.slow_pixel_direction.depends_on is not None
# assert module.slow_pixel_direction.depends_on is not None
slow_axis_depends_on = [
t
for t in nxmx.get_dependency_chain(
Expand All @@ -388,9 +388,11 @@ def equipment_component_key(dependency):

# Apply all components of the dependency chain to the module offset to get the
# dxtbx panel origin
dependency_chain = nxmx.get_dependency_chain(
module.fast_pixel_direction.depends_on
)
if module.fast_pixel_direction.depends_on is not None:
top = module.fast_pixel_direction.depends_on
else:
top = module.module_offset.depends_on
dependency_chain = nxmx.get_dependency_chain(top)
A = nxmx.get_cumulative_transformation(dependency_chain)

origin = MCSTAS_TO_IMGCIF @ (
Expand Down