diff --git a/newsfragments/759.bugfix b/newsfragments/759.bugfix new file mode 100644 index 000000000..9dc343a64 --- /dev/null +++ b/newsfragments/759.bugfix @@ -0,0 +1 @@ +``dxtbx.dlsnxs2cbf``: add bit_depth_image explicitly to work around issues with data recorded at 32 bit diff --git a/src/dxtbx/util/dlsnxs2cbf.py b/src/dxtbx/util/dlsnxs2cbf.py index 2d45fcf85..cdb6df8cb 100644 --- a/src/dxtbx/util/dlsnxs2cbf.py +++ b/src/dxtbx/util/dlsnxs2cbf.py @@ -185,7 +185,7 @@ def make_cbf( print(f"Writing images to {template}{'#' * num_digits}.cbf:") for j in tqdm(range(num_images), unit=" images"): header = compute_cbf_header(nxmx_obj, j) - (data,) = dxtbx.nexus.get_raw_data(nxdata, nxdetector, j) + (data,) = dxtbx.nexus.get_raw_data(nxdata, nxdetector, j, bit_depth_readout) if bit_depth_readout: # if 32 bit then it is a signed int, I think if 8, 16 then it is # unsigned with the highest two values assigned as masking values