Skip to content

Commit

Permalink
docs: hide plot code
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrcia committed May 28, 2024
1 parent 22f7053 commit 0cc3706
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 169 deletions.
8 changes: 6 additions & 2 deletions docs/notebooks/combined.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -252,7 +256,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.10.14"
},
"orig_nbformat": 4
},
Expand Down
35 changes: 0 additions & 35 deletions docs/notebooks/gp.ipynb

This file was deleted.

36 changes: 0 additions & 36 deletions docs/notebooks/lc_prep.ipynb

This file was deleted.

155 changes: 85 additions & 70 deletions docs/notebooks/multi.ipynb

Large diffs are not rendered by default.

28 changes: 16 additions & 12 deletions docs/notebooks/periodic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"source": [
"## The *periodic search*\n",
"\n",
"We can now perform the *periodic search* and plot the SNR periodogram"
"We can now perform the *periodic search*"
]
},
{
Expand All @@ -124,21 +124,31 @@
"periods = np.linspace(0.1, 5, 4000)\n",
"search = nu.periodic_search(periods)\n",
"\n",
"t0, D, P = search.best"
"t0, D, P = search.best\n",
"\n",
"print(\n",
" \"\\n\".join(\n",
" [f\"{n}: {v:.3f}\" for n, v in zip([\"epoch\", \"duration\", \"period\"], [t0, D, P])]\n",
" )\n",
")"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"And we can plot the results of the search with"
"and plot the SNR periodogram"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -177,13 +187,7 @@
" alpha=0.8,\n",
" label=\"true\",\n",
")\n",
"raw.legend()\n",
"\n",
"print(\n",
" \"\\n\".join(\n",
" [f\"{n}: {v:.3f}\" for n, v in zip([\"epoch\", \"duration\", \"period\"], [t0, D, P])]\n",
" )\n",
")"
"_ = raw.legend()"
]
},
{
Expand Down Expand Up @@ -213,7 +217,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.10.14"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
33 changes: 27 additions & 6 deletions docs/notebooks/single.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dc911f91a4344ab898f00cac7e971e8a",
"model_id": "e4fafdd729b7464dbf49d2f3320823d3",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -155,13 +155,36 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We clearly identify a transit candidate, that we can plot thanks to its parameters"
"We clearly identify a transit candidate"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"i, j = np.unravel_index(np.argmax(nu.search_data.ll), nu.search_data.ll.shape)\n",
"t0, D = nu.search_data.t0s[i], nu.search_data.Ds[j]\n",
"\n",
"print(\"\\n\".join([f\"{n}: {v:.3f}\" for n, v in zip([\"epoch\", \"duration\"], [t0, D])]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"that we can plot thanks to its parameters"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"name": "stdout",
Expand All @@ -183,9 +206,8 @@
}
],
"source": [
"i, j = np.unravel_index(np.argmax(nu.search_data.ll), nu.search_data.ll.shape)\n",
"t0, D = nu.search_data.t0s[i], nu.search_data.Ds[j]\n",
"linear, astro, noise = nu.models(t0, D)\n",
"\n",
"plt.plot(time, flux, \".\", c=\"0.8\")\n",
"plt.plot(time, linear + astro + noise, c=\"k\", label=\"full model\")\n",
"plt.plot(\n",
Expand All @@ -200,8 +222,7 @@
"plt.ylabel(\"flux\")\n",
"plt.xlabel(\"time\")\n",
"\n",
"plt.tight_layout()\n",
"print(\"\\n\".join([f\"{n}: {v:.3f}\" for n, v in zip([\"epoch\", \"duration\"], [t0, D])]))"
"plt.tight_layout()"
]
},
{
Expand Down
16 changes: 12 additions & 4 deletions docs/notebooks/tutorials/exocomet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this tutorial we use nuance to search for exocomet transits on [$\\beta$ Pictoris planetary system](https://www.nature.com/articles/s41598-022-09021-2)\n",
"In this tutorial we use nuance to search for exocomet transits on [$\\beta$ Pictoris planetary system](https://www.nature.com/articles/s41598-022-09021-2).\n",
"\n",
"```{note}\n",
"This tutorial requires the `lightkurve` package to access the data\n",
"This tutorial requires the `lightkurve` package to access the data.\n",
"```\n",
"\n",
"In order to run this tutorial on all available CPUs, we set the `XLA_FLAGS` env variable to"
Expand Down Expand Up @@ -205,7 +205,11 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -407,7 +411,11 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"data": {
Expand Down
27 changes: 23 additions & 4 deletions docs/notebooks/tutorials/tess_search.ipynb

Large diffs are not rendered by default.

0 comments on commit 0cc3706

Please sign in to comment.