spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

imexam fails with astropy 5.2 #255

Open olebole opened 1 year ago

olebole commented 1 year ago

After uploading astropy 5.2, I found that the CI tests of imexam no longer pass. Specifically, the following test fails:

______________________________ test_gauss_center _______________________________

    def test_gauss_center():
        """Check the gaussian center fitting."""

        from astropy.convolution import Gaussian2DKernel

        # This creates a 2D normalized gaussian kernal with
        # a set amplitude. Guess off-center
        amp = 0.0015915494309189533
        size = 81.0
        sigma = 10.0

        gaussian_2D_kernel = Gaussian2DKernel(sigma, x_size=size, y_size=size)
        plots = Imexamine()
        plots.set_data(gaussian_2D_kernel.array)
        a, xx, yy, xs, ys = plots.gauss_center(37, 37)

>       assert_allclose(amp, a, 1e-6)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-06, atol=0
E       
E       Mismatched elements: 1 / 1 (100%)
E       Max absolute difference: 1.61872075e-07
E       Max relative difference: 0.0001017
E        x: array(0.001592)
E        y: array(0.001592)

/usr/lib/python3/dist-packages/imexam/tests/test_imexamine.py:128: AssertionError
----------------------------- Captured stdout call -----------------------------
xc=40.0000  yc=40.0000
------------------------------ Captured log call -------------------------------
INFO     imexam.util:imexamine.py:1015 xc=40.0000   yc=40.0000

Shall one just increase the rtol or is this a real problem?