{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Bolometric correction grids\n", "\n", "Bolometric correction is defined as the difference between the apparent bolometric magnitude of a star and its apparent magnitude in a particular bandpass:\n", "\n", "$$BC_x = m_{bol} - m_x$$\n", "\n", "The MIST project provide [grids of bolometric corrections](http://waps.cfa.harvard.edu/MIST/model_grids.html#bolometric) in many photometric systems as a function of stellar temperature, surface gravity, metallicity, and $A_V$ extinction. This allows for accurate conversion of bolometric magnitude of a star (available from the theoretical grids) to magnitude in any band, at any extinction (and distance), without the need for any \"effective wavelength\" approximation (used in **isochrones** prior to v2.0), which breaks down for broad bandpasses and large extinctions. These grids are downloaded, organized, stored, and interpolated in much the same manner as the model grids. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from isochrones.mist.bc import MISTBolometricCorrectionGrid\n", "\n", "bc_grid = MISTBolometricCorrectionGrid(['J', 'H', 'K', 'G', 'BP', 'RP', 'g', 'r', 'i'])" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
griJHKGBPRP
Tefflogg[Fe/H]Av
2500.0-4.0-4.00.00-6.534742-3.332877-1.6176261.8457812.9270643.436304-2.181986-4.652544-0.881255
0.05-6.590469-3.375570-1.6503381.8314662.9179903.430463-2.211637-4.697700-0.909057
0.10-6.646182-3.418258-1.6830431.8171532.9089163.424623-2.241240-4.742838-0.936829
0.15-6.701881-3.460939-1.7157401.8028412.8998423.418782-2.270797-4.787959-0.964571
0.20-6.757566-3.503615-1.7484291.7885302.8907693.412942-2.300306-4.833062-0.992285
\n", "
" ], "text/plain": [ " g r i J H \\\n", "Teff logg [Fe/H] Av \n", "2500.0 -4.0 -4.0 0.00 -6.534742 -3.332877 -1.617626 1.845781 2.927064 \n", " 0.05 -6.590469 -3.375570 -1.650338 1.831466 2.917990 \n", " 0.10 -6.646182 -3.418258 -1.683043 1.817153 2.908916 \n", " 0.15 -6.701881 -3.460939 -1.715740 1.802841 2.899842 \n", " 0.20 -6.757566 -3.503615 -1.748429 1.788530 2.890769 \n", "\n", " K G BP RP \n", "Teff logg [Fe/H] Av \n", "2500.0 -4.0 -4.0 0.00 3.436304 -2.181986 -4.652544 -0.881255 \n", " 0.05 3.430463 -2.211637 -4.697700 -0.909057 \n", " 0.10 3.424623 -2.241240 -4.742838 -0.936829 \n", " 0.15 3.418782 -2.270797 -4.787959 -0.964571 \n", " 0.20 3.412942 -2.300306 -4.833062 -0.992285 " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bc_grid.df.head()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "FrozenList(['Teff', 'logg', '[Fe/H]', 'Av'])" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bc_grid.interp.index_names" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([0.0819599 , 1.45398088])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bc_grid.interp([5770, 4.44, 0.0, 0.], ['G', 'K'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The bandpasses provided to initialize the grid object are parsed according to the `.get_band` method, which returns the photometric system and the name of the band in the system:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(('UBVRIplus', 'Gaia_G_DR2Rev'), ('SDSSugriz', 'SDSS_g'))" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bc_grid.get_band('G'), bc_grid.get_band('g')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Not all bands have cute nicknames to them, so you can also be explicit, e.g.:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "('DECam', 'DECam_g')" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bc_grid.get_band('DECam_g')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "See the implementation of `.get_band` for details." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" } }, "nbformat": 4, "nbformat_minor": 2 }