From 6c2bd99d169024030dc7a3c03cdf2334c46245c3 Mon Sep 17 00:00:00 2001 From: Graeme Winter Date: Wed, 18 Oct 2023 14:02:23 +0100 Subject: [PATCH] Do not invert for Pilatus 4 --- newsfragments/XXX.bugfix | 2 ++ src/dxtbx/format/FormatNXmxEigerFilewriter.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 newsfragments/XXX.bugfix diff --git a/newsfragments/XXX.bugfix b/newsfragments/XXX.bugfix new file mode 100644 index 000000000..c632cc50a --- /dev/null +++ b/newsfragments/XXX.bugfix @@ -0,0 +1,2 @@ +Pilatus 4: do not invert module size (is written correctly in master file) + diff --git a/src/dxtbx/format/FormatNXmxEigerFilewriter.py b/src/dxtbx/format/FormatNXmxEigerFilewriter.py index 7e8eb2924..a3e73c145 100644 --- a/src/dxtbx/format/FormatNXmxEigerFilewriter.py +++ b/src/dxtbx/format/FormatNXmxEigerFilewriter.py @@ -52,8 +52,10 @@ def _get_nxmx(self, fh: h5py.File): # data_size is reversed - we should probably be more specific in when # we do this, i.e. check data_size is in a list of known reversed # values + known_safe = [(1082,1035),] for module in nxdetector.modules: - module.data_size = module.data_size[::-1] + if not tuple(module.data_size) in known_safe: + module.data_size = module.data_size[::-1] return nxmx_obj def get_raw_data(self, index):