Skip to content

Instantly share code, notes, and snippets.

@RuthAngus
Last active September 28, 2016 21:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RuthAngus/53c90cb5e55b8467198d7d33a9fec424 to your computer and use it in GitHub Desktop.
Save RuthAngus/53c90cb5e55b8467198d7d33a9fec424 to your computer and use it in GitHub Desktop.
Converting Teff into B-V using the Sekiguchi & Fukugita (2000) relation.
import numpy as np
def teff2bv(teff, logg, feh):
"""
Relation from Sekiguchi & Fukugita (2000).
"""
t = [-813.3175, 684.4585, -189.923, 17.40875]
f = [1.2136, 0.0209]
d1, g1, e1 = -0.294, -1.166, 0.3125
return t[0] + t[1]*np.log10(teff) + t[2]*(np.log10(teff))**2 + \
t[3]*(np.log10(teff))**3 + f[0]*feh + f[1]*feh**2 \
+ d1*feh*np.log10(teff) + g1*logg + e1*logg*np.log10(teff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment