timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
117 stars 63 forks source link

nosetest problems, divide by zero #143

Open nwtuchow opened 3 years ago

nwtuchow commented 3 years ago

Hello,

I'm trying to install this package in a fresh conda environment on a linux machine, and when I run nosetests it fails. I get a ton of lines of warning text when the tests run and it is difficult to figure out what's causing it to fail. See the bottom of this post for the log of which tests fail. Among the hundreds of lines of text I get, one seemed particularly important. It said

divide by zero encountered in true_divide
sigma = 1.0/npsqrt(hn)  

The package appears to be partially working, and running through the examples in the Quick Start section of documentation works except for the fact that the dt_deep and dm_deep columns are all NaN. When I do df.dropna() I get an empty dataframe.

Would you be able to help me diagnose this problem, and get this package working? I changed the location of the .isochrones directory in config.py as I didn't have space in my home directory. Would that be causing some of these issues? I'm also not using multinest for fitting so I don't have that installed.

Thanks, Noah

======================================================================
FAIL: isochrones.tests.test_likelihood.test_compare_phot
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File ".../isochrones/tests/test_likelihood.py", line 57, in test_compare_phot
    test_compare_starmodels(props_phot)
  File ".../isochrones/tests/test_likelihood.py", line 24, in test_compare_starmodels
    assert np.isclose(m1.lnprior(pars), m2.lnprior(pars))
AssertionError

======================================================================
FAIL: isochrones.tests.tests.test_mist_basic
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File ".../isochrones/tests/tests.py", line 14, in test_mist_basic
    _basic_ic_checks(ic)
  File ".../isochrones/tests/tests.py", line 116, in _basic_ic_checks
    assert len(ic.isochrone(8.0, feh=0.0)) > 0
AssertionError

======================================================================
FAIL: isochrones.tests.tests.test_tracks
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File ".../isochrones/tests/tests.py", line 34, in test_tracks
    _basic_ic_checks_tracks(mist)
  File ".../isochrones/tests/tests.py", line 154, in _basic_ic_checks_tracks
    assert len(ic.isochrone(8.0, feh=0.0)) > 0
AssertionError

----------------------------------------------------------------------
Ran 34 tests in 183.329s

FAILED (errors=4, failures=7)