def sanity_chromoAgeRHKExample(self): """ Example chromospheric age (Donahue) """ from PyAstronomy import pyasl # Approximate chromospheric age of the Sun print("Solar age: {0:4.2f} Ga".format(pyasl.chromoAgeRHK(-4.95)))
def sanity_chromoAgeRHKExample(self): """ Example chromospheric age (Donahue) """ from PyAstronomy import pyasl # Approximate chromospheric age of the Sun print "Solar age: {0:4.2f} Ga".format(pyasl.chromoAgeRHK(-4.95))
def sanity_chromoAgeRHK(self): """ Checking sanity of chromospheric age (Donahue) """ import numpy as np # R'HK vs log10(age) (estimated from Fig. 1 in Donahue 1998) dat = [[-4.25, 7.], [-4.6, 9.1], [-5.0, 9.7]] for d in dat: a = np.log10(pyasl.chromoAgeRHK(d[0])*1e9) print a, d[1] self.assertAlmostEqual(a, d[1], delta=0.3, msg="Cannot reproduce age estimate from Donahue fig 1.")
def sanity_chromoAgeRHK(self): """ Checking sanity of chromospheric age (Donahue) """ import numpy as np # R'HK vs log10(age) (estimated from Fig. 1 in Donahue 1998) dat = [[-4.25, 7.], [-4.6, 9.1], [-5.0, 9.7]] for d in dat: a = np.log10(pyasl.chromoAgeRHK(d[0]) * 1e9) print(a, d[1]) self.assertAlmostEqual( a, d[1], delta=0.3, msg="Cannot reproduce age estimate from Donahue fig 1.")