{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "b904abe7", "metadata": { "ploomber": { "memory_usage": 198.515625, "timestamp_end": 1691727395.9039, "timestamp_start": 1691727391.274553 }, "tags": [ "exe", "hide-cell" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [] } ], "source": [ "! pip install tess-atlas -q\n", "\n", "from tess_atlas.utils import notebook_initalisations\n", "\n", "notebook_initalisations()" ] }, { "cell_type": "markdown", "id": "d93383fa", "metadata": { "tags": [ "def" ] }, "source": [ "# TESS Atlas fit for TOI 3114\n", "\n", "**Version: '0.2.1.dev314+ge1761e8'**\n", "\n", "**Note: This notebook was automatically generated as part of the TESS Atlas project. More information can be found on GitHub:** [github.com/dfm/tess-atlas](https://github.com/dfm/tess-atlas)\n", "\n", "In this notebook, we do a quicklook fit for the parameters of the TESS Objects of Interest (TOI) in the system number 3114.\n", "To do this fit, we use the [exoplanet](https://exoplanet.dfm.io) library and you can find more information about that project at [exoplanet.dfm.io](https://exoplanet.dfm.io).\n", "\n", "From here, you can\n", "- scroll down and take a look at the fit results\n", "- open the notebook in Google Colab to run the fit yourself\n", "- download the notebook\n", "\n", "\n", "\n", "## Caveats\n", "\n", "There are many caveats associated with this relatively simple \"quicklook\" type of analysis that should be kept in mind.\n", "Here are some of the main things that come to mind:\n", "\n", "1. The orbits that we fit are constrained to be *circular*. One major effect of this approximation is that the fit will significantly overestimate the confidence of the impact parameter constraint, so the results for impact parameter shouldn't be taken too seriously.\n", "\n", "2. Transit timing variations, correlated noise, and (probably) your favorite systematics are ignored. Sorry!\n", "\n", "3. This notebook was generated automatically without human intervention. Use at your own risk!\n", "\n", "\n", "## Getting started\n", "\n", "To get going, we'll add some _magic_, import some packages, and run some setup steps." ] }, { "cell_type": "code", "execution_count": 2, "id": "835d0bbe", "metadata": { "ploomber": { "memory_usage": 198.69140625, "timestamp_end": 1691727395.987593, "timestamp_start": 1691727395.90526 }, "pycharm": { "name": "#%%\n" }, "tags": [ "def", "hide-cell", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The autoreload extension is already loaded. To reload it, use:\n", " %reload_ext autoreload\n", "time: 3.37 ms (started: 2023-08-11 14:16:35 +10:00)\n" ] } ], "source": [ "%load_ext autoreload\n", "%load_ext memory_profiler\n", "%load_ext autotime\n", "%autoreload 2\n", "# %matplotlib inline\n", "\n", "import os\n", "\n", "import numpy as np\n", "import pymc3_ext as pmx\n", "from arviz import InferenceData\n", "\n", "from tess_atlas.analysis.eccenticity_reweighting import (\n", " calculate_eccentricity_weights,\n", ")\n", "from tess_atlas.analysis.model_tools import (\n", " compute_variable,\n", " get_untransformed_varnames,\n", " sample_prior,\n", ")\n", "from tess_atlas.data.inference_data_tools import (\n", " get_optimized_init_params,\n", " summary,\n", " test_model,\n", ")\n", "from tess_atlas.data.tic_entry import TICEntry\n", "from tess_atlas.logger import get_notebook_logger\n", "from tess_atlas.plotting import (\n", " plot_diagnostics,\n", " plot_eccentricity_posteriors,\n", " plot_inference_trace,\n", " plot_lightcurve,\n", " plot_phase,\n", " plot_posteriors,\n", " plot_priors,\n", " plot_raw_lightcurve,\n", ")\n", "\n", "TOI_NUMBER = 3114\n", "logger = get_notebook_logger(outdir=f\"toi_{TOI_NUMBER}_files\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "37cf57a3", "metadata": { "ploomber": { "memory_usage": 198.796875, "timestamp_end": 1691727396.064007, "timestamp_start": 1691727395.988083 }, "tags": [ "exe", "remove-cell" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 9.92 ms (started: 2023-08-11 14:16:36 +10:00)\n" ] } ], "source": [ "import theano\n", "\n", "from tess_atlas.utils import tabulate_global_environ_vars\n", "\n", "logger.info(\"Logging some settings for future reference\")\n", "logger.info(\"GLOBAL ENVS:\\n\" + tabulate_global_environ_vars())\n", "logger.info(f\"THEANO Config:\\n{theano.config}\")" ] }, { "cell_type": "markdown", "id": "b0779ec5", "metadata": { "lines_to_next_cell": 0, "tags": [ "def" ] }, "source": [ "## Downloading Data\n", "\n", "Next, we grab some inital guesses for the TOI's parameters from [ExoFOP](https://exofop.ipac.caltech.edu/tess/) and download the TOI's lightcurve with [Lightkurve].\n", "\n", "We wrap the information in three objects, a `TIC Entry`, a `Planet Candidate` and finally a `Lightcurve Data` object.\n", "\n", "- The `TIC Entry` object holds one or more `Planet Candidate`s (each candidate associated with one TOI id number) and a `Lightcurve Data` for associated with the candidates. Note that the `Lightcurve Data` object is initially the same fopr each candidate but may be masked according to the candidate transit's period.\n", "\n", "- The `Planet Candidate` holds information on the TOI data collected by [SPOC] (eg transit period, etc)\n", "\n", "- The `Lightcurve Data` holds the lightcurve time and flux data for the planet candidates.\n", "\n", "[ExoFOP]: https://exofop.ipac.caltech.edu/tess/\n", "[Lightkurve]: https://docs.lightkurve.org/index.html\n", "[SPOC]: https://heasarc.gsfc.nasa.gov/docs/tess/pipeline.html\n", "\n", "Downloading the data (this may take a few minutes):" ] }, { "cell_type": "code", "execution_count": 4, "id": "d18e41d5", "metadata": { "ploomber": { "memory_usage": 214.73046875, "timestamp_end": 1691727396.74997, "timestamp_start": 1691727396.064554 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 620 ms (started: 2023-08-11 14:16:36 +10:00)\n" ] }, { "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", "
TOI3114.01
TOI3114.01
ClassificationPlanet Candidate
Period (days)4.407111
Epoch (TBJD)2331.60796
Depth (ppt)9.14
Duration (days)0.088917
Planet SNR61.0
Single TransitFalse
PE PipelineQLP
Commentsfound in faint-star QLP search
\n", "

\n", "More data on ExoFOP page" ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tic_entry = TICEntry.load(toi=TOI_NUMBER)\n", "tic_entry" ] }, { "cell_type": "markdown", "id": "1fc52577", "metadata": {}, "source": [ "If the amount of lightcurve data availible is large we filter the data to keep only data around transits." ] }, { "cell_type": "code", "execution_count": 5, "id": "6698b984", "metadata": { "ploomber": { "memory_usage": 214.734375, "timestamp_end": 1691727396.821079, "timestamp_start": 1691727396.750513 }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 1.08 ms (started: 2023-08-11 14:16:36 +10:00)\n" ] } ], "source": [ "if tic_entry.lightcurve.len > 1e5:\n", " tic_entry.lightcurve.filter_non_transit_data(tic_entry.candidates)\n", "else:\n", " logger.info(\"Using the full lightcurve for analysis.\")" ] }, { "cell_type": "markdown", "id": "ba99a5cc", "metadata": { "lines_to_next_cell": 2 }, "source": [ "Plot of the lightcurve:" ] }, { "cell_type": "code", "execution_count": 6, "id": "df6538fc", "metadata": { "lines_to_next_cell": 0, "ploomber": { "memory_usage": 234.9140625, "timestamp_end": 1691727398.895523, "timestamp_start": 1691727396.821544 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 2 s (started: 2023-08-11 14:16:36 +10:00)\n" ] } ], "source": [ "plot_lightcurve(tic_entry, save=True)\n", "\n", "# Some diagnostics\n", "plot_raw_lightcurve(tic_entry, save=True)\n", "plot_raw_lightcurve(tic_entry, zoom_in=True, save=True)" ] }, { "cell_type": "markdown", "id": "23bf0381", "metadata": {}, "source": [ "![](toi_3114_files/flux_vs_time.png)" ] }, { "cell_type": "markdown", "id": "92e2eea0", "metadata": { "tags": [ "hide-cell" ] }, "source": [ "Diagnostic plots of the raw lightcurve (not applying sigma clipping/other cleaning methods to remove outliers). Some things to consider:\n", "- Do the initial fits from ExoFOP match the transits if visible?\n", "- If this is marked as a single-transit event, is there only 1 transit visible?\n", "\n", "![](toi_3114_files/diagnostic_raw_lc_plot.png)\n", "![](toi_3114_files/diagnostic_raw_lc_plot_zoom.png)" ] }, { "cell_type": "markdown", "id": "145cb607", "metadata": {}, "source": [ "## Fitting transit parameters\n", "Now that we have the data, we can define a Bayesian model to fit it.\n", "\n", "### The probabilistic model\n", "\n", "We use the probabilistic model as described in [Foreman-Mackey et al 2017] to determine the best parameters to fit the transits present in the lightcurve data.\n", "\n", "More explicitly, the stellar light curve $l(t; \\vec{\\theta})$ is modelled with a Gaussian Process (GP).\n", "A GP consists of a mean function $\\mu(t;\\vec{\\theta})$ and a kernel function $k_\\alpha(t,t';\\vec{\\theta})$, where $\\vec{\\theta}$ is the vector of parameters descibing the lightcurve and $t$ is the time during which the lightcurve is under observation\n", "\n", "The 8 parameters describing the lightcurve are\n", "$$\\vec{\\theta} = \\{d_i, t0_i, tmax_i, b_i, r_i, f0, u1, u2\\},$$\n", "where\n", "* $d_i$ transit durations for each planet,\n", "* $tmin_i$ time of first transit for each planet (reference time),\n", "* $tmax_i$ time of the last transit for each planet (a second reference time),\n", "* $b_i$ impact parameter for each planet,\n", "* $r_i$ planet radius in stellar radius for each planet,\n", "* $f0$ baseline relative flux of the light curve from star,\n", "* $u1$ $u2$ two parameters describing the limb-darkening profile of star.\n", "\n", "Note: if the observed data only records a single transit,\n", "we swap $tmax_i$ with $p_i$ (orbital periods for each planet).\n", "\n", "With this we can write\n", "$$l(t;\\vec{\\theta}) \\sim \\mathcal{GP} (\\mu(t;\\vec{\\theta}), k_\\alpha(t,t';\\vec{\\theta}))\\ .$$\n", "\n", "Here the mean and kernel functions are:\n", "* $\\mu(t;\\vec{\\theta})$: a limb-darkened transit light curve ([Kipping 2013])\n", "* $k_\\alpha(t,t';\\vec{\\theta}))$: a stochastically-driven, damped harmonic oscillator ([SHOTterm])\n", "\n", "\n", "Now that we have defined our transit model, we can implement it in python (toggle to show).\n", "\n", "[Foreman-Mackey et al 2017]: https://arxiv.org/pdf/1703.09710.pdf\n", "[Kipping 2013]: https://arxiv.org/abs/1308.0009\n", "[SHOTterm]: https://celerite2.readthedocs.io/en/latest/api/python/?highlight=SHOTerm#celerite2.terms.SHOTerm" ] }, { "cell_type": "code", "execution_count": 7, "id": "e1632350", "metadata": { "ploomber": { "memory_usage": 236.9375, "timestamp_end": 1691727399.012105, "timestamp_start": 1691727398.896129 }, "pycharm": { "name": "#%%\n" }, "tags": [ "def", "hide-cell" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 39.9 ms (started: 2023-08-11 14:16:38 +10:00)\n" ] } ], "source": [ "import aesara_theano_fallback.tensor as tt\n", "import exoplanet as xo\n", "import numpy as np\n", "import pymc3 as pm\n", "import pymc3_ext as pmx\n", "from celerite2.theano import GaussianProcess, terms\n", "\n", "DEPTH = \"depth\"\n", "DURATION = \"dur\"\n", "RADIUS_RATIO = \"r\"\n", "TIME_START = \"tmin\"\n", "TIME_END = \"tmax\"\n", "ORBITAL_PERIOD = \"p\"\n", "MEAN_FLUX = \"f0\"\n", "LC_JITTER = \"jitter\"\n", "GP_RHO = \"rho\"\n", "GP_SIGMA = \"sigma\"\n", "RHO_CIRC = \"rho_circ\" # stellar density at e=0\n", "LIMB_DARKENING_PARAM = \"u\"\n", "IMPACT_PARAM = \"b\"\n", "\n", "\n", "def get_test_duration(min_durations, max_durations, durations):\n", " largest_min_duration = np.amax(\n", " np.array([durations, 2 * min_durations]), axis=0\n", " )\n", " smallest_max_duration = np.amin(\n", " np.array([largest_min_duration, 0.99 * max_durations]), axis=0\n", " )\n", " return smallest_max_duration\n", "\n", "\n", "def build_planet_transit_model(tic_entry):\n", " t = tic_entry.lightcurve.time\n", " y = tic_entry.lightcurve.flux\n", " yerr = tic_entry.lightcurve.flux_err\n", "\n", " n = tic_entry.planet_count\n", " tmins = np.array([planet.tmin for planet in tic_entry.candidates])\n", " depths = np.array([planet.depth for planet in tic_entry.candidates])\n", " durations = np.array([planet.duration for planet in tic_entry.candidates])\n", " max_durations = np.array(\n", " [planet.duration_max for planet in tic_entry.candidates]\n", " )\n", " min_durations = np.array(\n", " [planet.duration_min for planet in tic_entry.candidates]\n", " )\n", " test_duration = get_test_duration(min_durations, max_durations, durations)\n", "\n", " with pm.Model() as my_planet_transit_model:\n", " ## define planet parameters\n", "\n", " # 1) d: transit duration (duration of eclipse)\n", " d_priors = pm.Bound(\n", " pm.Lognormal, lower=min_durations, upper=max_durations\n", " )(\n", " name=DURATION,\n", " mu=np.log(durations),\n", " sigma=np.log(1.2),\n", " shape=n,\n", " testval=test_duration,\n", " )\n", "\n", " # 2) r: radius ratio (planet radius / star radius)\n", " r_priors = pm.Lognormal(\n", " name=RADIUS_RATIO, mu=0.5 * np.log(depths * 1e-3), sd=1.0, shape=n\n", " )\n", " # 3) b: impact parameter\n", " b_priors = xo.distributions.ImpactParameter(\n", " name=IMPACT_PARAM, ror=r_priors, shape=n\n", " )\n", " planet_priors = [r_priors, d_priors, b_priors]\n", "\n", " ## define orbit-timing parameters\n", "\n", " # 1) tmin: the time of the first transit in data (a reference time)\n", " tmin_norm = pm.Bound(\n", " pm.Normal, lower=tmins - max_durations, upper=tmins + max_durations\n", " )\n", " tmin_priors = tmin_norm(\n", " TIME_START, mu=tmins, sigma=0.5 * durations, shape=n, testval=tmins\n", " )\n", "\n", " # 2) period: the planets' orbital period\n", " p_params, p_priors_list, tmax_priors_list = [], [], []\n", " for n, planet in enumerate(tic_entry.candidates):\n", " # if only one transit in data we use the period\n", " if planet.has_data_only_for_single_transit:\n", " p_prior = pm.Pareto(\n", " name=f\"{ORBITAL_PERIOD}_{planet.index}\",\n", " m=planet.period_min,\n", " alpha=2.0 / 3.0,\n", " testval=planet.period,\n", " )\n", " p_param = p_prior\n", " tmax_prior = planet.tmin\n", " # if more than one transit in data we use a second time reference (tmax)\n", " else:\n", " tmax_norm = pm.Bound(\n", " pm.Normal,\n", " lower=planet.tmax - planet.duration_max,\n", " upper=planet.tmax + planet.duration_max,\n", " )\n", " tmax_prior = tmax_norm(\n", " name=f\"{TIME_END}_{planet.index}\",\n", " mu=planet.tmax,\n", " sigma=0.5 * planet.duration,\n", " testval=planet.tmax,\n", " )\n", " p_prior = (tmax_prior - tmin_priors[n]) / planet.num_periods\n", " p_param = tmax_prior\n", "\n", " p_params.append(p_param) # the param needed to calculate p\n", " p_priors_list.append(p_prior)\n", " tmax_priors_list.append(tmax_prior)\n", "\n", " p_priors = pm.Deterministic(ORBITAL_PERIOD, tt.stack(p_priors_list))\n", " tmax_priors = pm.Deterministic(TIME_END, tt.stack(tmax_priors_list))\n", "\n", " ## define stellar parameters\n", "\n", " # 1) f0: the mean flux from the star\n", " f0_prior = pm.Normal(name=MEAN_FLUX, mu=0.0, sd=10.0)\n", "\n", " # 2) u1, u2: limb darkening parameters\n", " u_prior = xo.distributions.QuadLimbDark(\"u\")\n", " stellar_priors = [f0_prior, u_prior]\n", "\n", " ## define k(t, t1; parameters)\n", " jitter_prior = pm.InverseGamma(\n", " name=LC_JITTER, **pmx.estimate_inverse_gamma_parameters(1.0, 5.0)\n", " )\n", " sigma_prior = pm.InverseGamma(\n", " name=GP_SIGMA, **pmx.estimate_inverse_gamma_parameters(1.0, 5.0)\n", " )\n", " rho_prior = pm.InverseGamma(\n", " name=GP_RHO, **pmx.estimate_inverse_gamma_parameters(0.5, 10.0)\n", " )\n", " kernel = terms.SHOTerm(sigma=sigma_prior, rho=rho_prior, Q=0.3)\n", " noise_priors = [jitter_prior, sigma_prior, rho_prior]\n", "\n", " ## define the lightcurve model mu(t;paramters)\n", " orbit = xo.orbits.KeplerianOrbit(\n", " period=p_priors,\n", " t0=tmin_priors,\n", " b=b_priors,\n", " duration=d_priors,\n", " ror=r_priors,\n", " )\n", " star = xo.LimbDarkLightCurve(u_prior)\n", " lightcurve_models = star.get_light_curve(orbit=orbit, r=r_priors, t=t)\n", " lightcurve = 1e3 * pm.math.sum(lightcurve_models, axis=-1) + f0_prior\n", " my_planet_transit_model.lightcurve_models = lightcurve_models\n", " rho_circ = pm.Deterministic(name=RHO_CIRC, var=orbit.rho_star)\n", "\n", " # Finally the GP likelihood\n", " residual = y - lightcurve\n", " gp_kwargs = dict(diag=yerr**2 + jitter_prior**2, quiet=True)\n", " gp = GaussianProcess(kernel, t, **gp_kwargs)\n", " gp.marginal(name=\"obs\", observed=residual)\n", " my_planet_transit_model.gp_mu = gp.predict(residual, return_var=False)\n", "\n", " # cache params\n", " my_params = dict(\n", " planet_params=planet_priors,\n", " noise_params=noise_priors,\n", " stellar_params=stellar_priors,\n", " period_params=p_params,\n", " )\n", " return my_planet_transit_model, my_params" ] }, { "cell_type": "code", "execution_count": 8, "id": "14030d1b", "metadata": { "lines_to_end_of_cell_marker": 2, "ploomber": { "memory_usage": 263.078125, "timestamp_end": 1691727606.960698, "timestamp_start": 1691727399.012704 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 3min 27s (started: 2023-08-11 14:16:39 +10:00)\n" ] } ], "source": [ "planet_transit_model, params = build_planet_transit_model(tic_entry)\n", "model_varnames = get_untransformed_varnames(planet_transit_model)\n", "test_model(planet_transit_model)" ] }, { "cell_type": "markdown", "id": "2dd3941a", "metadata": {}, "source": [ "### Optimizing the initial point for sampling\n", "We help out the sampler we try to find an optimized set of initial parameters to begin sampling from." ] }, { "cell_type": "code", "execution_count": 9, "id": "b3bd6f74", "metadata": { "ploomber": { "memory_usage": 263.078125, "timestamp_end": 1691727607.044851, "timestamp_start": 1691727606.961898 }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 1.01 ms (started: 2023-08-11 14:20:07 +10:00)\n" ] } ], "source": [ "if tic_entry.optimized_params is None:\n", " init_params = get_optimized_init_params(planet_transit_model, **params)\n", " tic_entry.save_data(optimized_params=init_params)\n", "else:\n", " init_params = tic_entry.optimized_params.to_dict()" ] }, { "cell_type": "code", "execution_count": 10, "id": "8e6531eb", "metadata": { "ploomber": { "memory_usage": 274.0, "timestamp_end": 1691727609.164817, "timestamp_start": 1691727607.045324 }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 2.04 s (started: 2023-08-11 14:20:07 +10:00)\n" ] }, { "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", "
Test Pointlog P(test-point)
dur_interval__-2.2290.25
r_log__-2.348-0.92
b_impact__-0.175-1.56
tmin_interval__0.01.38
tmax_1_interval__0.01.38
f00.0-3.22
u_quadlimbdark__0.0-2.78
jitter_log__0.556-19.94
sigma_log__0.556-6.06
rho_log__0.053-1.99
obsNaN-45804.69
\n", "
" ], "text/plain": [ " Test Point log P(test-point)\n", "dur_interval__ -2.229 0.25\n", "r_log__ -2.348 -0.92\n", "b_impact__ -0.175 -1.56\n", "tmin_interval__ 0.0 1.38\n", "tmax_1_interval__ 0.0 1.38\n", "f0 0.0 -3.22\n", "u_quadlimbdark__ 0.0 -2.78\n", "jitter_log__ 0.556 -19.94\n", "sigma_log__ 0.556 -6.06\n", "rho_log__ 0.053 -1.99\n", "obs NaN -45804.69" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# sanity check that none of the right hand column have nans!\n", "test_model(planet_transit_model, init_params, show_summary=True)" ] }, { "cell_type": "markdown", "id": "3994dd75", "metadata": {}, "source": [ "Below are plots of our initial model and priors.\n", "\n", "### Initial model fit" ] }, { "cell_type": "code", "execution_count": 11, "id": "05327e7b", "metadata": { "ploomber": { "memory_usage": 277.484375, "timestamp_end": 1691727614.11499, "timestamp_start": 1691727609.165411 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 4.87 s (started: 2023-08-11 14:20:09 +10:00)\n" ] } ], "source": [ "initial_lc_models = (\n", " compute_variable(\n", " model=planet_transit_model,\n", " samples=[[init_params[n] for n in model_varnames]],\n", " target=planet_transit_model.lightcurve_models,\n", " )\n", " * 1e3\n", ")\n", "plot_lightcurve(\n", " tic_entry, initial_lc_models, save=\"lightcurve_with_initial_guess.png\"\n", ")\n", "plot_lightcurve(\n", " tic_entry,\n", " initial_lc_models,\n", " zoom_in=True,\n", " save=\"lightcurve_with_initial_guess_zoom.png\",\n", ")" ] }, { "cell_type": "markdown", "id": "b70dd181", "metadata": {}, "source": [ "\n", "![](toi_3114_files/lightcurve_with_initial_guess.png)" ] }, { "cell_type": "markdown", "id": "a6265dfd", "metadata": { "tags": [ "hide-cell" ] }, "source": [ "\n", "![](toi_3114_files/lightcurve_with_initial_guess_zoom.png)" ] }, { "cell_type": "code", "execution_count": 12, "id": "c08d7b47", "metadata": { "ploomber": { "memory_usage": 294.0078125, "timestamp_end": 1691727617.174747, "timestamp_start": 1691727614.115902 }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 2.98 s (started: 2023-08-11 14:20:14 +10:00)\n" ] } ], "source": [ "params = dict(\n", " tic_entry=tic_entry, model=planet_transit_model, initial_params=init_params\n", ")\n", "plot_phase(**params, save=\"phase_initial.png\")\n", "plot_phase(\n", " **params, plot_all_datapoints=True, save=\"phase_initial_all_datapoints.png\"\n", ")" ] }, { "cell_type": "markdown", "id": "6917412a", "metadata": {}, "source": [ "\n", "\n" ] }, { "cell_type": "markdown", "id": "7f4990b2", "metadata": { "tags": [ "hide-cell" ] }, "source": [ "Diagnostic phase plot\n", "" ] }, { "cell_type": "markdown", "id": "0cf069c3", "metadata": {}, "source": [ "### Histograms of Priors" ] }, { "cell_type": "code", "execution_count": 13, "id": "b519c62f", "metadata": { "lines_to_end_of_cell_marker": 2, "ploomber": { "memory_usage": 304.74609375, "timestamp_end": 1691727625.776338, "timestamp_start": 1691727617.175363 }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 8.52 s (started: 2023-08-11 14:20:17 +10:00)\n" ] } ], "source": [ "prior_samples = sample_prior(planet_transit_model)\n", "if prior_samples:\n", " plot_priors(tic_entry, prior_samples, init_params, save=True)" ] }, { "cell_type": "markdown", "id": "b58657ba", "metadata": {}, "source": [ "![](toi_3114_files/priors.png)" ] }, { "cell_type": "markdown", "id": "b3d8a122", "metadata": { "lines_to_next_cell": 2 }, "source": [ "\n", "### Sampling\n", "With the model and priors defined, we can begin sampling." ] }, { "cell_type": "code", "execution_count": 14, "id": "f25936e2", "metadata": { "ploomber": { "memory_usage": 304.74609375, "timestamp_end": 1691727625.872053, "timestamp_start": 1691727625.777162 }, "pycharm": { "name": "#%%\n" }, "tags": [ "def" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 1.13 ms (started: 2023-08-11 14:20:25 +10:00)\n" ] } ], "source": [ "def run_inference(model) -> InferenceData:\n", " np.random.seed(TOI_NUMBER)\n", " with model:\n", " sampling_kwargs = dict(tune=2000, draws=2000, chains=2, cores=2)\n", " logger.info(f\"Run sampler with kwargs: {sampling_kwargs}\")\n", " inference_data = pmx.sample(\n", " **sampling_kwargs, start=init_params, return_inferencedata=True\n", " )\n", " logger.info(\"Sampling completed!\")\n", " return inference_data" ] }, { "cell_type": "code", "execution_count": 15, "id": "1766f4c9", "metadata": { "ploomber": { "memory_usage": 304.75, "timestamp_end": 1691727626.031061, "timestamp_start": 1691727625.872546 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 79.8 ms (started: 2023-08-11 14:20:25 +10:00)\n" ] }, { "data": { "text/html": [ "\n", "
\n", "
\n", "
arviz.InferenceData
\n", "
\n", " \n", "
\n", " " ], "text/plain": [ "Inference data with groups:\n", "\t> posterior\n", "\t> log_likelihood\n", "\t> sample_stats" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "if tic_entry.inference_data is None:\n", " inference_data = run_inference(planet_transit_model)\n", " tic_entry.inference_data = inference_data\n", " tic_entry.save_data(inference_data=inference_data)\n", "else:\n", " logger.info(\"Using cached run\")\n", " inference_data = tic_entry.inference_data\n", "inference_data\n" ] }, { "cell_type": "markdown", "id": "f76eaad0", "metadata": {}, "source": [ "The `inference_data` object contains the posteriors and sampling metadata. Let's save it for future use, and take a look at summary statistics. Note: the _trace plot_ from sampling is hidden below." ] }, { "cell_type": "code", "execution_count": 16, "id": "48202eef", "metadata": { "lines_to_next_cell": 0, "ploomber": { "memory_usage": 304.00390625, "timestamp_end": 1691727626.326684, "timestamp_start": 1691727626.031795 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 216 ms (started: 2023-08-11 14:20:26 +10:00)\n" ] }, { "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", " \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", "
meansdhdi_3%hdi_97%mcse_meanmcse_sdess_bulkess_tailr_hat
f00.1470.615-1.0401.3570.0190.0141328.0986.01.0
dur[0]0.1030.0030.0970.1090.0000.0001083.0942.01.0
r[0]0.0970.0050.0860.1060.0000.000672.0523.01.0
b[0]0.6530.1480.3470.8320.0070.005704.0424.01.0
tmin[0]3041.1500.0013041.1483041.1520.0000.0002405.02350.01.0
tmax_13063.1850.0013063.1843063.1870.0000.0003122.02597.01.0
p[0]4.4070.0004.4074.4080.0000.0002622.02344.01.0
tmax[0]3063.1850.0013063.1843063.1870.0000.0003122.02597.01.0
u[0]0.7420.3270.0181.2160.0080.0061515.01498.01.0
u[1]0.0310.366-0.5900.6900.0090.0071745.01249.01.0
jitter0.4020.0370.3310.4700.0010.0003378.02253.01.0
sigma0.9530.3290.4771.5730.0090.0071683.01456.01.0
rho11.1778.8501.63428.8970.2490.1761701.01954.01.0
rho_circ[0]1.6940.6290.8023.0280.0270.021715.0452.01.0
\n", "
" ], "text/plain": [ " mean sd hdi_3% ... ess_bulk ess_tail r_hat\n", "f0 0.147 0.615 -1.040 ... 1328.0 986.0 1.0\n", "dur[0] 0.103 0.003 0.097 ... 1083.0 942.0 1.0\n", "r[0] 0.097 0.005 0.086 ... 672.0 523.0 1.0\n", "b[0] 0.653 0.148 0.347 ... 704.0 424.0 1.0\n", "tmin[0] 3041.150 0.001 3041.148 ... 2405.0 2350.0 1.0\n", "tmax_1 3063.185 0.001 3063.184 ... 3122.0 2597.0 1.0\n", "p[0] 4.407 0.000 4.407 ... 2622.0 2344.0 1.0\n", "tmax[0] 3063.185 0.001 3063.184 ... 3122.0 2597.0 1.0\n", "u[0] 0.742 0.327 0.018 ... 1515.0 1498.0 1.0\n", "u[1] 0.031 0.366 -0.590 ... 1745.0 1249.0 1.0\n", "jitter 0.402 0.037 0.331 ... 3378.0 2253.0 1.0\n", "sigma 0.953 0.329 0.477 ... 1683.0 1456.0 1.0\n", "rho 11.177 8.850 1.634 ... 1701.0 1954.0 1.0\n", "rho_circ[0] 1.694 0.629 0.802 ... 715.0 452.0 1.0\n", "\n", "[14 rows x 9 columns]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "summary(inference_data)" ] }, { "cell_type": "code", "execution_count": 17, "id": "dce3c09c", "metadata": { "ploomber": { "memory_usage": 310.7890625, "timestamp_end": 1691727630.597629, "timestamp_start": 1691727626.327233 }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 4.2 s (started: 2023-08-11 14:20:26 +10:00)\n" ] } ], "source": [ "plot_inference_trace(tic_entry, save=True)" ] }, { "cell_type": "markdown", "id": "cc97ae73", "metadata": { "tags": [ "hide-cell" ] }, "source": [ "![](toi_3114_files/diagnostic_trace_plot.png)" ] }, { "cell_type": "markdown", "id": "5602a0aa", "metadata": {}, "source": [ "## Results\n", "\n", "\n", "### Posterior plots\n", "Below are plots of the posterior probability distributions and the best-fitting light-curve model." ] }, { "cell_type": "code", "execution_count": 18, "id": "9123b1cc", "metadata": { "lines_to_next_cell": 0, "ploomber": { "memory_usage": 360.578125, "timestamp_end": 1691727635.633381, "timestamp_start": 1691727630.598219 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 4.96 s (started: 2023-08-11 14:20:30 +10:00)\n" ] } ], "source": [ "plot_posteriors(\n", " tic_entry, inference_data, initial_params=init_params, save=True\n", ")" ] }, { "cell_type": "markdown", "id": "df0efb92", "metadata": {}, "source": [ "\n", "![](toi_3114_files/posteriors.png)" ] }, { "cell_type": "code", "execution_count": 19, "id": "6ed84d3d", "metadata": { "ploomber": { "memory_usage": 358.92578125, "timestamp_end": 1691727645.041986, "timestamp_start": 1691727635.634002 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "peak memory: 396.07 MiB, increment: 0.14 MiB\n", "time: 9.33 s (started: 2023-08-11 14:20:35 +10:00)\n" ] } ], "source": [ "%%memit\n", "plot_phase(\n", " tic_entry,\n", " planet_transit_model,\n", " inference_data,\n", " initial_params=init_params,\n", " save=True,\n", ")" ] }, { "cell_type": "markdown", "id": "fc03cd47", "metadata": {}, "source": [ "\n", "" ] }, { "cell_type": "markdown", "id": "309f7432", "metadata": {}, "source": [ "### Eccentricity post-processing\n", "\n", "As discussed above, we fit this model assuming a circular orbit which speeds things up for a few reasons:\n", "1) `e=0` allows simpler orbital dynamics which are more computationally efficient (no need to solve Kepler's equation numerically)\n", "\n", "2) There are degeneracies between eccentricity, arrgument of periasteron, impact parameter, and planet radius. Hence by setting `e=0` and using the duration in calculating the planet's orbit, the sampler can perform better.\n", "\n", "To first order, the eccentricity mainly just changes the transit duration.\n", "This can be thought of as a change in the impled density of the star.\n", "Therefore, if the transit is fit using stellar density (or duration, in this case) as one of the parameters, it is possible to make an independent measurement of the stellar density, and in turn infer the eccentricity of the orbit as a post-processing step.\n", "The details of this eccentricity calculation method are described in [Dawson & Johnson (2012)].\n", "\n", "Here, if the TIC has associated stellar data, we use the method described above to obtain fits for the exoplanet's orbital eccentricity.\n", "\n", "[Dawson & Johnson (2012)]: https://arxiv.org/abs/1203.5537\n", "Note: a different stellar density parameter is required for each planet (if there is more than one planet)" ] }, { "cell_type": "code", "execution_count": 20, "id": "1834a675", "metadata": { "ploomber": { "memory_usage": 358.92578125, "timestamp_end": 1691727645.126681, "timestamp_start": 1691727645.04292 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 1.94 ms (started: 2023-08-11 14:20:45 +10:00)\n" ] }, { "data": { "text/html": [ "Stellar Info: \n", "" ], "text/plain": [ "" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "star = tic_entry.stellar_data\n", "star" ] }, { "cell_type": "code", "execution_count": 21, "id": "d87ae12b", "metadata": { "ploomber": { "memory_usage": 358.92578125, "timestamp_end": 1691727645.20767, "timestamp_start": 1691727645.127156 }, "tags": [ "remove-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 1.26 ms (started: 2023-08-11 14:20:45 +10:00)\n" ] } ], "source": [ "if star.density_data_present:\n", " logger.info(\n", " \"Stellar data present for TIC. Continuing with eccentricity calculations.\"\n", " )\n", "else:\n", " logger.info(\n", " \"Stellar data not present for TIC. Skipping eccentricity calculations.\"\n", " )" ] }, { "cell_type": "code", "execution_count": 22, "id": "7de320f6", "metadata": { "lines_to_next_cell": 0, "ploomber": { "memory_usage": 358.67578125, "timestamp_end": 1691727645.825483, "timestamp_start": 1691727645.208264 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 540 ms (started: 2023-08-11 14:20:45 +10:00)\n" ] } ], "source": [ "if star.density_data_present:\n", " ecc_samples = calculate_eccentricity_weights(tic_entry, inference_data)\n", " ecc_samples.to_csv(\n", " os.path.join(tic_entry.outdir, \"eccentricity_samples.csv\"), index=False\n", " )\n", " plot_eccentricity_posteriors(tic_entry, ecc_samples, save=True)" ] }, { "cell_type": "markdown", "id": "6dd971bf", "metadata": {}, "source": [ "\n", "![](toi_3114_files/eccentricity_posteriors.png)" ] }, { "cell_type": "markdown", "id": "962d29ae", "metadata": {}, "source": [ "### Diagnostics\n", "Finally, we also generate some diagnostic plots." ] }, { "cell_type": "code", "execution_count": 23, "id": "79c49c13", "metadata": { "lines_to_next_cell": 0, "ploomber": { "memory_usage": 329.29296875, "timestamp_end": 1691727654.583226, "timestamp_start": 1691727645.826227 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "remove-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time: 8.68 s (started: 2023-08-11 14:20:45 +10:00)\n" ] } ], "source": [ "plot_diagnostics(tic_entry, planet_transit_model, init_params, save=True)" ] }, { "cell_type": "markdown", "id": "81e67e02", "metadata": { "tags": [ "hide-cell" ] }, "source": [ "\n", "\n", "![](toi_3114_files/diagnostic_flux_vs_time_zoom.png)" ] }, { "cell_type": "markdown", "id": "92aed4c1", "metadata": {}, "source": [ "## Citations\n", "\n", "We hope this has been helpful! The TESS-Atlas was built using exoplanet, PyMC3, lightkurve, starry, celerite2, ExoFOP, and Sphinx.\n", "\n", "We would greatly appreciate you citing this work and its dependencies.\n", "\n", "### LaTeX acknowledgement and bibliography" ] }, { "cell_type": "code", "execution_count": 24, "id": "d7cfd2f4", "metadata": { "ploomber": { "memory_usage": 329.29296875, "timestamp_end": 1691727654.667031, "timestamp_start": 1691727654.583777 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "output_scroll" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This research made use of the \\textsf{TESS-Atlas} and its dependencies\n", "\\citep{exoplanet:joss, exoplanet:zenodo, celerite2:foremanmackey17,\n", "celerite2:foremanmackey18, exoplanet:agol20, exoplanet:arviz,\n", "exoplanet:astropy13, exoplanet:astropy18, exoplanet:kipping13,\n", "exoplanet:luger18, exoplanet:pymc3, exoplanet:theano}.\n", "\n", "time: 3.72 ms (started: 2023-08-11 14:20:54 +10:00)\n" ] } ], "source": [ "from tess_atlas import citations\n", "\n", "citations.print_acknowledgements()" ] }, { "cell_type": "code", "execution_count": 25, "id": "61c16b65", "metadata": { "ploomber": { "memory_usage": 329.29296875, "timestamp_end": 1691727654.748709, "timestamp_start": 1691727654.667509 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "output_scroll" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "@article{exoplanet:joss,\n", " author = {{Foreman-Mackey}, Daniel and {Luger}, Rodrigo and {Agol}, Eric\n", " and {Barclay}, Thomas and {Bouma}, Luke G. and {Brandt},\n", " Timothy D. and {Czekala}, Ian and {David}, Trevor J. and\n", " {Dong}, Jiayin and {Gilbert}, Emily A. and {Gordon}, Tyler A.\n", " and {Hedges}, Christina and {Hey}, Daniel R. and {Morris},\n", " Brett M. and {Price-Whelan}, Adrian M. and {Savel}, Arjun B.},\n", " title = \"{exoplanet: Gradient-based probabilistic inference for\n", " exoplanet data \\& other astronomical time series}\",\n", " journal = {arXiv e-prints},\n", " year = 2021,\n", " month = may,\n", " eid = {arXiv:2105.01994},\n", " pages = {arXiv:2105.01994},\n", "archivePrefix = {arXiv},\n", " eprint = {2105.01994},\n", " primaryClass = {astro-ph.IM},\n", " adsurl = {https://ui.adsabs.harvard.edu/abs/2021arXiv210501994F},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "@misc{exoplanet:zenodo,\n", " author = {Daniel Foreman-Mackey and Arjun Savel and Rodrigo Luger and\n", " Eric Agol and Ian Czekala and Adrian Price-Whelan and\n", " Christina Hedges and Emily Gilbert and Luke Bouma\n", " and Timothy D. Brandt and Tom Barclay},\n", " title = {exoplanet-dev/exoplanet v0.5.1},\n", " month = jun,\n", " year = 2021,\n", " doi = {10.5281/zenodo.1998447},\n", " url = {https://doi.org/10.5281/zenodo.1998447}\n", "}\n", "\n", "\n", "@article{exoplanet:pymc3,\n", " title={Probabilistic programming in Python using PyMC3},\n", " author={Salvatier, John and Wiecki, Thomas V and Fonnesbeck, Christopher},\n", " journal={PeerJ Computer Science},\n", " volume={2},\n", " pages={e55},\n", " year={2016},\n", "publisher={PeerJ Inc.}\n", "}\n", "\n", "\n", "@article{exoplanet:theano,\n", " title=\"{Theano: A {Python} framework for fast computation of mathematical\n", " expressions}\",\n", " author={{Theano Development Team}},\n", " journal={arXiv e-prints},\n", " volume={abs/1605.02688},\n", " year=2016,\n", " month=may,\n", " url={http://arxiv.org/abs/1605.02688}\n", "}\n", "\n", "\n", "@article{exoplanet:arviz,\n", " title={{ArviZ} a unified library for exploratory analysis of {Bayesian}\n", " models in {Python}},\n", " author={Kumar, Ravin and Carroll, Colin and Hartikainen, Ari and Martin,\n", " Osvaldo A.},\n", " journal={The Journal of Open Source Software},\n", " year=2019,\n", " doi={10.21105/joss.01143},\n", " url={http://joss.theoj.org/papers/10.21105/joss.01143}\n", "}\n", "\n", "\n", "@ARTICLE{exoplanet:kipping13,\n", " author = {{Kipping}, D.~M.},\n", " title = \"{Efficient, uninformative sampling of limb darkening coefficients\n", " for two-parameter laws}\",\n", " journal = {\\mnras},\n", " year = 2013,\n", " month = nov,\n", " volume = 435,\n", " pages = {2152-2160},\n", " doi = {10.1093/mnras/stt1435},\n", " adsurl = {http://adsabs.harvard.edu/abs/2013MNRAS.435.2152K},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "\n", "@article{exoplanet:astropy13,\n", " author = {{Astropy Collaboration} and {Robitaille}, T.~P. and {Tollerud},\n", " E.~J. and {Greenfield}, P. and {Droettboom}, M. and {Bray}, E. and\n", " {Aldcroft}, T. and {Davis}, M. and {Ginsburg}, A. and\n", " {Price-Whelan}, A.~M. and {Kerzendorf}, W.~E. and {Conley}, A. and\n", " {Crighton}, N. and {Barbary}, K. and {Muna}, D. and {Ferguson}, H.\n", " and {Grollier}, F. and {Parikh}, M.~M. and {Nair}, P.~H. and\n", " {Unther}, H.~M. and {Deil}, C. and {Woillez}, J. and {Conseil}, S.\n", " and {Kramer}, R. and {Turner}, J.~E.~H. and {Singer}, L. and\n", " {Fox}, R. and {Weaver}, B.~A. and {Zabalza}, V. and {Edwards},\n", " Z.~I. and {Azalee Bostroem}, K. and {Burke}, D.~J. and {Casey},\n", " A.~R. and {Crawford}, S.~M. and {Dencheva}, N. and {Ely}, J. and\n", " {Jenness}, T. and {Labrie}, K. and {Lim}, P.~L. and\n", " {Pierfederici}, F. and {Pontzen}, A. and {Ptak}, A. and {Refsdal},\n", " B. and {Servillat}, M. and {Streicher}, O.},\n", " title = \"{Astropy: A community Python package for astronomy}\",\n", " journal = {\\aap},\n", " year = 2013,\n", " month = oct,\n", " volume = 558,\n", " pages = {A33},\n", " doi = {10.1051/0004-6361/201322068},\n", " adsurl = {http://adsabs.harvard.edu/abs/2013A%26A...558A..33A},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "@article{exoplanet:astropy18,\n", " author = {{Astropy Collaboration} and {Price-Whelan}, A.~M. and\n", " {Sip{\\H o}cz}, B.~M. and {G{\\\"u}nther}, H.~M. and {Lim}, P.~L. and\n", " {Crawford}, S.~M. and {Conseil}, S. and {Shupe}, D.~L. and\n", " {Craig}, M.~W. and {Dencheva}, N. and {Ginsburg}, A. and\n", " {VanderPlas}, J.~T. and {Bradley}, L.~D. and\n", " {P{\\'e}rez-Su{\\'a}rez}, D. and {de Val-Borro}, M.\n", " and {Aldcroft}, T.~L. and {Cruz}, K.~L. and {Robitaille}, T.~P.\n", " and {Tollerud}, E.~J. and {Ardelean}, C. and {Babej}, T. and\n", " {Bach}, Y.~P. and {Bachetti}, M. and {Bakanov}, A.~V. and\n", " {Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and\n", " {Baumbach}, A. and {Berry}, K.~L. and {Biscani}, F. and\n", " {Boquien}, M. and {Bostroem}, K.~A. and {Bouma}, L.~G. and\n", " {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and\n", " {Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and\n", " {Cano Rodr{\\'{\\i}}guez}, J.~L. and {Cara}, M. and {Cardoso},\n", " J.~V.~M. and {Cheedella}, S. and {Copin}, Y. and {Corrales}, L.\n", " and {Crichton}, D. and {D'Avella}, D. and {Deil}, C. and\n", " {Depagne}, {\\'E}. and {Dietrich}, J.~P. and {Donath}, A. and\n", " {Droettboom}, M. and {Earl}, N. and {Erben}, T. and {Fabbro}, S.\n", " and {Ferreira}, L.~A. and {Finethy}, T. and {Fox}, R.~T. and\n", " {Garrison}, L.~H. and {Gibbons}, S.~L.~J. and {Goldstein}, D.~A.\n", " and {Gommers}, R. and {Greco}, J.~P. and {Greenfield}, P. and\n", " {Groener}, A.~M. and {Grollier}, F. and {Hagen}, A. and {Hirst},\n", " P. and {Homeier}, D. and {Horton}, A.~J. and {Hosseinzadeh}, G.\n", " and {Hu}, L. and {Hunkeler}, J.~S. and {Ivezi{\\'c}}, {\\v Z}. and\n", " {Jain}, A. and {Jenness}, T. and {Kanarek}, G. and {Kendrew}, S.\n", " and {Kern}, N.~S. and {Kerzendorf}, W.~E. and {Khvalko}, A. and\n", " {King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and {Kumar}, A.\n", " and {Lee}, A. and {Lenz}, D. and {Littlefair}, S.~P. and {Ma},\n", " Z. and {Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C.\n", " and {Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and\n", " {Mumford}, S.~J. and {Muna}, D. and {Murphy}, N.~A. and {Nelson},\n", " S. and {Nguyen}, G.~H. and {Ninan}, J.~P. and {N{\\\"o}the}, M. and\n", " {Ogaz}, S. and {Oh}, S. and {Parejko}, J.~K. and {Parley}, N. and\n", " {Pascual}, S. and {Patil}, R. and {Patil}, A.~A. and {Plunkett},\n", " A.~L. and {Prochaska}, J.~X. and {Rastogi}, T. and {Reddy Janga},\n", " V. and {Sabater}, J. and {Sakurikar}, P. and {Seifert}, M. and\n", " {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and {Shih}, A.~Y. and\n", " {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and\n", " {Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and\n", " {Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and\n", " {Thomas}, S.~W. and {Tremblay}, G.~R. and {Turner}, J.~E.~H. and\n", " {Terr{\\'o}n}, V. and {van Kerkwijk}, M.~H. and {de la Vega}, A.\n", " and {Watkins}, L.~L. and {Weaver}, B.~A. and {Whitmore}, J.~B. and\n", " {Woillez}, J. and {Zabalza}, V. and {Astropy Contributors}},\n", " title = \"{The Astropy Project: Building an Open-science Project and Status\n", " of the v2.0 Core Package}\",\n", " journal = {\\aj},\n", " year = 2018,\n", " month = sep,\n", " volume = 156,\n", " pages = {123},\n", " doi = {10.3847/1538-3881/aabc4f},\n", " adsurl = {http://adsabs.harvard.edu/abs/2018AJ....156..123A},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "\n", "@article{exoplanet:luger18,\n", " author = {{Luger}, R. and {Agol}, E. and {Foreman-Mackey}, D. and {Fleming},\n", " D.~P. and {Lustig-Yaeger}, J. and {Deitrick}, R.},\n", " title = \"{starry: Analytic Occultation Light Curves}\",\n", " journal = {\\aj},\n", " year = 2019,\n", " month = feb,\n", " volume = 157,\n", " pages = {64},\n", " doi = {10.3847/1538-3881/aae8e5},\n", " adsurl = {http://adsabs.harvard.edu/abs/2019AJ....157...64L},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "@article{exoplanet:agol20,\n", " author = {{Agol}, Eric and {Luger}, Rodrigo and {Foreman-Mackey}, Daniel},\n", " title = \"{Analytic Planetary Transit Light Curves and Derivatives for\n", " Stars with Polynomial Limb Darkening}\",\n", " journal = {\\aj},\n", " year = 2020,\n", " month = mar,\n", " volume = {159},\n", " number = {3},\n", " pages = {123},\n", " doi = {10.3847/1538-3881/ab4fee},\n", " adsurl = {https://ui.adsabs.harvard.edu/abs/2020AJ....159..123A},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "\n", "@article{exoplanet:foremanmackey17,\n", " author = {{Foreman-Mackey}, D. and {Agol}, E. and {Ambikasaran}, S. and\n", " {Angus}, R.},\n", " title = \"{Fast and Scalable Gaussian Process Modeling with Applications to\n", " Astronomical Time Series}\",\n", " journal = {\\aj},\n", " year = 2017,\n", " month = dec,\n", " volume = 154,\n", " pages = {220},\n", " doi = {10.3847/1538-3881/aa9332},\n", " adsurl = {http://adsabs.harvard.edu/abs/2017AJ....154..220F},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "@article{exoplanet:foremanmackey18,\n", " author = {{Foreman-Mackey}, D.},\n", " title = \"{Scalable Backpropagation for Gaussian Processes using Celerite}\",\n", " journal = {Research Notes of the American Astronomical Society},\n", " year = 2018,\n", " month = feb,\n", " volume = 2,\n", " number = 1,\n", " pages = {31},\n", " doi = {10.3847/2515-5172/aaaf6c},\n", " adsurl = {http://adsabs.harvard.edu/abs/2018RNAAS...2a..31F},\n", " adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n", "}\n", "\n", "time: 1.29 ms (started: 2023-08-11 14:20:54 +10:00)\n" ] } ], "source": [ "citations.print_bibliography()" ] }, { "cell_type": "markdown", "id": "ec5c7f10", "metadata": {}, "source": [ "### Packages used\n" ] }, { "cell_type": "code", "execution_count": 26, "id": "981f1027", "metadata": { "ploomber": { "memory_usage": 329.29296875, "timestamp_end": 1691727654.829642, "timestamp_start": 1691727654.749366 }, "pycharm": { "name": "#%%\n" }, "tags": [ "exe", "output_scroll" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "zipp==3.6.0\n", "xarray==0.19.0\n", "widgetsnbextension==3.5.1\n", "wheel==0.37.0\n", "websocket-client==1.2.1\n", "webencodings==0.5.1\n", "wcwidth==0.2.5\n", "virtualenv==20.8.1\n", "urllib3==1.26.7\n", "uncertainties==3.1.6\n", "uc-micro-py==1.0.1\n", "typing-extensions==3.10.0.2\n", "traitlets==5.1.0\n", "tqdm==4.62.3\n", "tornado==6.1\n", "tomli==1.2.1\n", "toml==0.10.2\n", "tinycss2==1.2.1\n", "threadpoolctl==3.0.0\n", "Theano-PyMC==1.1.2\n", "testpath==0.5.0\n", "testbook==0.4.2\n", "tess-atlas==0.2.1.dev314+ge1761e8\n", "terminado==0.12.1\n", "tenacity==8.0.1\n", "tar-progress==1.3.3\n", "tabulate==0.8.10\n", "tables==3.7.0\n", "StrEnum==0.4.15\n", "SQLAlchemy==1.4.26\n", "sphinxcontrib-serializinghtml==1.1.5\n", "sphinxcontrib-qthelp==1.0.3\n", "sphinxcontrib-jsmath==1.0.1\n", "sphinxcontrib-htmlhelp==2.0.0\n", "sphinxcontrib-devhelp==1.0.2\n", "sphinxcontrib-bibtex==2.2.1\n", "sphinxcontrib-applehelp==1.0.2\n", "Sphinx==5.0.2\n", "sphinx-toolbox==3.1.2\n", "sphinx-togglebutton==0.2.2\n", "sphinx-thebe==0.2.1\n", "sphinx-tabs==1.2.1\n", "sphinx-remove-toctrees==0.0.3\n", "sphinx-prompt==1.5.0\n", "sphinx-panels==0.6.0\n", "sphinx-multitoc-numbering==0.1.3\n", "sphinx-jupyterbook-latex==0.5.2\n", "sphinx-jinja2-compat==0.1.2\n", "sphinx-external-toc==0.3.1\n", "sphinx-design==0.3.0\n", "sphinx-copybutton==0.4.0\n", "sphinx-comments==0.0.3\n", "sphinx-collapse==0.1.2\n", "sphinx-book-theme==1.0.1\n", "sphinx-autodoc-typehints==1.18.3\n", "soupsieve==2.2.1\n", "snowballstemmer==2.1.0\n", "sniffio==1.2.0\n", "smmap==4.0.0\n", "six==1.16.0\n", "setuptools==47.1.0\n", "Send2Trash==1.8.0\n", "semver==2.13.0\n", "SecretStorage==3.3.1\n", "seaborn==0.11.2\n", "scipy==1.7.1\n", "scikit-learn==1.0\n", "SciencePlots==1.0.9\n", "ruamel.yaml==0.17.21\n", "ruamel.yaml.clib==0.2.6\n", "requests==2.26.0\n", "requests-unixsocket==0.2.0\n", "regex==2021.10.21\n", "pyzmq==22.3.0\n", "PyYAML==6.0\n", "pyvo==1.1\n", "pytz==2021.3\n", "python-dateutil==2.8.2\n", "pytest==7.4.0\n", "pytest-cov==4.1.0\n", "pyrsistent==0.18.0\n", "pyparsing==2.4.7\n", "Pympler==1.0.1\n", "pymc3==3.11.4\n", "pymc3-ext==0.1.0\n", "Pygments==2.15.1\n", "pyflakes==2.4.0\n", "pyerfa==2.0.0\n", "pydmove==1.1\n", "pydata-sphinx-theme==0.13.3\n", "pycparser==2.20\n", "pycodestyle==2.8.0\n", "pybtex==0.24.0\n", "pybtex-docutils==1.0.1\n", "py==1.10.0\n", "ptyprocess==0.7.0\n", "psutil==5.9.1\n", "prompt-toolkit==3.0.20\n", "prometheus-client==0.11.0\n", "pretty-jupyter==2.0.5\n", "posthog==3.0.1\n", "pluggy==1.0.0\n", "plotly==5.3.1\n", "ploomber-engine==0.0.30\n", "ploomber-core==0.2.12\n", "platformdirs==2.4.0\n", "pip==23.2.1\n", "Pillow==8.4.0\n", "pikepdf==5.1.3\n", "pickleshare==0.7.5\n", "pexpect==4.8.0\n", "patsy==0.5.2\n", "pathspec==0.9.0\n", "parso==0.8.2\n", "pandocfilters==1.5.0\n", "pandas==1.3.4\n", "packaging==21.0\n", "opencv-python==4.6.0.66\n", "oktopus==0.1.2\n", "numpy==1.21.3\n", "numexpr==2.8.3\n", "notebook==6.4.5\n", "nodeenv==1.6.0\n", "netCDF4==1.5.7\n", "nest-asyncio==1.5.1\n", "nbformat==5.1.3\n", "nbdime==3.1.0\n", "nbconvert==6.5.4\n", "nbclient==0.5.4\n", "natsort==8.1.0\n", "myst-parser==0.18.1\n", "myst-nb==0.17.2\n", "mypy-extensions==0.4.3\n", "msgpack==1.0.4\n", "monotonic==1.6\n", "mock==4.0.3\n", "mistune==0.8.4\n", "mimeparse==0.1.3\n", "memory-profiler==0.60.0\n", "memoization==0.4.0\n", "mdit-py-plugins==0.3.5\n", "mccabe==0.6.1\n", "matplotlib==3.4.3\n", "matplotlib-inline==0.1.3\n", "MarkupSafe==2.0.1\n", "markdown-it-py==1.1.0\n", "lxml==4.6.4\n", "lockfile==0.12.2\n", "linkify-it-py==2.0.2\n", "lightkurve==2.0.11\n", "latexcodec==2.0.1\n", "kiwisolver==1.3.2\n", "keyring==23.2.1\n", "jupytext==1.11.5\n", "jupyterlab-widgets==1.0.2\n", "jupyterlab-pygments==0.2.2\n", "jupyter-sphinx==0.3.2\n", "jupyter-server==1.11.1\n", "jupyter-server-mathjax==0.2.3\n", "jupyter-resource-usage==0.6.1\n", "jupyter-nbextensions-configurator==0.4.1\n", "jupyter-latex-envs==1.4.6\n", "jupyter-highlight-selected-word==0.2.0\n", "jupyter-core==4.8.1\n", "jupyter-contrib-nbextensions==0.5.1\n", "jupyter-contrib-core==0.3.3\n", "jupyter-client==6.1.12\n", "jupyter-cache==0.6.1\n", "jupyter-book==0.15.1\n", "jsonschema==3.2.0\n", "joblib==1.1.0\n", "Jinja2==3.0.2\n", "jeepney==0.7.1\n", "jedi==0.18.0\n", "itables==1.5.3\n", "isort==5.9.3\n", "ipywidgets==7.6.5\n", "ipython==7.28.0\n", "ipython-genutils==0.2.0\n", "ipykernel==6.4.2\n", "interruptingcow==0.8\n", "iniconfig==1.1.1\n", "importlib-resources==5.3.0\n", "importlib-metadata==4.8.1\n", "img2pdf==0.4.4\n", "imagesize==1.4.1\n", "idna==3.3\n", "identify==2.3.0\n", "html5lib==1.1\n", "h5py==3.7.0\n", "greenlet==1.1.2\n", "GitPython==3.1.24\n", "gitdb==4.0.7\n", "future==0.18.2\n", "flake8==4.0.1\n", "filelock==3.3.1\n", "fbpca==1.0\n", "fastprogress==1.0.0\n", "exoplanet==0.5.1\n", "exoplanet-core==0.1.2\n", "exceptiongroup==1.1.2\n", "enum34==1.1.10\n", "entrypoints==0.3\n", "emcee==3.1.2\n", "dynesty==1.0.1\n", "domdf-python-tools==3.3.0\n", "docutils==0.16\n", "distlib==0.3.3\n", "dill==0.3.4\n", "dict2css==0.3.0\n", "defusedxml==0.7.1\n", "decorator==5.1.0\n", "debugpy==1.5.1\n", "debuglater==1.4.4\n", "cycler==0.10.0\n", "cssutils==2.5.0\n", "cryptography==35.0.0\n", "coverage==7.2.7\n", "corner==2.2.1\n", "colorama==0.4.4\n", "click==7.1.2\n", "charset-normalizer==2.0.7\n", "cftime==1.5.1\n", "cfgv==3.3.1\n", "cffi==1.15.0\n", "certifi==2021.10.8\n", "Cerberus==1.3.4\n", "celerite2==0.2.0\n", "cachetools==4.2.4\n", "CacheControl==0.12.11\n", "pre-commit==2.15.0\n", "bokeh==2.4.1\n", "bleach==4.1.0\n", "black==21.9b0\n", "bilby==1.1.5\n", "beautifulsoup4==4.10.0\n", "backports.entry-points-selectable==1.1.0\n", "backoff==2.2.1\n", "backcall==0.2.0\n", "Babel==2.9.1\n", "autograd==1.3\n", "autodocsumm==0.2.8\n", "attrs==21.2.0\n", "astroquery==0.4.3\n", "astropy==4.3.1\n", "arviz==0.11.4\n", "argon2-cffi==21.1.0\n", "apeye==1.2.0\n", "anyio==3.3.4\n", "alabaster==0.7.12\n", "aesara-theano-fallback==0.0.4\n", "accessible-pygments==0.0.4\n", "ipython-autotime==0.3.1\n", "jupyternotify==0.1.15\n", "jupyter==1.0.0\n", "qtconsole==5.3.1\n", "jupyter-console==6.4.4\n", "QtPy==2.1.0\n", "time: 1.44 ms (started: 2023-08-11 14:20:54 +10:00)\n" ] } ], "source": [ "citations.print_packages()" ] }, { "cell_type": "markdown", "id": "dfea851a", "metadata": {}, "source": [ "## Comments\n", "Leave a comment below or in this [issue](https://github.com/avivajpeyi/tess-atlas/issues/new?title=TOI3114).\n", "```{raw} html\n", "\n", "```" ] } ], "metadata": { "jupytext": { "encoding": "# -*- coding: utf-8 -*-", "formats": "ipynb,py:light" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "orphan": true }, "nbformat": 4, "nbformat_minor": 5 }