diff --git a/sandbox/bad_flush.py b/sandbox/bad_flush.py new file mode 100644 index 00000000..4a238047 --- /dev/null +++ b/sandbox/bad_flush.py @@ -0,0 +1,18 @@ +#!/usr/bin/python3 +import logging +logger = logging.basicConfig(level=logging.INFO) +import numpy, pyFAI, pyFAI.azimuthalIntegrator +method = ("no", "csr", "cython") +detector = pyFAI.detector_factory("Pilatus_100k") +ai = pyFAI.azimuthalIntegrator.AzimuthalIntegrator(detector=detector) +rm = max(detector.shape) * detector.pixel1 +img = numpy.random.random(detector.shape) +print(ai.integrate1d(img, 5, unit="r_m", radial_range=[0, rm], method=method)) +# print(ai.integrate1d(img, 5, unit="r_m", method=method)) +for k, v in ai.engines.items(): + print(k, v, id(v.engine)) + +print(ai.integrate1d(img, 5, unit="r_m", radial_range=[0, rm], method=method)) +# print(ai.integrate1d(img, 5, unit="r_m", method=method)) +for k, v in ai.engines.items(): + print(k, v, id(v.engine))