#!/usr/bin/env python # coding: utf-8 # In[1]: from isochrones import StarModel from isochrones.dartmouth import Dartmouth_Isochrone # In[2]: dar = Dartmouth_Isochrone() # In[6]: dar.radius(1.0, 9.6, 0.0) # In[7]: dar.bands # In[8]: dar.mag['g'](1.0, 9.6, 0.0) # In[10]: get_ipython().run_cell_magic('file', 'test_star.ini', '\nmaxAV = 1.216\nRA = 299.268036\ndec = 45.227428\nTeff = 4135, 98.0\nfeh = -0.46, 0.16\nlogg = 4.711, 0.1\n\n[KIC]\ng = 16.5832173, 0.05\nr = 15.341168, 0.05\ni = 14.917236, 0.05\nz = 14.6382752, 0.05\n\n[twomass]\nJ = 13.513, 0.02\nH = 12.845, 0.02\nK = 12.693, 0.02\n\n[NIRC2]\nresolution = 0.1\nseparation_1 = 0.6\nPA_1 = 100\nK_1 = 3.66, 0.05\nH_1 = 3.77, 0.03\nJ_1 = 3.74, 0.05\n#separation_2 = 1.2\n#PA_2 = 200\n#K_2 = 5.1, 0.1\n#H_2 = 5.2, 0.1\n#J_2 = 5.15, 0.1\n\n[RAO]\nresolution=0.15\nseparation_1=0.65\nPA_1 = 105\ni_1 = 4.2, 0.02\n') # In[11]: mod = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini') # In[12]: mod.obs.print_ascii() # In[13]: mod.n_params # In[14]: mod.labelstring # In[ ]: # normal parameter order: [mass, log10(age in Gyr), feh, distance, A_V] # for an associated binary (0_0 + 0_1): [mass_0, mass_1, .. , .., .., ..] # In[15]: mod.fit() # In[9]: get_ipython().run_line_magic('matplotlib', 'inline') mod.corner_physical(); # In[10]: mod.corner_observed(); # In[16]: mod2 = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini', index=[0,1]) mod2.obs.print_ascii() # In[17]: mod2.n_params # In[ ]: mod2.fit() # In[3]: mod3 = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini', index=[0,1], N=[2,1]) mod3.obs.print_ascii() # In[4]: mod3.n_params # In[ ]: