{ "cells": [ { "cell_type": "markdown", "id": "db42c52f", "metadata": {}, "source": [ "# Stellar Contamination in Transmission Spectra\n", "\n", "When we observe a transiting exoplanet, the transmission spectrum we measure depends not only on the planet's atmosphere, but also on the stellar spectrum behind the planet. If the host star has an inhomogeneous surface --- with cool starspots and/or hot faculae --- then the spectrum of the unocculted stellar surface differs from the average stellar spectrum. This introduces a wavelength-dependent bias in the observed transit depth known as the Transit Light Source (TLS) effect ([Rackham et al. 2018](https://ui.adsabs.harvard.edu/abs/2018ApJ...853..122R)).\n", "\n", "The contamination factor, $\\epsilon(\\lambda)$, acts as a multiplicative correction to the \"true\" atmospheric transit depth:\n", "\n", "$$\\delta_\\mathrm{obs}(\\lambda) = \\epsilon(\\lambda) \\, \\delta_\\mathrm{atm}(\\lambda)$$\n", "\n", "where $\\epsilon(\\lambda) = \\frac{1}{1 - \\sum_i f_i \\left(1 - \\frac{I_i(\\lambda)}{I_\\mathrm{phot}(\\lambda)}\\right)}$, with the sum running over each heterogeneity region $i$ with covering fraction $f_i$ and specific intensity $I_i(\\lambda)$, and $I_\\mathrm{phot}(\\lambda)$ is the photosphere intensity.\n", "\n", "Stellar contamination is particularly important for planets orbiting M dwarfs, since these stars tend to have large spot covering fractions and/or large temperature differences between the photosphere and any active regions.\n", "\n", "In this tutorial, we will model the impact of stellar contamination on the transmission spectrum of TRAPPIST-1f.\n", "\n", "This tutorial is split into two parts:\n", "\n", "- Part 1: stellar contamination for a bare rocky planet (with no atmosphere).\n", "- Part 2: stellar contamination for TRAPPIST-1f with an Earth-like atmosphere, showing how stellar activity can mimic or mask atmospheric features.\n", "\n", "Let's get started! " ] }, { "cell_type": "markdown", "id": "7d1fe153", "metadata": {}, "source": [ "## Stellar Grids in POSEIDON\n", "\n", "To model stellar contamination, POSEIDON needs realistic stellar spectra --- not just blackbodies --- because the contamination factor $\\epsilon(\\lambda)$ depends on the wavelength-dependent *ratio* of the heterogeneity and photosphere specific intensities. POSEIDON can use two packages to interpolate stellar model grids:\n", "\n", "- `'pysynphot'` (pre-installed): installs automatically with POSEIDON, and is what we use in this tutorial.\n", "\n", "- `'pymsg'` (recommended): uses a more accurate interpolation method and is *strongly* recommended for forward models and retrievals that include stellar contamination. However, `pymsg` requires a separate manual installation --- see the [MSG documentation](https://msg.readthedocs.io/en/stable/) for instructions.\n", "\n", "To switch to `pymsg`, simply pass `interp_backend = 'pymsg'` when calling `create_star()`. For example:\n", "```python\n", "star = create_star(R_s, T_s, log_g_s, Met_s,\n", " stellar_contam = 'one_spot',\n", " stellar_grid = 'phoenix',\n", " f_het = f_het, T_het = T_het,\n", " wl = wl, interp_backend = 'pymsg')\n", "```\n", "\n", "The `'pysynphot'` installation with POSEIDON comes with two stellar model grids:\n", "\n", "- `'cbk04'`: the Castelli & Kurucz (2004) atlas. These models cover a wide range of $T_\\mathrm{eff}$, $\\log g$, and metallicity.\n", "\n", "- `'phoenix'`: the PHOENIX model grid (Husser et al. 2013). These models are better suited for cool stars ($T_\\mathrm{eff} \\lesssim 4000$ K), since they include more complete molecular line lists (e.g., TiO, VO, $\\rm{H}_2 \\rm{O}$) that dominate the spectra of M dwarfs. The PHOENIX models in `'pysynphot'` are accurate and high-resolution for stars with solar metallicity, but we generally recommend installing the `'pymsg'` package when using PHOENIX models for the most accurate interpolation scheme.\n", "\n", "