mirror of https://github.com/silx-kit/pyFAI.git
parent
7897e5a7aa
commit
44174097f5
|
@ -40,7 +40,7 @@ __author__ = "Jerome Kieffer"
|
||||||
__contact__ = "Jerome.Kieffer@ESRF.eu"
|
__contact__ = "Jerome.Kieffer@ESRF.eu"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
|
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
|
||||||
__date__ = "03/05/2023"
|
__date__ = "31/05/2023"
|
||||||
__status__ = "production"
|
__status__ = "production"
|
||||||
__docformat__ = 'restructuredtext'
|
__docformat__ = 'restructuredtext'
|
||||||
|
|
||||||
|
@ -1800,7 +1800,7 @@ class Geometry(object):
|
||||||
self.chiDiscAtPi = False
|
self.chiDiscAtPi = False
|
||||||
self._cached_array["chi_center"] = None
|
self._cached_array["chi_center"] = None
|
||||||
for key in list(self._cached_array.keys()):
|
for key in list(self._cached_array.keys()):
|
||||||
if key.startswith("corner"):
|
if isinstance(key, str) and "corner" in key:
|
||||||
self._cached_array[key] = None
|
self._cached_array[key] = None
|
||||||
|
|
||||||
def setChiDiscAtPi(self):
|
def setChiDiscAtPi(self):
|
||||||
|
@ -1814,7 +1814,7 @@ class Geometry(object):
|
||||||
self.chiDiscAtPi = True
|
self.chiDiscAtPi = True
|
||||||
self._cached_array["chi_center"] = None
|
self._cached_array["chi_center"] = None
|
||||||
for key in list(self._cached_array.keys()):
|
for key in list(self._cached_array.keys()):
|
||||||
if key.startswith("corner"):
|
if isinstance(key, str) and "corner" in key:
|
||||||
self._cached_array[key] = None
|
self._cached_array[key] = None
|
||||||
|
|
||||||
@deprecated
|
@deprecated
|
||||||
|
|
|
@ -36,7 +36,7 @@ __author__ = "Jérôme Kieffer"
|
||||||
__contact__ = "Jerome.Kieffer@esrf.fr"
|
__contact__ = "Jerome.Kieffer@esrf.fr"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "2015-2022 European Synchrotron Radiation Facility, Grenoble, France"
|
__copyright__ = "2015-2022 European Synchrotron Radiation Facility, Grenoble, France"
|
||||||
__date__ = "26/01/2023"
|
__date__ = "31/05/2023"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -559,6 +559,19 @@ class TestBugRegression(unittest.TestCase):
|
||||||
sg = SingleGeometry("frame", ary, "frame", lambda x:x, cp, lab6, "pilatus100k")
|
sg = SingleGeometry("frame", ary, "frame", lambda x:x, cp, lab6, "pilatus100k")
|
||||||
self.assertNotEqual(id(sg), id(copy.deepcopy(sg)), "SingleGeometry copy works and id differs")
|
self.assertNotEqual(id(sg), id(copy.deepcopy(sg)), "SingleGeometry copy works and id differs")
|
||||||
|
|
||||||
|
def test_bug_1889(self):
|
||||||
|
"reset cached arrays"
|
||||||
|
ai = load({"detector": "Pilatus100k", "wavelength": 1.54e-10})
|
||||||
|
ai.polarization(factor=0.9)
|
||||||
|
img = numpy.empty(ai.detector.shape, "float32")
|
||||||
|
ai.integrate2d(img, 10,9, method=("no", "histogram", "cython"))
|
||||||
|
ai.integrate2d(img, 10,9, method=("bbox", "histogram", "cython"))
|
||||||
|
ai.setChiDiscAtZero()
|
||||||
|
ai.integrate2d(img, 10,9, method=("no", "histogram", "cython"))
|
||||||
|
ai.integrate2d(img, 10,9, method=("bbox", "histogram", "cython"))
|
||||||
|
ai.setChiDiscAtPi()
|
||||||
|
|
||||||
|
|
||||||
class TestBug1703(unittest.TestCase):
|
class TestBug1703(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
Check the normalization affect propely the propagated errors/intensity
|
Check the normalization affect propely the propagated errors/intensity
|
||||||
|
|
Loading…
Reference in New Issue