timothydmorton / isochrones

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

Age of the Sun #30

Closed DanielAndreasen closed 8 years ago

DanielAndreasen commented 8 years ago

Hi Tim,

Maybe I'm doing something embarrasing wrong, but I'm not able to get the right age of the Sun (4.567Gyr) using Dartmouth isochrones.

import numpy as np
from isochrones.dartmouth import Dartmouth_Isochrone
dar = Dartmouth_Isochrone()
mass, feh = 1.00, 0.00
age10 = dar.agerange(mass, feh)
age10 = np.mean(age10)
age = 10**age10/1e9  # This is 3.490Gyr
timothydmorton commented 8 years ago

The agerange method returns the min and max age allowed by the models. Outside of this range properties will be nan. There's no reason that the mean of this range should be the age of the sun. On Tue, Aug 16, 2016 at 10:30 Daniel Thaagaard Andreasen < notifications@github.com> wrote:

Hi Tim,

Maybe I'm doing something embarrasing wrong, but I'm not able to get the right age of the Sun (4.567Gyr) using Dartmouth isochrones.

import numpy as np from isochrones.dartmouth import Dartmouth_Isochrone dar = Dartmouth_Isochrone() mass, feh = 1.00, 0.00 age10 = dar.agerange(mass, feh) age10 = np.mean(age10) age = 10**age10/1e9 # This is 3.490Gyr

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/timothydmorton/isochrones/issues/30, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzr25cIOrFYMQXreQ9h7JbxMPE2yT70ks5qgcmdgaJpZM4Jld-M .

DanielAndreasen commented 8 years ago

Ahh I see. I didn't use it correctly. Thanks :)