Skip to content

imexam fails with astropy 5.2 #255

@olebole

Description

@olebole

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions