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
75 stars 45 forks source link

0.8.0 fails test suite on s390x #148

Open xnox opened 6 years ago

xnox commented 6 years ago

In Ubuntu and Debian imexam fails test suite:

Ubuntu:

============================= test session starts ==============================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.6.0, pluggy-0.6.0 -- /usr/bin/python2.7
cachedir: .

Running tests with imexam version 0.8.0.
Running tests in imexam docs.

Date: 2018-10-08T08:24:21

Platform: Linux-4.4.0-137-generic-s390x-with-Ubuntu-18.10-cosmic

Executable: /usr/bin/python2.7

Full Python Version: 
2.7.15+ (default, Oct  2 2018, 22:12:08) 
[GCC 8.2.0]

encodings: sys: ascii, locale: UTF-8, filesystem: UTF-8, unicode bits: 20
byteorder: big
float info: dig: 15, mant_dig: 15

Numpy: 1.14.5
Scipy: 1.1.0
Matplotlib: 2.2.2
Astropy: 2.0.8
astropy_helpers: 2.0.7
Using Astropy options: remote_data: none.

rootdir: /tmp/imexam-test-lF1YMZ/lib/python2.7/site-packages, inifile: setup.cfg
collecting ... collected 10 items

imexam/tests/test_imexamine.py::test_column_plot PASSED                  [ 10%]
imexam/tests/test_imexamine.py::test_line_plot PASSED                    [ 20%]
imexam/tests/test_imexamine.py::test_aper_phot SKIPPED                   [ 30%]
imexam/tests/test_imexamine.py::test_line_fit PASSED                     [ 40%]
imexam/tests/test_imexamine.py::test_column_fit PASSED                   [ 50%]
imexam/tests/test_imexamine.py::test_gauss_center FAILED                 [ 60%]
imexam/tests/test_imexamine.py::test_radial_profile PASSED               [ 70%]
imexam/tests/test_imexamine.py::test_radial_profile_background SKIPPED   [ 80%]
imexam/tests/test_imexamine.py::test_radial_profile_pixels PASSED        [ 90%]
imexam/tests/test_imexamine.py::test_curve_of_growth SKIPPED             [100%]

=================================== FAILURES ===================================
______________________________ test_gauss_center _______________________________

    def test_gauss_center():
        """Check the gaussian center fitting."""
        # make a 2d dataset with a gaussian at the center
        from astropy.convolution import Gaussian2DKernel
        gaussian_2D_kernel = Gaussian2DKernel(10)
        plots = Imexamine()
        plots.set_data(gaussian_2D_kernel.array)
        a, xx, yy, xs, ys = plots.gauss_center(37, 37)

        amp = 0.0015915494309189533
        xc = 40.0
        yc = 40.0
        xsig = 10.0
        ysig = 10.0

>       assert_allclose(amp, a, 1e-6)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-06, atol=0
E       
E       (mismatch 100.0%)
E        x: array(0.001592)
E        y: array(0.000447)

imexam/tests/test_imexamine.py:114: AssertionError
----------------------------- Captured stdout call -----------------------------
xc=37.001304    yc=37.001304
------------------------------ Captured log call -------------------------------
imexamine.py               946 INFO     xc=37.001304    yc=37.001304
================ 1 failed, 6 passed, 3 skipped in 0.75 seconds =================
sosey commented 6 years ago

Thanks for the report! I can't replicate on my working machine, will look into it :+1:

xnox commented 6 years ago

If that's of any help I can test build things. And you can always setup to build/package/publish your software as snap in snapstore; or create a PPA in launchpad.net both offer amd64, i386, armhf, arm64, ppc64el, s390x architectures (just enable them in settings). Can't get a console, but it can do builds for you.

sosey commented 6 years ago

hmmm, I haven't used launchpad, I'll look into it. In the meantime, I just pushed some big updates to master, if you're willing, pull them and run through the tests? I'm dropping python2 support soon, you might try the tests on both 2 and 3.

sosey commented 5 years ago

0.8.1 was just released if you're interested in testing...it will be the final py2.7 build