Skip to content

Commit

Permalink
Fix bit depth for Eiger . NXmx for i19-2
Browse files Browse the repository at this point in the history
Add bit depth check from image metadata as implemented on other Diamond NXmx
installations. Fixes dials/dials#2473
  • Loading branch information
graeme-winter committed Jul 28, 2023
1 parent 436a1b6 commit 06a89e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/XXX.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``dxtbx``: add fix for Eiger / NXmx data from i19-2 to correctly assign the image bit depth
7 changes: 6 additions & 1 deletion src/dxtbx/format/FormatNXmxDLSI19_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from libtbx import Auto

from dxtbx.format.FormatNXmx import FormatNXmx
from dxtbx.format.FormatNXmxDLS import FormatNXmxDLS
from dxtbx.format.FormatNXmxDLS import FormatNXmxDLS, get_bit_depth_from_meta
from dxtbx.masking import GoniometerMaskerFactory


Expand Down Expand Up @@ -41,6 +41,11 @@ def __init__(self, image_file, **kwargs):
"""Initialise the image structure from the given file."""
self._dynamic_shadowing = self.has_dynamic_shadowing(**kwargs)
super().__init__(image_file, **kwargs)
try:
self._bit_depth_readout = get_bit_depth_from_meta(self._meta)
except Exception:
self._bit_depth_readout = 16


def get_goniometer_shadow_masker(self, goniometer=None):
"""Apply the dynamic mask for a diamond anvil cell with a 76° aperture."""
Expand Down

0 comments on commit 06a89e8

Please sign in to comment.