timothydmorton / isochrones

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

StarModel fails without pymultinest #57

Closed kcotar closed 7 years ago

kcotar commented 7 years ago

When importing the library or running the nosetests i get the following error:

File /anaconda2/lib/python2.7/site-packages/isochrones/starmodel.py", line 16, in import pymultinest ImportError: No module named pymultinest

When going through the code I noticed that there aren't any library import checks in starmodel.py as opposed to starmodel_old.py

mnest_available = True
try:
    import pymultinest
except ImportError:
    logging.warning('PyMultiNest not available; only emcee fits will be possible.')
    pymultinest = None
    mnest_available = False

Does the new model supports computations without pymultinest being installed or should we use the old model instead?

timothydmorton commented 7 years ago

You can still do computations using emcee (though the built-in initialization may not be super-robust). Definitely should not use the old model. I didn't realize that was even still in the repo; I remove it.

timothydmorton commented 7 years ago

That having been said, I recommend using multinest over the current automated implementation of the emcee fits. I hope to improve this soon.

timothydmorton commented 7 years ago

Are you running current master? I do see the pymultinest import protected in the current code, and nosetests work for me.

kcotar commented 7 years ago

Thank you for the answers.

I was able to compile everything and now I am using pymultinest.