Giter Club home page Giter Club logo

nfw's People

Contributors

joergdietrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nfw's Issues

New constant values lead to test failures

Updates of CODATA and astronomical constants leads to multiple test failures because the reference values are not current anymore:

$ nosetests 
.......FF...FF..FF.FF..F.F
======================================================================
FAIL: test_delta_sigma (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 128, in test_delta_sigma
    assert_array_almost_equal(ds.value / 1e14, ref_arr)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 962, in assert_array_almost_equal
    precision=decimal)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: array([ 5.288425,  1.387852])
 y: array([ 5.287527,  1.387727])

======================================================================
FAIL: test_density (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 95, in test_density
    assert_almost_equal(rho.value / 1e13, 2.628686177054833)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 2.628799454816062
 DESIRED: 2.628686177054833

======================================================================
FAIL: test_mass_init (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 35, in test_mass_init
    assert_almost_equal(nfw.r_s.value, 0.3724844259709579)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 0.37244989922085564
 DESIRED: 0.3724844259709579

======================================================================
FAIL: test_mass_init_bckg (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 42, in test_mass_init_bckg
    assert_almost_equal(nfw.radius_Delta(200).value, 3.708806727880765)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 3.708462946948883
 DESIRED: 3.708806727880765

======================================================================
FAIL: test_mean_density (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 103, in test_mean_density
    assert_almost_equal(rho.value / 1e13, 9.256897197704966)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 9.257628230844219
 DESIRED: 9.256897197704966

======================================================================
FAIL: test_mess (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 111, in test_mess
    assert_almost_equal(m.value / 1e14, 7.656709240756399)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 7.6572975645639385
 DESIRED: 7.656709240756399

======================================================================
FAIL: test_projected_mass (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 87, in test_projected_mass
    assert_array_almost_equal(m_proj.value, m_comp)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 962, in assert_array_almost_equal
    precision=decimal)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: array([  1.167643,   2.438524,   3.739134,   5.002096,   6.205642,
         7.344518,   8.419927,   9.435555,  10.395896,  11.305523,
        12.168777,  12.98965 ,  13.771753,  14.518327,  15.232274,
        15.916186,  16.572382,  17.202939,  17.809721,  18.394406])
 y: array([  1.167491,   2.438239,   3.738733,   5.001597,   6.20506 ,
         7.343866,   8.419214,   9.43479 ,  10.395086,  11.304672,
        12.167891,  12.988732,  13.770807,  14.517356,  15.23128 ,
        15.91517 ,  16.571347,  17.201886,  17.808653,  18.393322])

======================================================================
FAIL: test_radius_Delta (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 58, in test_radius_Delta
    assert_almost_equal(r200.value, 1.8624221298548365)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 1.8622494961043254
 DESIRED: 1.8624221298548365

======================================================================
FAIL: test_sigma (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 119, in test_sigma
    assert_almost_equal(s.value / 1e13, 8.418908648577666)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 8.419216818682797
 DESIRED: 8.418908648577666

======================================================================
FAIL: test_var_cosmo_obj (test_nfw.TestNFW)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joerg/src/NFW/tests/test_nfw.py", line 242, in test_var_cosmo_obj
    assert_almost_equal(nfw.radius_Delta(325).value, 1.2525923457595705)
  File "/home/joerg/applications/anaconda3/lib/python3.6/site-packages/numpy/testing/utils.py", line 579, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError: 
Arrays are not almost equal to 7 decimals
 ACTUAL: 1.2524762382195782
 DESIRED: 1.2525923457595705

----------------------------------------------------------------------
Ran 26 tests in 0.309s

FAILED (failures=10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.