DiamondLightSource / mx-bluesky

Bluesky plans, plan stubs, and utilities for MX beamlines
https://diamondlightsource.github.io/mx-bluesky/
Apache License 2.0
0 stars 2 forks source link

Bit depth being written wrong due to dectris firmware changes #374

Open dperl-dls opened 1 year ago

dperl-dls commented 1 year ago

Data files are being written with 32 bit depth even when data collected at 16 bit depth, this is causing zocalo issues with wrong max pixel values. The "correct" bit depth is now included in the meta file in _dectris/bit_depth_image

currently patched live on beamline in write_nexus.py line 176 where we do

    "bit_depth_readout": "_dectris/bit_depth_image",

instead of previously

    "bit_depth_readout": "_dectris/bit_depth_readout",

but this is confusing, and we should fix it properly (so that fields have the same name...), also see https://github.com/cctbx/dxtbx/pull/632

DominicOram commented 1 year ago

Ultimately good solution is blocked by https://github.com/nexusformat/definitions/issues/1258. Associated PR will be merged though as a best effort solution to get things working

DominicOram commented 1 year ago

This is now internal in nexgen, we still need a nicer longterm fix