# How to extract surface temperature of star from B-V magnitude over all ranges of B-V?

Background:

According to the wikipedia article about the color index, one can approximate the effective surface temperature of a star from its B-V index by the formula:

But, it is also my (possibly incorrect) understanding that this is only an approximation because the exact temperature also depends upon the metallicity of a star; more metallicity implies heavier elements, which in turn implies a larger deviation from hydrostatic equilibrium, which in turn increases the error associated with the assumption that a given star is an ideal blackbody. (Please correct me if I am wrong).

Q1) Is there a more appropriate formula to approximate the surface temperature from the input B-V index (possibly something piece-wise, as is the case for mass and luminosity)?

Q2) Is there a minimum and maximum to the possible B-V index? For example, B-V = -1 gives a negative temperature; this is strange since smaller B-V corresponds to hotter stars.

Context:

I am trying to make an HR diagram in python using the Hipparcos Catalog. Of the 4 axes needed (B-V, absolute magnitude, luminosity, and temperature), I cannot seem to calibrate the ticks on the temperature axis correctly. The only other option (which I would prefer to avoid if possible) I can think of is to use select stars of known B-V and temperature to logarithmically interpolate the temperature axis. As a reference, the HR diagram shown below can be obtained from this wikipedia page.

Python:

In case it is helpful, the python code below plots the temperatures that correspond to 101 evenly spaced B-V values from -1 to 6. It is interesting to note that the trend changes around B-V = -0.5; maybe this is relevant to the question(s) above?

import numpy as np
import matplotlib.pyplot as plt

def get_kelvin_temperature(bv_index):
"""

"""

## https://en.wikipedia.org/wiki/Color_index
term = 0.92 * bv_index
return 4600 * (1 / (term + 1.7) + 1/ (term + 0.62))

bv_index = np.linspace(-1, 6, 101)
temperature = get_kelvin_temperature(bv_index)

print(temperature)

fig, (ax_top, ax_btm) = plt.subplots(nrows=2)
ax_btm.set_yscale('log', basey=10)
ax_btm.set_xlabel('B-V', fontsize=7)
for ax in (ax_top, ax_btm):
ax.set_ylabel('Temperature (K)', fontsize=7)
ax.scatter(bv_index[temperature > 0], temperature[temperature > 0], label='$$T_K > 0$$', marker='.')
ax.scatter(bv_index[temperature <= 0], temperature[temperature <= 0], label='$$T_K ≤ 0$$', marker='.')
ax.tick_params(axis='both', which='both', labelsize=7)
ax.grid(color='k', linestyle=':', alpha=0.3)
ax_btm.set_ylim(-100, 10e5)
fig.legend(mode='expand', ncol=2, loc='lower center', fontsize=7)
plt.show()
plt.close(fig)


Note:

A similar question was answered here, but I am reading a file into python; this dataset does not contain spectra I can fold. A similar question was also asked here, but I do not fully understand how to implement the recommended solution.

• Given that you don't know the metallicity of general stars in the Hipparcos catalog, I can't see how you're going to do this. Your formula gives negative results because you are using it outside its range of validity. There is no wonder formula that works for all kinds of stars. There are different solutions in different parts of the HR diagram. The mapping is gravity dependent too. Q1 is a duplicate. – Rob Jeffries Apr 14 at 7:43
• I have used the Vmag and parallax data of the Hipparcos Main Catalog to find the distances and absolute magnitudes; these absolute magnitudes were used to estimate luminosities; using the piece-wise mass-luminosity relationship (linked from Q1), I estimated the masses. So when you say the mapping is gravity-dependent, I am assuming I can use these masses with some error-bar. I do not expect a "wonder formula", but maybe a piece-wise relation: In Q2, you mention that the relationship of T vs B-V posed by OP does not hold at low temperatures; can you point me towards more information? – allthemikeysaretaken Apr 14 at 8:15
• As a reference, the data is queried from this NASA query page. Can one estimate the temperature from these given parameters? – allthemikeysaretaken Apr 14 at 8:20
• Sorry to sound negative, but what you are trying to do is very difficult if your ambition is to construct the entire HR diagram. There is no single mass-luminosity relation that works across the HR diagram; even the piecewise one you link to is only valid on the main sequence.and takes no account of composition, age or rotation (e.g. It doesn't work for giants). You will also see from a question you link to, that efforts to convert absolute visual magnitude to luminosity are doomed without correct use of bolometric corrections (which also depend on Teff, gravity, composition...). – Rob Jeffries Apr 14 at 8:59
• If you want something approximate that works for main sequence stars, then refer back to that answer, where I give a reference to a calibration table that can be used. astronomy.stackexchange.com/questions/33637/… – Rob Jeffries Apr 14 at 8:59