Proof of bug...

This commit is contained in:
Jérôme Kieffer 2021-05-12 08:23:40 +02:00
parent 277b803680
commit 66c99effb7
1 changed files with 18 additions and 0 deletions

18
sandbox/bad_flush.py Normal file
View File

@ -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))