Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imexam fails with astropy 5.2 #255

Open
olebole opened this issue Dec 17, 2022 · 0 comments
Open

imexam fails with astropy 5.2 #255

olebole opened this issue Dec 17, 2022 · 0 comments

Comments

@olebole
Copy link

olebole commented Dec 17, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant