Skip to content

Commit

Permalink
Non regression test for #1825
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Feb 22, 2023
1 parent d655283 commit f9a3b8a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pyFAI/test/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "26/11/2022"
__date__ = "22/02/2023"

import unittest
import logging
Expand Down Expand Up @@ -307,8 +307,20 @@ def test_sigma_clip(self):
extra_options={"thres":2, "error_model":"azimuthal"},
integrator_name="sigma_clip_ng",
shapeOut=(1, 100))

self.assertEqual(worker.error_model, "azimuthal", "error model is OK")
img = numpy.random.random(ai.detector.shape)
worker(img)

def test_sigma_clip_legacy(self):
"Non regression test for #1825"
ai = AzimuthalIntegrator.sload({"detector": "Pilatus100k", "wavelength":1e-10})
worker = Worker(azimuthalIntegrator=ai,
extra_options={"thres":2},
integrator_name="sigma_clip_legacy",
shapeOut=(1, 100))
img = numpy.random.random(ai.detector.shape)
worker(img)

class TestWorkerConfig(unittest.TestCase):

Expand Down

0 comments on commit f9a3b8a

Please sign in to comment.