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

querying outside of mass range results in segfault #109

Closed smoh closed 4 years ago

smoh commented 4 years ago

The minimum mass of MIST grid is 0.1. When you query a value lower than that, this results in segmentation fault. A more gentle exception would be desirable.

from isochrones.mist import MIST_EvolutionTrack
mist_track = MIST_EvolutionTrack()
mist_track.get_eep(0.08, 9.51, 0.)
mist_track.generate(0.08, 9.51, 0.)
timothydmorton commented 4 years ago

Interesting-- I get nan's when running this. What version of isochrones are you running?

Screenshot 2019-12-12 17 22 39
smoh commented 4 years ago
➜ pip freeze | grep isochrones
isochrones==2.0.1

hmm.. I had this problem on a linux machine and could reproduce it on mac osx 10.14.6 with a new conda environment:

conda create -n isochrones-test python=3
conda activate isochrones-test
conda install numba
pip install isochrones
smoh commented 4 years ago

I tried with the latest master of isochrones and it returns nan without segfaulting so I guess you must have fixed it between then and now.