Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 15, 2024
1 parent dcae4b4 commit 0b66bc6
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 315 deletions.
72 changes: 36 additions & 36 deletions docs/tutorials/astrometric.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "92509a83",
"id": "0",
"metadata": {},
"source": [
"(astrometric)=\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1343498d-bf19-420d-bc0e-631c76ea9175",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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",
Expand All @@ -39,7 +39,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c08172cd",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -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."
Expand All @@ -84,7 +84,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4438fcad",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -108,7 +108,7 @@
},
{
"cell_type": "markdown",
"id": "b085f46c",
"id": "6",
"metadata": {},
"source": [
"## Astrometric conventions\n",
Expand All @@ -123,7 +123,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "cdd2fe55",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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."
Expand All @@ -154,7 +154,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6b5eb6da",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -169,7 +169,7 @@
},
{
"cell_type": "markdown",
"id": "3e783255",
"id": "10",
"metadata": {},
"source": [
"## Fitting the astrometric orbit with *exoplanet*\n",
Expand All @@ -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.`"
Expand All @@ -188,7 +188,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "292d128d",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -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."
Expand All @@ -274,7 +274,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5c4fdff3",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -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."
Expand All @@ -400,7 +400,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "434ee0d1",
"id": "16",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -438,7 +438,7 @@
},
{
"cell_type": "markdown",
"id": "9d74dc5b",
"id": "17",
"metadata": {},
"source": [
"Now let's sample the posterior."
Expand All @@ -447,7 +447,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b4a6779c",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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."
Expand All @@ -475,7 +475,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2f665945",
"id": "20",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -489,7 +489,7 @@
},
{
"cell_type": "markdown",
"id": "c3712f75",
"id": "21",
"metadata": {},
"source": [
"That looks pretty good.\n",
Expand All @@ -499,7 +499,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "46980c98",
"id": "22",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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",
Expand All @@ -522,7 +522,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "049df130",
"id": "24",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -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",
Expand All @@ -565,7 +565,7 @@
},
{
"cell_type": "markdown",
"id": "82791242",
"id": "26",
"metadata": {},
"source": [
"## Including parallax\n",
Expand All @@ -580,7 +580,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "30088e53",
"id": "27",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -590,7 +590,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5a634a4a",
"id": "28",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -609,7 +609,7 @@
},
{
"cell_type": "markdown",
"id": "1c1107f4",
"id": "29",
"metadata": {},
"source": [
"Check the convergence diagnostics."
Expand All @@ -618,7 +618,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "500ca9c6",
"id": "30",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -640,7 +640,7 @@
},
{
"cell_type": "markdown",
"id": "40ae60b6",
"id": "31",
"metadata": {},
"source": [
"And make the corner plot for the physical parameters."
Expand All @@ -649,7 +649,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c7a478ad",
"id": "32",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -658,7 +658,7 @@
},
{
"cell_type": "markdown",
"id": "c0445f0f",
"id": "33",
"metadata": {},
"source": [
"## Citations\n",
Expand All @@ -669,7 +669,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "dd90ab44",
"id": "34",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -681,7 +681,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5c903782",
"id": "35",
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 0b66bc6

Please sign in to comment.