from isochrones import StarModel
from isochrones.dartmouth import Dartmouth_Isochrone
dar = Dartmouth_Isochrone()
dar.radius(1.0, 9.6, 0.0)
0.97952282264658863
dar.bands
['g', 'i', 'H', 'K', 'J', 'r', 'W3', 'W2', 'W1', 'Kepler', 'z']
dar.mag['g'](1.0, 9.6, 0.0)
5.1637306212564864
%%file test_star.ini
maxAV = 1.216
RA = 299.268036
dec = 45.227428
Teff = 4135, 98.0
feh = -0.46, 0.16
logg = 4.711, 0.1
[KIC]
g = 16.5832173, 0.05
r = 15.341168, 0.05
i = 14.917236, 0.05
z = 14.6382752, 0.05
[twomass]
J = 13.513, 0.02
H = 12.845, 0.02
K = 12.693, 0.02
[NIRC2]
resolution = 0.1
separation_1 = 0.6
PA_1 = 100
K_1 = 3.66, 0.05
H_1 = 3.77, 0.03
J_1 = 3.74, 0.05
#separation_2 = 1.2
#PA_2 = 200
#K_2 = 5.1, 0.1
#H_2 = 5.2, 0.1
#J_2 = 5.15, 0.1
[RAO]
resolution=0.15
separation_1=0.65
PA_1 = 105
i_1 = 4.2, 0.02
Overwriting test_star.ini
mod = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini')
mod.obs.print_ascii()
root ╚═ KIC g=(16.58, 0.05) @(0.00, 0 [4.00]) ╚═ KIC i=(14.92, 0.05) @(0.00, 0 [4.00]) ╚═ KIC r=(15.34, 0.05) @(0.00, 0 [4.00]) ╚═ KIC z=(14.64, 0.05) @(0.00, 0 [4.00]) ╚═ twomass H=(12.85, 0.02) @(0.00, 0 [4.00]) ╚═ twomass J=(13.51, 0.02) @(0.00, 0 [4.00]) ╚═ twomass K=(12.69, 0.02) @(0.00, 0 [4.00]) ╠═ RAO delta-i=(0.00, 0.01) @(0.00, 0 [0.15]) ║ ╚═ NIRC2 delta-H=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-J=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-K=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ 0_0, logg=[4.711, 0.1], Teff=[4135.0, 98.0], feh=[-0.46, 0.16] ╚═ RAO delta-i=(4.20, 0.02) @(0.65, 105 [0.15]) ╚═ NIRC2 delta-H=(3.77, 0.03) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-J=(3.74, 0.05) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-K=(3.66, 0.05) @(0.60, 100 [0.10]) ╚═ 0_1
mod.n_params
6
mod.labelstring
'0_0--0_1'
# normal parameter order: [mass, log10(age in Gyr), feh, distance, A_V]
# for an associated binary (0_0 + 0_1): [mass_0, mass_1, .. , .., .., ..]
mod.fit()
%matplotlib inline
mod.corner_physical();
mod.corner_observed();
mod2 = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini', index=[0,1])
mod2.obs.print_ascii()
root ╚═ KIC g=(16.58, 0.05) @(0.00, 0 [4.00]) ╚═ KIC i=(14.92, 0.05) @(0.00, 0 [4.00]) ╚═ KIC r=(15.34, 0.05) @(0.00, 0 [4.00]) ╚═ KIC z=(14.64, 0.05) @(0.00, 0 [4.00]) ╚═ twomass H=(12.85, 0.02) @(0.00, 0 [4.00]) ╚═ twomass J=(13.51, 0.02) @(0.00, 0 [4.00]) ╚═ twomass K=(12.69, 0.02) @(0.00, 0 [4.00]) ╠═ RAO delta-i=(0.00, 0.01) @(0.00, 0 [0.15]) ║ ╚═ NIRC2 delta-H=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-J=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-K=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ 0_0, logg=[4.711, 0.1], Teff=[4135.0, 98.0], feh=[-0.46, 0.16] ╚═ RAO delta-i=(4.20, 0.02) @(0.65, 105 [0.15]) ╚═ NIRC2 delta-H=(3.77, 0.03) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-J=(3.74, 0.05) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-K=(3.66, 0.05) @(0.60, 100 [0.10]) ╚═ 1_0
mod2.n_params
10
mod2.fit()
ERROR: Interrupt received: Terminating
mod3 = StarModel.from_ini(Dartmouth_Isochrone, ini_file='test_star.ini', index=[0,1], N=[2,1])
mod3.obs.print_ascii()
root ╚═ KIC g=(16.58, 0.05) @(0.00, 0 [4.00]) ╚═ KIC i=(14.92, 0.05) @(0.00, 0 [4.00]) ╚═ KIC r=(15.34, 0.05) @(0.00, 0 [4.00]) ╚═ KIC z=(14.64, 0.05) @(0.00, 0 [4.00]) ╚═ twomass H=(12.85, 0.02) @(0.00, 0 [4.00]) ╚═ twomass J=(13.51, 0.02) @(0.00, 0 [4.00]) ╚═ twomass K=(12.69, 0.02) @(0.00, 0 [4.00]) ╠═ RAO delta-i=(0.00, 0.01) @(0.00, 0 [0.15]) ║ ╚═ NIRC2 delta-H=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-J=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╚═ NIRC2 delta-K=(0.00, 0.01) @(0.00, 0 [0.10]) ║ ╠═ 0_0, logg=[4.711, 0.1], Teff=[4135.0, 98.0], feh=[-0.46, 0.16] ║ ╚═ 0_1 ╚═ RAO delta-i=(4.20, 0.02) @(0.65, 105 [0.15]) ╚═ NIRC2 delta-H=(3.77, 0.03) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-J=(3.74, 0.05) @(0.60, 100 [0.10]) ╚═ NIRC2 delta-K=(3.66, 0.05) @(0.60, 100 [0.10]) ╚═ 1_0
mod3.n_params
11