diff --git a/docs/tutorials/astrometric.ipynb b/docs/tutorials/astrometric.ipynb index d871c170..ca37fd11 100644 --- a/docs/tutorials/astrometric.ipynb +++ b/docs/tutorials/astrometric.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "92509a83", + "id": "0", "metadata": {}, "source": [ "(astrometric)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1343498d-bf19-420d-bc0e-631c76ea9175", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "8a599053", + "id": "2", "metadata": {}, "source": [ "In this case study we'll walk through the simplest astrometric example with `exoplanet` and then explain how to build up a more complicated example with parallax measurements. For our dataset, we'll use astrometric and radial velocity observations of a binary star system.\n", @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c08172cd", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -75,7 +75,7 @@ }, { "cell_type": "markdown", - "id": "36310478", + "id": "4", "metadata": {}, "source": [ "Many of these measurements in this heterogeneous dataset do not have reported error measurements. For these, we assume a modest uncertainty of $1^\\circ$ in position angle and $0.01^{\\prime\\prime}$ in separation for the sake of specifying something, but we'll include a jitter term for both of these measurements as well. The scatter in points around the final solution will be a decent guide of what the measurement uncertainties actually were." @@ -84,7 +84,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4438fcad", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "b085f46c", + "id": "6", "metadata": {}, "source": [ "## Astrometric conventions\n", @@ -123,7 +123,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdd2fe55", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -145,7 +145,7 @@ }, { "cell_type": "markdown", - "id": "4ba61c0e", + "id": "8", "metadata": {}, "source": [ "The plot on the sky is helpful to look at, but the \"raw\" measurements are the values of $\\rho$ (separation) and $\\theta$ (also called P.A., position angle) that we listed in our data table, and that the measurement uncertainties live on these values as nice Gaussians. So, to visualize this space more clearly, we can plot $\\rho$ vs. time and P.A. vs. time." @@ -154,7 +154,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6b5eb6da", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -169,7 +169,7 @@ }, { "cell_type": "markdown", - "id": "3e783255", + "id": "10", "metadata": {}, "source": [ "## Fitting the astrometric orbit with *exoplanet*\n", @@ -179,7 +179,7 @@ }, { "cell_type": "raw", - "id": "ad195029", + "id": "11", "metadata": {}, "source": [ ".. note:: Orbits in *exoplanet* generally specify the semi-major axis in units of solar radii `R_sun`. For transits and RV orbits, you usually have enough external information (e.g., estimate of stellar mass from spectral type) to put a physical scale onto the orbit. For the most basic of astrometric orbits without parallax information, however, this information can be lacking and thus it makes sense to fit for the semi-major axis in units of `arcseconds`. But, `exoplanet` is modeling a real orbit (where semi-major axis is in units of `R_sun`), so we do need to at least provide a fake parallax to convert from arcseconds to `R_sun.`" @@ -188,7 +188,7 @@ { "cell_type": "code", "execution_count": null, - "id": "292d128d", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -265,7 +265,7 @@ }, { "cell_type": "markdown", - "id": "ecd7ec33", + "id": "13", "metadata": {}, "source": [ "Now that we have an initial orbit, we can set the model up using PyMC3 to do inference." @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c4fdff3", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -391,7 +391,7 @@ }, { "cell_type": "markdown", - "id": "dfddbce6", + "id": "15", "metadata": {}, "source": [ "Now that we have a maximum a posteriori estimate of the parameters, let's take a look at the results to make sure that they seem reasonable." @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": null, - "id": "434ee0d1", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -438,7 +438,7 @@ }, { "cell_type": "markdown", - "id": "9d74dc5b", + "id": "17", "metadata": {}, "source": [ "Now let's sample the posterior." @@ -447,7 +447,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4a6779c", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -466,7 +466,7 @@ }, { "cell_type": "markdown", - "id": "a5e747e3", + "id": "19", "metadata": {}, "source": [ "First we can check the convergence for some of the key parameters." @@ -475,7 +475,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2f665945", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -489,7 +489,7 @@ }, { "cell_type": "markdown", - "id": "c3712f75", + "id": "21", "metadata": {}, "source": [ "That looks pretty good.\n", @@ -499,7 +499,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46980c98", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -512,7 +512,7 @@ }, { "cell_type": "markdown", - "id": "dee00e74", + "id": "23", "metadata": {}, "source": [ "Finally, we can plot the posterior constraints on $\\rho$ and $\\theta$.\n", @@ -522,7 +522,7 @@ { "cell_type": "code", "execution_count": null, - "id": "049df130", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -555,7 +555,7 @@ }, { "cell_type": "markdown", - "id": "e2decdf6", + "id": "25", "metadata": {}, "source": [ "As we can see from the narrow range of orbits (the orange swath appears like a thin line), the orbit is actually highly constrained by the astrometry.\n", @@ -565,7 +565,7 @@ }, { "cell_type": "markdown", - "id": "82791242", + "id": "26", "metadata": {}, "source": [ "## Including parallax\n", @@ -580,7 +580,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30088e53", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -590,7 +590,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5a634a4a", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -609,7 +609,7 @@ }, { "cell_type": "markdown", - "id": "1c1107f4", + "id": "29", "metadata": {}, "source": [ "Check the convergence diagnostics." @@ -618,7 +618,7 @@ { "cell_type": "code", "execution_count": null, - "id": "500ca9c6", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "40ae60b6", + "id": "31", "metadata": {}, "source": [ "And make the corner plot for the physical parameters." @@ -649,7 +649,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c7a478ad", + "id": "32", "metadata": {}, "outputs": [], "source": [ @@ -658,7 +658,7 @@ }, { "cell_type": "markdown", - "id": "c0445f0f", + "id": "33", "metadata": {}, "source": [ "## Citations\n", @@ -669,7 +669,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd90ab44", + "id": "34", "metadata": {}, "outputs": [], "source": [ @@ -681,7 +681,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c903782", + "id": "35", "metadata": {}, "outputs": [], "source": [ diff --git a/docs/tutorials/eb.ipynb b/docs/tutorials/eb.ipynb index 5fbdd7e1..1110f995 100644 --- a/docs/tutorials/eb.ipynb +++ b/docs/tutorials/eb.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5d636239", + "id": "0", "metadata": {}, "source": [ "(eb)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2d610cf-71d2-4e9d-bcea-d21f18bc2c5d", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "2a8c9a97", + "id": "2", "metadata": {}, "source": [ "In this case study, we'll go through the steps required to fit the light curve and radial velocity measurements for the detached eclipsing binary system HD 23642.\n", @@ -49,7 +49,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8cd02d46", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -62,7 +62,7 @@ }, { "cell_type": "markdown", - "id": "21d405ba", + "id": "4", "metadata": {}, "source": [ "Then we'll download the Kepler data.\n", @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cebe2058", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -107,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "a76d0d2d", + "id": "6", "metadata": {}, "source": [ "Then we'll enter the radial velocity data.\n", @@ -117,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37554f0c", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -163,7 +163,7 @@ }, { "cell_type": "markdown", - "id": "a8bbd5b4", + "id": "8", "metadata": {}, "source": [ "## Probabilistic model\n", @@ -178,7 +178,7 @@ { "cell_type": "code", "execution_count": null, - "id": "faf7d53e", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -385,7 +385,7 @@ }, { "cell_type": "markdown", - "id": "5fbaca43", + "id": "10", "metadata": {}, "source": [ "At these maximum a posteriori parameters, let's make some plots of the model predictions compared to the observations to make sure that things look reasonable.\n", @@ -395,7 +395,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a1d2f52", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -425,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "c4a87106", + "id": "12", "metadata": {}, "source": [ "And then the light curve.\n", @@ -437,7 +437,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2be079e", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -506,7 +506,7 @@ }, { "cell_type": "markdown", - "id": "566f67a1", + "id": "14", "metadata": {}, "source": [ "## Sampling\n", @@ -517,7 +517,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93fa4b3e", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "686a0bf7", + "id": "16", "metadata": {}, "source": [ "As usual, we can check the convergence diagnostics for some of the key parameters." @@ -545,7 +545,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f2d4129", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -556,7 +556,7 @@ }, { "cell_type": "markdown", - "id": "08e95ad5", + "id": "18", "metadata": {}, "source": [ "## Results\n", @@ -568,7 +568,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e8f68aee", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -588,7 +588,7 @@ }, { "cell_type": "markdown", - "id": "4fd825ab", + "id": "20", "metadata": {}, "source": [ "And then we can look at the physical properties of the stars in the system.\n", @@ -600,7 +600,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8d8a10cd", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -626,7 +626,7 @@ }, { "cell_type": "markdown", - "id": "c4c62c5c", + "id": "22", "metadata": {}, "source": [ "## A note about eccentricities\n", @@ -643,7 +643,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45dfe752", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -693,7 +693,7 @@ }, { "cell_type": "markdown", - "id": "0c646fce", + "id": "24", "metadata": {}, "source": [ "We can then use the `corner.quantile` function to compute summary statistics of the weighted samples as follows.\n", @@ -703,7 +703,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6fa3e52d", + "id": "25", "metadata": {}, "outputs": [], "source": [ @@ -722,7 +722,7 @@ }, { "cell_type": "markdown", - "id": "a71cd0dd", + "id": "26", "metadata": {}, "source": [ "Or, the posterior mean and variance for the radius of the primary:" @@ -731,7 +731,7 @@ { "cell_type": "code", "execution_count": null, - "id": "af0964b3", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -750,7 +750,7 @@ }, { "cell_type": "markdown", - "id": "c595de6e", + "id": "28", "metadata": {}, "source": [ "As you can see (and as one would hope) this choice of prior does not significantly change our inference of the primary radius." @@ -758,7 +758,7 @@ }, { "cell_type": "markdown", - "id": "07ca0a3d", + "id": "29", "metadata": {}, "source": [ "## Citations\n", @@ -769,7 +769,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2f34e160", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -781,7 +781,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f82b81fe", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -791,7 +791,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a7ed353a-c229-4809-b079-9d2ca202a06b", + "id": "32", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/joint.ipynb b/docs/tutorials/joint.ipynb index 4ea367e5..738e8b6c 100644 --- a/docs/tutorials/joint.ipynb +++ b/docs/tutorials/joint.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "099b2332", + "id": "0", "metadata": {}, "source": [ "(joint)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bce60221-8b9e-4049-8a2d-1a3b560d59af", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "a11901fe", + "id": "2", "metadata": {}, "source": [ "In this tutorial, we will combine many of the previous tutorials to perform a fit of the K2-24 system using the K2 transit data and the RVs from [Petigura et al. (2016)](https://arxiv.org/abs/1511.04497).\n", @@ -40,7 +40,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1c497b4a", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -115,7 +115,7 @@ }, { "cell_type": "markdown", - "id": "bcc719d3", + "id": "4", "metadata": {}, "source": [ "Then the RVs from [RadVel](https://radvel.readthedocs.io):" @@ -124,7 +124,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f71b0e0f", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -145,7 +145,7 @@ }, { "cell_type": "markdown", - "id": "e3c2eb34", + "id": "6", "metadata": {}, "source": [ "We can initialize the transit parameters using [the box least squares periodogram from AstroPy](http://docs.astropy.org/en/latest/timeseries/bls.html).\n", @@ -156,7 +156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3721d715", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "markdown", - "id": "9c82979e", + "id": "8", "metadata": {}, "source": [ "Let's plot the initial transit estimates based on these periodograms:" @@ -198,7 +198,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4b1f176c", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -253,7 +253,7 @@ }, { "cell_type": "markdown", - "id": "af40df2b", + "id": "10", "metadata": {}, "source": [ "The discovery paper for K2-24 ([Petigura et al. (2016)](https://arxiv.org/abs/1511.04497)) includes the following estimates of the stellar mass and radius in Solar units:" @@ -262,7 +262,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8890b6d0", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -272,7 +272,7 @@ }, { "cell_type": "markdown", - "id": "3e2904ad", + "id": "12", "metadata": {}, "source": [ "Finally, using this stellar mass, we can also estimate the minimum masses of the planets given these transit parameters." @@ -281,7 +281,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9ee60780", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "4c376919", + "id": "14", "metadata": {}, "source": [ "## A joint transit and radial velocity model in PyMC3\n", @@ -310,7 +310,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8000897c", + "id": "15", "metadata": { "lines_to_next_cell": 2 }, @@ -487,7 +487,7 @@ }, { "cell_type": "markdown", - "id": "d7d02ab9", + "id": "16", "metadata": { "lines_to_next_cell": 2 }, @@ -498,7 +498,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b78425b5", + "id": "17", "metadata": { "lines_to_next_cell": 2 }, @@ -529,7 +529,7 @@ }, { "cell_type": "markdown", - "id": "ade1ac5b", + "id": "18", "metadata": { "lines_to_next_cell": 2 }, @@ -541,7 +541,7 @@ { "cell_type": "code", "execution_count": null, - "id": "58b3c7fb", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -582,7 +582,7 @@ }, { "cell_type": "markdown", - "id": "1a81495b", + "id": "20", "metadata": {}, "source": [ "There are still a few outliers in the light curve and it can be useful to remove those before doing the full fit because both the GP and transit parameters can be sensitive to this.\n", @@ -595,7 +595,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b96bbd27", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -619,7 +619,7 @@ }, { "cell_type": "markdown", - "id": "3e3fa865", + "id": "22", "metadata": {}, "source": [ "That looks better. Let's re-build our model with this sigma-clipped dataset." @@ -628,7 +628,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b97999f8", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -638,7 +638,7 @@ }, { "cell_type": "markdown", - "id": "c2f1a0a3", + "id": "24", "metadata": {}, "source": [ "Great! Now we're ready to sample.\n", @@ -654,7 +654,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3e54906", + "id": "25", "metadata": {}, "outputs": [], "source": [ @@ -677,7 +677,7 @@ }, { "cell_type": "markdown", - "id": "28ba74b7", + "id": "26", "metadata": {}, "source": [ "Let's look at the convergence diagnostics for some of the key parameters:" @@ -686,7 +686,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1060607", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -709,7 +709,7 @@ }, { "cell_type": "markdown", - "id": "35477ada", + "id": "28", "metadata": {}, "source": [ "As you see, the effective number of samples for the impact parameters and eccentricites are lower than for the other parameters.\n", @@ -719,7 +719,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad4cba3c", + "id": "29", "metadata": {}, "outputs": [], "source": [ @@ -730,7 +730,7 @@ }, { "cell_type": "markdown", - "id": "02b667de", + "id": "30", "metadata": {}, "source": [ "## Phase plots\n", @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d7c8beec", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -796,7 +796,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c13287ad", + "id": "32", "metadata": {}, "outputs": [], "source": [ @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "d102a073", + "id": "33", "metadata": {}, "source": [ "We can also compute the posterior constraints on the planet densities." @@ -848,7 +848,7 @@ { "cell_type": "code", "execution_count": null, - "id": "745012cb", + "id": "34", "metadata": {}, "outputs": [], "source": [ @@ -877,7 +877,7 @@ }, { "cell_type": "markdown", - "id": "92eac7cf", + "id": "35", "metadata": {}, "source": [ "## Citations\n", @@ -888,7 +888,7 @@ { "cell_type": "code", "execution_count": null, - "id": "947ee22a", + "id": "36", "metadata": {}, "outputs": [], "source": [ @@ -900,7 +900,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72b23361", + "id": "37", "metadata": {}, "outputs": [], "source": [ @@ -910,7 +910,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d5e7dabe-1767-4f8a-971e-6847f2e7e8a9", + "id": "38", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/lc-gp-transit.ipynb b/docs/tutorials/lc-gp-transit.ipynb index efd1017c..9bc0aabf 100644 --- a/docs/tutorials/lc-gp-transit.ipynb +++ b/docs/tutorials/lc-gp-transit.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8c379cee", + "id": "0", "metadata": {}, "source": [ "# Simultaneous Fitting of a Transit with Stellar Variability" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05836e22", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -23,7 +23,7 @@ }, { "cell_type": "markdown", - "id": "e6b8e55e", + "id": "2", "metadata": {}, "source": [ "Previous case studies have looked at [fitting transits](https://gallery.exoplanet.codes/tutorials/transit/), as well as [using Gaussian process models](https://gallery.exoplanet.codes/tutorials/stellar-variability/) to fit stellar variability. This case study looks at how we can combine these two features of _exoplanet_ to simultaneously fit the stellar variability and transit in the Kepler 1627 Ab (KIC 6184894). This system is in a [40 million year old open cluster](https://github.com/lgbouma/rudolf/blob/main/paper/ms.pdf), so it's a good example of the kind of analysis required for young transiting planets." @@ -31,7 +31,7 @@ }, { "cell_type": "markdown", - "id": "2021c769", + "id": "3", "metadata": {}, "source": [ "# Datasets and initializations" @@ -39,7 +39,7 @@ }, { "cell_type": "markdown", - "id": "b38bfa55", + "id": "4", "metadata": {}, "source": [ "First, let's download the long cadence light curves from MAST using the `lightkurve` package." @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4a387e61", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -59,7 +59,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4c3b43c9", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -114,7 +114,7 @@ }, { "cell_type": "markdown", - "id": "977b6056", + "id": "7", "metadata": {}, "source": [ "# A simultaneous transit and Gaussian process model\n", @@ -125,7 +125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "931b62a1", + "id": "8", "metadata": { "tags": [] }, @@ -301,7 +301,7 @@ }, { "cell_type": "markdown", - "id": "f6dea074-5e06-41fb-ab65-a0ed7a82852f", + "id": "9", "metadata": {}, "source": [ "Good! The log probability has increased at each step, which is typically what we want to see during optimization.\n", @@ -311,7 +311,7 @@ { "cell_type": "code", "execution_count": null, - "id": "de5e0a74", + "id": "10", "metadata": { "tags": [] }, @@ -388,7 +388,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2996e230", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -397,7 +397,7 @@ }, { "cell_type": "markdown", - "id": "b158181f-d27e-4b5d-b39d-7e3ea35f082d", + "id": "12", "metadata": {}, "source": [ "This looks more or less like what we're hoping for. The full Kepler time-series is dominated by the spot-induced variability, but the GP does a good job at removing it. In some cases, we might want to exclude the outlier points here as well, but for now there's no obvious need to do this.\n", @@ -408,7 +408,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a75079d2-72a8-42e1-a588-5d93e707b7ae", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -456,7 +456,7 @@ }, { "cell_type": "markdown", - "id": "5781e6ae-f9c0-4d3d-8e30-a1217d56f4d7", + "id": "14", "metadata": {}, "source": [ "Nice! The phase-folded light curve shows the transit at much higher signal to noise. The data even seems like they might be asymmetric, but it'd require a lot more work to see whether or not that's robust.\n", @@ -467,7 +467,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6425a448", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -483,7 +483,7 @@ }, { "cell_type": "markdown", - "id": "c4cf78b1-034f-4e39-9014-aea1d31fe839", + "id": "16", "metadata": {}, "source": [ "Things look about right. The planet is about $3.9 R_\\oplus$, on a close-in orbit. It's worth noting that the MAP value of $f$, the mixing fraction between the two frequencies in the `RotationTerm` kernel, favors a value so low to the bottom of our prior. Also, we should check whether our jitter makes sense:" @@ -492,7 +492,7 @@ { "cell_type": "code", "execution_count": null, - "id": "201d38d1", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -502,7 +502,7 @@ }, { "cell_type": "markdown", - "id": "cbad75de-8925-4eaf-8fa9-275b5aad52e5", + "id": "18", "metadata": {}, "source": [ "So the jitter will inflate the uncertainties by around a factor of three. If this is a concern, sigma-clipping to remove outliers as in the {ref}`tess` case study might be worthwhile." @@ -510,7 +510,7 @@ }, { "cell_type": "markdown", - "id": "220859de", + "id": "19", "metadata": {}, "source": [ "# Sampling\n", @@ -521,7 +521,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37ef9a2e-9253-4a4d-b0d3-d3ce58f89d59", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -574,7 +574,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ea7dd38d-76cf-4a3b-b9a7-604e2eafd175", + "id": "21", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/lc-multi.ipynb b/docs/tutorials/lc-multi.ipynb index d35ae4fb..ebd53645 100644 --- a/docs/tutorials/lc-multi.ipynb +++ b/docs/tutorials/lc-multi.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2666a73a-1300-4d7e-a5bf-fd3b54e221b7", + "id": "0", "metadata": {}, "source": [ "(lc-multi)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be2f2c90-ef8c-4bc7-a0bb-47c6549f0bdf", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "a4a5f70c-f401-4648-858b-434704ecff6f", + "id": "2", "metadata": {}, "source": [ "In the {ref}`rv-multi` case study, we discussed fitting the radial velocity curve for a planetary system observed using multiple instruments.\n", @@ -52,7 +52,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efef00be", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -135,7 +135,7 @@ }, { "cell_type": "markdown", - "id": "0f97992e", + "id": "4", "metadata": {}, "source": [ "## The probabilistic model\n", @@ -150,7 +150,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1d6498d1", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -289,7 +289,7 @@ }, { "cell_type": "markdown", - "id": "faf98001", + "id": "6", "metadata": {}, "source": [ "Here are the two phased light curves (with the Gaussian process model removed).\n", @@ -299,7 +299,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1d32bb53", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -350,7 +350,7 @@ }, { "cell_type": "markdown", - "id": "e1691f03", + "id": "8", "metadata": {}, "source": [ "Then we run the MCMC:" @@ -359,7 +359,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b05c7cea", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -381,7 +381,7 @@ }, { "cell_type": "markdown", - "id": "ca22b57e", + "id": "10", "metadata": {}, "source": [ "And check the convergence diagnostics:" @@ -390,7 +390,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1cbc411", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -401,7 +401,7 @@ }, { "cell_type": "markdown", - "id": "f4c2fd5f", + "id": "12", "metadata": {}, "source": [ "Since we fit for a radius ratio in each band, we can see if the transit depth is different in Kepler compared to TESS.\n", @@ -411,7 +411,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba50274e", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -436,7 +436,7 @@ }, { "cell_type": "markdown", - "id": "54bd6aab", + "id": "14", "metadata": {}, "source": [ "We can also compare the inferred limb-darkening coefficients:" @@ -445,7 +445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb21e376", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -476,7 +476,7 @@ }, { "cell_type": "markdown", - "id": "c34de6a5", + "id": "16", "metadata": {}, "source": [ "## Citations\n", @@ -487,7 +487,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1a6bc209", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -499,7 +499,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1018631", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -509,7 +509,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a567800c-90b7-4a31-b98c-e253a2873d7f", + "id": "19", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/quick-tess.ipynb b/docs/tutorials/quick-tess.ipynb index 2554be3e..7b8bc5a5 100644 --- a/docs/tutorials/quick-tess.ipynb +++ b/docs/tutorials/quick-tess.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5fd9c2b6", + "id": "0", "metadata": {}, "source": [ "(quick-tess)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "52e702f6", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "a43419d7", + "id": "2", "metadata": {}, "source": [ "In this tutorial, we will fit the TESS light curve for a known transiting planet.\n", @@ -41,7 +41,7 @@ }, { "cell_type": "markdown", - "id": "9579e7cc", + "id": "3", "metadata": {}, "source": [ "First, let's download the TESS light curve using [lightkurve](https://docs.lightkurve.org/):" @@ -50,7 +50,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9e251e9b", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "c3bd99fb", + "id": "5", "metadata": {}, "source": [ "Then, find the period, phase and depth of the transit using box least squares:stitch" @@ -85,7 +85,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ef2d02fd", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "081a9a53", + "id": "7", "metadata": {}, "source": [ "Then, for efficiency purposes, let's extract just the data within 0.25 days of the transits:" @@ -117,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a12beb30", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -144,7 +144,7 @@ }, { "cell_type": "markdown", - "id": "35d769af", + "id": "9", "metadata": {}, "source": [ "That looks a little janky, but it's good enough for now.\n", @@ -157,7 +157,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e8e8b15f", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -227,7 +227,7 @@ }, { "cell_type": "markdown", - "id": "7cb2cb85", + "id": "11", "metadata": {}, "source": [ "Now we can plot our initial model:" @@ -236,7 +236,7 @@ { "cell_type": "code", "execution_count": null, - "id": "31025f0a", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -259,7 +259,7 @@ }, { "cell_type": "markdown", - "id": "7c1568f3", + "id": "13", "metadata": {}, "source": [ "That looks better!\n", @@ -270,7 +270,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1d3f4d7c", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -288,7 +288,7 @@ }, { "cell_type": "markdown", - "id": "9033e260", + "id": "15", "metadata": {}, "source": [ "Then we can take a look at the summary statistics:" @@ -297,7 +297,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ce195ae5", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -308,7 +308,7 @@ }, { "cell_type": "markdown", - "id": "fab986c6", + "id": "17", "metadata": {}, "source": [ "And plot the posterior covariances compared to the values from [Pepper et al. (2019)](https://arxiv.org/abs/1911.05150):" @@ -317,7 +317,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ea16ed3", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -330,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "8dfb4c0d", + "id": "19", "metadata": {}, "source": [ "## Bonus: eccentricity\n", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9b69f0cf", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -396,7 +396,7 @@ }, { "cell_type": "markdown", - "id": "8663ec67", + "id": "21", "metadata": {}, "source": [ "As you can see, this eccentricity estimate is consistent (albeit with large uncertainties) with the value that [Pepper et al. (2019)](https://arxiv.org/abs/1911.05150) measure using radial velocities and it is definitely clear that this planet is not on a circular orbit." @@ -404,7 +404,7 @@ }, { "cell_type": "markdown", - "id": "8b1e4f73", + "id": "22", "metadata": {}, "source": [ "## Citations\n", @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2d409183", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -427,7 +427,7 @@ { "cell_type": "code", "execution_count": null, - "id": "193d976a", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -437,7 +437,7 @@ { "cell_type": "code", "execution_count": null, - "id": "778965c2", + "id": "25", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/rv-multi.ipynb b/docs/tutorials/rv-multi.ipynb index b5a9f440..fbd6147d 100644 --- a/docs/tutorials/rv-multi.ipynb +++ b/docs/tutorials/rv-multi.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ef809242-d29f-44c2-8425-4c5c6f8584b4", + "id": "0", "metadata": {}, "source": [ "(rv-multi)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "343551b8-b377-4674-8058-3964e5953077", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "7728bae8-f878-4ed8-8a14-c0dfd78b4b33", + "id": "2", "metadata": {}, "source": [ "In this case study, we will look at how we can use exoplanet and PyMC3 to combine datasets from different RV instruments to fit the orbit of an exoplanet system.\n", @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc26e0c6", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -93,7 +93,7 @@ }, { "cell_type": "markdown", - "id": "9c9ccb08", + "id": "4", "metadata": {}, "source": [ "Then set up the probabilistic model.\n", @@ -106,7 +106,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0aacd4a", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -181,7 +181,7 @@ }, { "cell_type": "markdown", - "id": "5a995b50", + "id": "6", "metadata": {}, "source": [ "After fitting for the parameters that maximize the posterior probability, we can plot this model to make sure that things are looking reasonable:" @@ -190,7 +190,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4bb6cb4c", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -213,7 +213,7 @@ }, { "cell_type": "markdown", - "id": "39de44f9", + "id": "8", "metadata": {}, "source": [ "That looks fine, so now we can run the MCMC sampler:" @@ -222,7 +222,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3e5f9237", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -240,7 +240,7 @@ }, { "cell_type": "markdown", - "id": "77cf0cae", + "id": "10", "metadata": {}, "source": [ "Then we can look at some summaries of the trace and the constraints on some of the key parameters:" @@ -249,7 +249,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6dcf9f2b", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -265,7 +265,7 @@ }, { "cell_type": "markdown", - "id": "57ee64aa", + "id": "12", "metadata": {}, "source": [ "And finally we can plot the phased RV curve and overplot our posterior inference:" @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ec10ebc", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -327,7 +327,7 @@ }, { "cell_type": "markdown", - "id": "93d6d8ce", + "id": "14", "metadata": {}, "source": [ "## Citations\n", @@ -338,7 +338,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e5defff0", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -350,7 +350,7 @@ { "cell_type": "code", "execution_count": null, - "id": "471a1034", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -360,7 +360,7 @@ { "cell_type": "code", "execution_count": null, - "id": "56b7c69c-31db-45c2-b12e-92ea681d5d70", + "id": "17", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/rv.ipynb b/docs/tutorials/rv.ipynb index 5cfbceea..cd43c98d 100644 --- a/docs/tutorials/rv.ipynb +++ b/docs/tutorials/rv.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7812dfbd", + "id": "0", "metadata": {}, "source": [ "(rv)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ef499b30-6dcd-4de5-aafb-028290b5c8d0", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "f644ca40", + "id": "2", "metadata": {}, "source": [ "In this case study, we will demonstrate how to fit radial velocity observations of an exoplanetary system using *exoplanet*.\n", @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "151595c9", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -65,7 +65,7 @@ }, { "cell_type": "markdown", - "id": "bc35e597", + "id": "4", "metadata": {}, "source": [ "Now, we know the periods and transit times for the planets [from the K2 light curve](https://arxiv.org/abs/1511.04497), so let's start by using the :func:`exoplanet.estimate_semi_amplitude` function to estimate the expected RV semi-amplitudes for the planets." @@ -74,7 +74,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6bae5e6d", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -91,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84a75b04", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -104,7 +104,7 @@ { "cell_type": "code", "execution_count": null, - "id": "51586651", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "7f817fba", + "id": "8", "metadata": {}, "source": [ "## The radial velocity model in PyMC3\n", @@ -125,7 +125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da098a77", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -192,7 +192,7 @@ }, { "cell_type": "markdown", - "id": "605230c2", + "id": "10", "metadata": {}, "source": [ "Now, we can plot the initial model:" @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5cba2e3", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -221,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "dd70b3a8", + "id": "12", "metadata": {}, "source": [ "In this plot, the background is the dotted line, the individual planets are the dashed lines, and the full model is the blue line.\n", @@ -232,7 +232,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9ed3b98", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -246,7 +246,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5af974ba", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "f26f5f52", + "id": "15", "metadata": {}, "source": [ "That looks better.\n", @@ -278,7 +278,7 @@ { "cell_type": "code", "execution_count": null, - "id": "090279e4", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -296,7 +296,7 @@ }, { "cell_type": "markdown", - "id": "d455c287", + "id": "17", "metadata": {}, "source": [ "After sampling, it's always a good idea to do some convergence checks.\n", @@ -306,7 +306,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05343243", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -319,7 +319,7 @@ }, { "cell_type": "markdown", - "id": "49efcc83", + "id": "19", "metadata": {}, "source": [ "It looks like everything is pretty much converged here. Not bad for 14 parameters and about a minute of runtime...\n", @@ -331,7 +331,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5939a96", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -343,7 +343,7 @@ }, { "cell_type": "markdown", - "id": "856086dd", + "id": "21", "metadata": {}, "source": [ "Finally, let's plot the plosterior constraints on the RV model and compare those to the data:" @@ -352,7 +352,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b797deb4", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -374,7 +374,7 @@ }, { "cell_type": "markdown", - "id": "5617a97e", + "id": "23", "metadata": {}, "source": [ "## Phase plots\n", @@ -386,7 +386,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a638bdcc", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -433,7 +433,7 @@ }, { "cell_type": "markdown", - "id": "ab693478", + "id": "25", "metadata": {}, "source": [ "## Citations\n", @@ -444,7 +444,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7f182c2f", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -456,7 +456,7 @@ { "cell_type": "code", "execution_count": null, - "id": "728c81fe", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -466,7 +466,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ddfbf0f3-d094-4b70-9d1b-077512dd6a95", + "id": "28", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/stellar-variability.ipynb b/docs/tutorials/stellar-variability.ipynb index 9febaa6b..ed1b0813 100644 --- a/docs/tutorials/stellar-variability.ipynb +++ b/docs/tutorials/stellar-variability.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "3644c83b", + "id": "0", "metadata": {}, "source": [ "(stellar-variability)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2001847a", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "8fdcfa7d", + "id": "2", "metadata": {}, "source": [ "When fitting exoplanets, we also need to fit for the stellar variability and Gaussian Processes (GPs) are often a good descriptive model for this variation.\n", @@ -38,7 +38,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b9d6dcc9", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -70,7 +70,7 @@ }, { "cell_type": "markdown", - "id": "6ce25da5", + "id": "4", "metadata": {}, "source": [ "## A Gaussian process model for stellar variability\n", @@ -82,7 +82,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23b731ad", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -104,7 +104,7 @@ }, { "cell_type": "markdown", - "id": "8890345c", + "id": "6", "metadata": {}, "source": [ "Now, using this initialization, we can set up the GP model in *exoplanet* and *celerite2*.\n", @@ -115,7 +115,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71f77026", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -179,7 +179,7 @@ }, { "cell_type": "markdown", - "id": "10672ab7", + "id": "8", "metadata": {}, "source": [ "Now that we have the model set up, let's plot the maximum a posteriori model prediction." @@ -188,7 +188,7 @@ { "cell_type": "code", "execution_count": null, - "id": "811f3ad6", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -203,7 +203,7 @@ }, { "cell_type": "markdown", - "id": "50ef0408", + "id": "10", "metadata": {}, "source": [ "That looks pretty good!\n", @@ -213,7 +213,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb91e006", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -232,7 +232,7 @@ }, { "cell_type": "markdown", - "id": "c94d95a1", + "id": "12", "metadata": {}, "source": [ "Now we can do the usual convergence checks:" @@ -241,7 +241,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15ca0850", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -265,7 +265,7 @@ }, { "cell_type": "markdown", - "id": "ccf56286", + "id": "14", "metadata": {}, "source": [ "And plot the posterior distribution over rotation period:" @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d33dc06", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -287,7 +287,7 @@ }, { "cell_type": "markdown", - "id": "d9026bbe", + "id": "16", "metadata": {}, "source": [ "## Citations\n", @@ -298,7 +298,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc94e171", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -310,7 +310,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f352af9f", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -320,7 +320,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5c2040e-5175-4ead-8d07-88c5a56400db", + "id": "19", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/tess.ipynb b/docs/tutorials/tess.ipynb index 7bffef0f..7519d00a 100644 --- a/docs/tutorials/tess.ipynb +++ b/docs/tutorials/tess.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7243286f", + "id": "0", "metadata": {}, "source": [ "(tess)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4f50b524-485b-433b-bbf7-063133d8bd4c", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "b77acbc6", + "id": "2", "metadata": {}, "source": [ "In this tutorial, we will reproduce the fits to the transiting planet in the Pi Mensae system discovered by [Huang et al. (2018)](https://arxiv.org/abs/1809.05967).\n", @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46dc3f48", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "81ed6be1", + "id": "4", "metadata": {}, "source": [ "## Transit search\n", @@ -88,7 +88,7 @@ { "cell_type": "code", "execution_count": null, - "id": "96b0c78c", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "287e3e93", + "id": "6", "metadata": {}, "source": [ "## The transit model in PyMC3\n", @@ -158,7 +158,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fbb85aad", + "id": "7", "metadata": { "lines_to_next_cell": 2 }, @@ -307,7 +307,7 @@ }, { "cell_type": "markdown", - "id": "82a9efd6", + "id": "8", "metadata": { "lines_to_next_cell": 2 }, @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "acbc3832", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -359,7 +359,7 @@ }, { "cell_type": "markdown", - "id": "b0e2da0a", + "id": "10", "metadata": {}, "source": [ "As in {ref}`joint`, we can do some sigma clipping to remove significant outliers." @@ -368,7 +368,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55f88cd4", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -393,7 +393,7 @@ }, { "cell_type": "markdown", - "id": "fadaadef", + "id": "12", "metadata": {}, "source": [ "And then we re-build the model using the data without outliers." @@ -402,7 +402,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2447e838", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -412,7 +412,7 @@ }, { "cell_type": "markdown", - "id": "f9a72cbc", + "id": "14", "metadata": {}, "source": [ "Now that we have the model, we can sample:" @@ -421,7 +421,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d0ef07a9", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -445,7 +445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9d4f2bc1", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -470,7 +470,7 @@ }, { "cell_type": "markdown", - "id": "d27f96a5", + "id": "17", "metadata": {}, "source": [ "## Results\n", @@ -482,7 +482,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d409b7d6", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -542,7 +542,7 @@ }, { "cell_type": "markdown", - "id": "49fed894", + "id": "19", "metadata": {}, "source": [ "And a corner plot of some of the key parameters:" @@ -551,7 +551,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b890e1e", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -577,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "b123ab5f", + "id": "21", "metadata": {}, "source": [ "These all seem consistent with the previously published values." @@ -585,7 +585,7 @@ }, { "cell_type": "markdown", - "id": "673982ce", + "id": "22", "metadata": {}, "source": [ "## Citations\n", @@ -596,7 +596,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c7d67b5", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -608,7 +608,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d5718b9b", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -618,7 +618,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb47eab4-4908-4177-8d5f-6be14b7a8af0", + "id": "25", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/transit.ipynb b/docs/tutorials/transit.ipynb index 9f48c582..290a4c93 100644 --- a/docs/tutorials/transit.ipynb +++ b/docs/tutorials/transit.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e3a9f10d", + "id": "0", "metadata": {}, "source": [ "(transit)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a78ae748-869b-4a44-8733-b145c79fbef2", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "b9bab082", + "id": "2", "metadata": {}, "source": [ "*exoplanet* includes methods for computing the light curves transiting planets.\n", @@ -35,7 +35,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a90311d7", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -66,7 +66,7 @@ }, { "cell_type": "markdown", - "id": "f9f84dd5", + "id": "4", "metadata": {}, "source": [ "But the real power comes from the fact that this is defined as a [Aesara/Theano operation](https://aesara.readthedocs.io/en/latest/extending/index.html) so it can be combined with PyMC3 to do gradient-based inference.\n", @@ -80,7 +80,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7cb97f4d", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -93,7 +93,7 @@ }, { "cell_type": "markdown", - "id": "4bc61a15", + "id": "6", "metadata": {}, "source": [ "Then, define the parameters.\n", @@ -105,7 +105,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b375c261", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -168,7 +168,7 @@ }, { "cell_type": "markdown", - "id": "1e286731", + "id": "8", "metadata": {}, "source": [ "Now we can plot the simulated data and the maximum a posteriori model to make sure that our initialization looks ok." @@ -177,7 +177,7 @@ { "cell_type": "code", "execution_count": null, - "id": "36b6e0eb", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -195,7 +195,7 @@ }, { "cell_type": "markdown", - "id": "4e58ba4e", + "id": "10", "metadata": {}, "source": [ "## Sampling\n", @@ -207,7 +207,7 @@ { "cell_type": "code", "execution_count": null, - "id": "80d57b30", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -226,7 +226,7 @@ }, { "cell_type": "markdown", - "id": "cf521c51", + "id": "12", "metadata": {}, "source": [ "After sampling, it's important that we assess convergence.\n", @@ -236,7 +236,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4cdbb2d", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -247,7 +247,7 @@ }, { "cell_type": "markdown", - "id": "302a9c91", + "id": "14", "metadata": {}, "source": [ "That looks pretty good!\n", @@ -259,7 +259,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d48da383", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -280,7 +280,7 @@ }, { "cell_type": "markdown", - "id": "c08a166d", + "id": "16", "metadata": {}, "source": [ "## Phase plots\n", @@ -291,7 +291,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8cee95a5", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -347,7 +347,7 @@ }, { "cell_type": "markdown", - "id": "a6c47be4", + "id": "18", "metadata": {}, "source": [ "## Citations\n", @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e5461564", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -370,7 +370,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43ecde5f", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -380,7 +380,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afcce422-b61b-4c16-ab44-75179f7741e3", + "id": "21", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/tutorials/ttv.ipynb b/docs/tutorials/ttv.ipynb index 25eeafa4..9c0967e4 100644 --- a/docs/tutorials/ttv.ipynb +++ b/docs/tutorials/ttv.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "1072f391-e4b4-476c-bec3-211fda0ef8ed", + "id": "0", "metadata": {}, "source": [ "(ttv)=\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "12785329-3284-4b9e-b546-5ab4458561b0", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "fd479fba-73ba-40f1-a45e-82ea34822187", + "id": "2", "metadata": {}, "source": [ "Fitting for or marginalizing over the transit times or transit timing variations (TTVs) can be useful for several reasons, and it is a compelling use case for *exoplanet* becuase the number of parameters in the model increases significantly because there will be a new parameter for each transit.\n", @@ -53,7 +53,7 @@ { "cell_type": "code", "execution_count": null, - "id": "512156b8", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "86f7e561", + "id": "4", "metadata": {}, "source": [ "Now, like in the [Transit fitting](https://docs.exoplanet.codes/en/stable/tutorials/transit/) tutorial, we'll set up the the model using *PyMC3* and *exoplanet*, and then simulate a data set from that model." @@ -108,7 +108,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4dafa187", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -185,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "7fd9aaa5", + "id": "6", "metadata": {}, "source": [ "Here's our simulated light curve and the initial model:" @@ -194,7 +194,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4134703", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "feb3b63a", + "id": "8", "metadata": {}, "source": [ "This looks similar to the light curve from the [Transit fitting](https://docs.exoplanet.codes/en/stable/tutorials/transit/) tutorial, but if we try plotting the folded transits, we can see that something isn't right: these transits look pretty smeared out!" @@ -221,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "db223b7d", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -253,7 +253,7 @@ }, { "cell_type": "markdown", - "id": "42c90578", + "id": "10", "metadata": {}, "source": [ "Instead, we can correct for the transit times by subtracting these estimates and plot that instead:" @@ -262,7 +262,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7085e09b", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -291,7 +291,7 @@ }, { "cell_type": "markdown", - "id": "957750a3", + "id": "12", "metadata": {}, "source": [ "That looks better!\n", @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2369a6e3", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -322,7 +322,7 @@ }, { "cell_type": "markdown", - "id": "64f52752", + "id": "14", "metadata": {}, "source": [ "Then check the convergence diagnostics:" @@ -331,7 +331,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7180bcc6", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -342,7 +342,7 @@ }, { "cell_type": "markdown", - "id": "57ad7a4a", + "id": "16", "metadata": {}, "source": [ "And plot the corner plot of the physical parameters:" @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ded78309", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "6d386c48", + "id": "18", "metadata": {}, "source": [ "We could also plot corner plots of the transit times, but they're not terribly enlightening in this case so let's skip it.\n", @@ -382,7 +382,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6ebe6afd", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -432,7 +432,7 @@ }, { "cell_type": "markdown", - "id": "230caf4f", + "id": "20", "metadata": {}, "source": [ "## Citations\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57fb744d", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -455,7 +455,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1c4f6fa", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -465,7 +465,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3e3dc28-baba-45de-b934-ef868945a821", + "id": "23", "metadata": {}, "outputs": [], "source": []