Source code for blissoda.demo.processors.utils.xrpd
from ....bliss_globals import setup_globals
from .pyfai_calib import DEFAULT_CALIB
[docs]
def lima_image_is_padded(lima_name: str) -> bool:
calib = DEFAULT_CALIB.get(lima_name, None)
if calib is None:
return False
detector = calib.get("detector", None) or calib.get("poni", {}).get(
"detector", None
)
if detector == "Pilatus1M":
# lima-camera-simulator<1.9.10 does not support odd image widths
# so Pilatus1M data is padded with one pixel to make it even.
lima = getattr(setup_globals, lima_name)
return not bool(lima.image.width % 2)
return False