Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

0.9.8: test fails with montage-4.0 #37

Closed
olebole opened this issue Dec 1, 2015 · 1 comment
Closed

0.9.8: test fails with montage-4.0 #37

olebole opened this issue Dec 1, 2015 · 1 comment

Comments

@olebole
Copy link
Member

olebole commented Dec 1, 2015

When testing the wrapper with the new version 4.0 of Montage, the numbers seem to have shifted a bit, causing the unit test to fail:

montage_wrapper/tests/test_wrappers.py::TestMosaic::test_mosaic FAILED
montage_wrapper/tests/test_wrappers.py::TestMosaic::test_mosaic_background_match xfail

=================================== FAILURES ===================================
____________________________ TestMosaic.test_mosaic ____________________________

self = <montage_wrapper.tests.test_wrappers.TestMosaic object at 0x7f55b9a59190>

    def test_mosaic(self): [...]
>       assert_allclose(np.std(valid), 0.12658458001333581)

montage_wrapper/tests/test_wrappers.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/dist-packages/numpy/testing/utils.py:1297: in assert_allclose
    verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

comparison = <function compare at 0x7f55bacd8488>
x = array(0.12658488750457764, dtype=float32), y = array(0.1265845800133358)
err_msg = '', verbose = True
header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6
[...]
    def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
                             header='', precision=6): [...]
                if not cond :
>                   raise AssertionError(msg)
E                   AssertionError: 
E                   Not equal to tolerance rtol=1e-07, atol=0
E                   
E                   (mismatch 100.0%)
E                    x: array(0.12658488750457764, dtype=float32)
E                    y: array(0.1265845800133358)

/usr/lib/python2.7/dist-packages/numpy/testing/utils.py:665: AssertionError
----------------------------- Captured stdout call -----------------------------
INFO: Listing raw frames [montage_wrapper.wrappers]
INFO: Computing optimal header [montage_wrapper.wrappers]
INFO: Projecting raw frames [montage_wrapper.wrappers]
INFO: Mosaicking frames [montage_wrapper.wrappers]
INFO: Deleting work directory /tmp/montage_mosaic_raw_LgGrKY [montage_wrapper.wrappers]
===================== 1 failed, 1 xfailed in 6.19 seconds ======================

Similarly for np.mean and np.median.
Increasing the rtol to 1e-5 for al three asserts helps here (by keeping compatibility with the old Montage version).

@olebole
Copy link
Member Author

olebole commented Jan 30, 2019

That problem has disappeared somehow, Montage-wrapper works fine with Montage 5.0 and 6.0. Closing.

@olebole olebole closed this as completed Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant