Bolometric Corrections

Details about the bolometric correction package can be found in the GitHub repository starspot.


In [1]:
# change directory
%cd ../../../Projects/starspot/starspot/

from color import bolcor as bc


/Users/grefe950/Projects/starspot/starspot

Before requesting bolometric corrections, we need to first initialize the package, which loads the appropriate bolometric corrections tables into memory to permit faster computation of corrections hereafter. The procedure for initializing the tables can be found in the README file in the starspot.color repository. First we need to initialize a log file, where various procedural steps in the code are tracked.


In [2]:
bc.utils.log_init('table_limits.log')  # initialize bolometric correction log file

Next, we need to load the appropriate tables.


In [3]:
FeH = 0.0  # dex; atmospheric [Fe/H]
aFe = 0.0  # dex; atmospheric [alpha/Fe]

brand = 'marcs'  # use theoretical corrections from MARCS atmospheres
phot_filters = ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K']  # select a subset of filters

bc.bolcorrection.bc_init(FeH, aFe, brand, phot_filters)  # initialize tables

Now that we have established which set of bolometric correction tables we wish to use, it's possible to compute bolometric correction using either the Isochrone.colorize feature, or by submitting individual requests. First, let's take a look at a couple valid queries. Note that the query is submitted as bc_eval(Teff, logg, logL/Lsun, N_filers)


In [4]:
bc.bolcorrection.bc_eval(5300.0, 4.61, -0.353, len(phot_filters))  # approx. 0.9 Msun star at 120 Myr.


Out[4]:
array([ 7.10640938,  6.60835619,  5.78475279,  5.32008507,  4.92007877,
        4.31192306,  3.92213273,  3.81482521])

In [5]:
bc.bolcorrection.bc_eval(3000.0, 4.94, -2.65, len(phot_filters))  # approx. 0.1 Msun star at 120 Myr.


Out[5]:
array([ 16.86721014,  15.73411201,  14.527831  ,  13.08308036,
        11.1529249 ,   9.39914594,   8.81038446,   8.52023281])

The extremely large (or small) magnitudes for the 5300 K star is very strange. These issues do not occur for the same command execution in the terminal shell.

Now, what happens when we happen to request a temperature for a value outside the grid?


In [6]:
bc.bolcorrection.bc_eval(2204.0, 4.83, -3.47, len(phot_filters))  # outside of grid -- should return garbage.


Out[6]:
array([ 25.31858076,  23.04425982,  21.19518362,  18.01034707,
        15.18990137,  11.23350844,  10.59837074,  10.31333121])

Curiously, it returns values that do not appear to be out of line. It's quite possible that the code is somehow attempting to extrapolate since we use a 4-point Lagrange inteprolation, which may unknowingly provide an extrapolation beyond the defined grid space. Comparing to Phoenix model atmospheres with the Caffau et al. (2011) solar abundances for the Johnson-Cousins and 2MASS systems, our optical $BV(RI)_C$ magnitudes are systematically 1.0 mag fainter than Phoenix at 120 Myr, and our $JHK$ magnitudes are fainter by approximately 0.04 mag at the same age.

Finally, safely deallocate memory and close the log file.


In [7]:
bc.bolcorrection.bc_clean()
bc.utils.log_close()

There is something strange occuring, as the values produced using this Kernel do not appear to agree with those computed using an IPython command line shell.

Update: There appeared to be a conflict with matplotlib. It's quite possible that importing all packages from model was causing an issue. Now testing this hypothesis. Hypothesis validated. There was a conflict between packages.

Update: This issue seems to randomly come back. What is going on? Only the first of the bolometric corrections is inconsistent with values computed through a command line shell.

Update: Issues arise, unless one resets the kernel and runs the notebook from a fresh configuration.