diff --git a/newsfragments/866.bugfix b/newsfragments/866.bugfix new file mode 100644 index 000000000..f676107ab --- /dev/null +++ b/newsfragments/866.bugfix @@ -0,0 +1 @@ +``FormatNXmxEigerFilewriter``: if dependencies missing, make some (prpbably valid) assumptions about dependencies between fast, slow pixel directions and module offset diff --git a/src/dxtbx/nexus/__init__.py b/src/dxtbx/nexus/__init__.py index 8dc71d88c..b760ef421 100644 --- a/src/dxtbx/nexus/__init__.py +++ b/src/dxtbx/nexus/__init__.py @@ -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( @@ -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( @@ -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 @ (