timothydmorton / isochrones

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

Info: Interpolating incomplete tracks for feh = -1.5 during run nosetests isochrones #168

Open leizhenxin opened 2 years ago

leizhenxin commented 2 years ago

It cost a longtime at interpolating tracks of feh =-1.5 when run nosetests isochrones for the first time on my macOS Bigsur system. So I closed the terminal and run nosetests isochrones in a new terminal. Then errors occurred like as follows: ...... chrones/tests/test_fits.py:6: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. from pandas.util.testing import assert_frame_equal interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 E...../Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/isochrones/priors.py:89: RuntimeWarning: divide by zero encountered in true_divide sigma = 1.0 / np.sqrt(hn) interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00 E... ERROR: isochrones.tests.test_basic.test_tracks ......

How can I generate all other missing tracks now? Need I to delete all the already existing tracks then run nosetests again? Actually, I cannot find the interpolated tracks in my Mac.

leizhenxin commented 2 years ago

I tried nosetests again after multinest was installed , but the problem is still exist:

................... /Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/isochrones/tests/test_fits.py:6: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. from pandas.util.testing import assert_frame_equal interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 552.34i E... MultiNest Warning: no resume file found, starting from scratch


MultiNest v3.10 Copyright Farhan Feroz & Mike Hobson Release Jul 2015

no. of live points = 5 dimensionality = 5


ln(ev)= -10060.873166967840 +/- 0.56735137479931252
Total Likelihood Evaluations: 5 Sampling finished. Exiting MultiNest . MultiNest Warning: no resume file found, starting from scratch


MultiNest v3.10 Copyright Farhan Feroz & Mike Hobson Release Jul 2015

no. of live points = 20 dimensionality = 5


ln(ev)= -34.311953691583675 +/- NaN Total Likelihood Evaluations: 327 Sampling finished. Exiting MultiNest interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3381.82 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3445.72 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3404.47 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3424.62 interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3428.12 E...../Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/isochrones/priors.py:89: RuntimeWarning: divide by zero encountered in true_divide sigma = 1.0 / np.sqrt(hn) interpolating missing values in evolution tracks (feh=-1.5)': 80%|▊| 4/5 [00:00<00:00, 3358.80 E... .................................

How can I solve this problem? Any suggestions are welcome

timothydmorton commented 2 years ago

These tables get created/stored by default in a ~/.isochrones directory, or in $ISOCHRONES if that environment variable is defined. Try to delete that directory and run the tests again; let me know if that works!

leizhenxin commented 2 years ago

Hi Tim, Thank you for your useful information. I deleted the tables in ~/.isochrones directory, then run nosetests again. It seems to work normally. However, it stays at the stage of interpolating tracks of feh=-1.5 for the whole night (i.e., more than 8 hours), without any changes: ........................... /Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/tables/attributeset.py:464: NaturalNameWarning: object name is not a valid Python identifier: 'axis1name[Fe/H]'; it does not match the pattern ``^[a-zA-Z][a-zA-Z0-9_]*$; you will not be able to use natural naming to access this object; usinggetattr()`` will still work, though check_attribute_name(name) interpolating missing values in evolution tracks (feh=-4.0)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-3.5)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-3.0)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-2.5)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-2.0)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-1.75)': 100%|█| 196/196 [ .............................

Does it work normally ? Should I stop the terminal and repeat the operation again? Or just waiting?

leizhenxin commented 2 years ago

It works! All tracks are interpolated now. ................. from pandas.util.testing import assert_frame_equal interpolating missing values in evolution tracks (feh=-1.5)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-1.25)': 100%|█| 196/196 [ interpolating missing values in evolution tracks (feh=-1.0)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-0.75)': 100%|█| 196/196 [ interpolating missing values in evolution tracks (feh=-0.5)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=-0.25)': 100%|█| 196/196 [ interpolating missing values in evolution tracks (feh=0.0)': 100%|█| 196/196 [00 interpolating missing values in evolution tracks (feh=0.25)': 100%|█| 196/196 [0 interpolating missing values in evolution tracks (feh=0.5)': 100%|█| 196/196 [00 ...................

However, there is still a failure exist:

......................................... Sampling finished. Exiting MultiNest ....../Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/numpy/core/shape_base.py:65: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. ary = asanyarray(ary) ........../Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/isochrones/priors.py:89: RuntimeWarning: divide by zero encountered in true_divide sigma = 1.0 / np.sqrt(hn) ..F.......

FAIL: Testing with first entry from Gaia DR1 TGAS table

Traceback (most recent call last): File "/Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/Users/leizhenxin/opt/anaconda3/envs/isochrones/lib/python3.10/site-packages/isochrones/tests/test_query.py", line 38, in test_queries assert tm.get_id() == b("03000819+0014074") # force byte literal b/c that's what gets returned AssertionError

Ran 34 tests in 86.357s ............................................

How to solve these problem?

timothydmorton commented 2 years ago

That one failure is fine. I believe it has been marked as skipped in the latest version on the master branch here. I think you are good to go!