Skip to content

Commit

Permalink
docs: new illu and better style + sphinx book 1.1.0
Browse files Browse the repository at this point in the history
docs: new illu and better style + sphinx book 1.1.0
  • Loading branch information
lgrcia authored Feb 12, 2024
2 parents a3d1118 + 9126207 commit 8dbcdf0
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 332 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
> Work in progress ...
# nuance

<p align="center" style="margin-top:20px">
<img src="docs/_static/nuance.svg" height="250">
<p align="center">
<img src="docs/_static/illu_readme.png" height="350" style="margin:50px">
</p>

<p align="center">
A Python package to detect exoplanetary transits <br>in the presence of stellar variability and correlated noises
<br>
Efficient detection of planets transiting active stars
<p align="center">
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-lightgray.svg?style=flat" alt="license"/></a>
<a href="https://nuance.readthedocs.io"><img src="https://img.shields.io/badge/ReadThe-Doc-blue.svg?style=flat" alt="license"/></a>
Expand Down
Binary file added docs/_static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/illu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/illu_readme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 8 additions & 13 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
:root {
/* --pst-color-inline-code: 33, 125, 224; */
--mystnb-source-margin-color: darkgrey;
--pst-color-primary: #6ca4df !important;
--pst-color-secondary: #b2b2b2 !important;
--pst-color-link-hover: var(--pst-color-secondary) !important;
}


/* Headings */

h2 {
text-decoration: underline;
font-size: 22px;
}


/* Code cells */

.highlight pre {
Expand Down Expand Up @@ -127,18 +121,19 @@ code span.pre {
font-size: 2rem;
} */

.version-nb {
/* .version-nb {
margin-top: -5px;
font-style: italic;
color: var(--pst-color-primary);
font-weight: bold;
color: lightgray;
}
.navbar-brand .logo__title {
font-size: 2rem;
white-space: normal;
text-align: center;
font-style: italic;
color: var(--pst-color-muted);
color: black;
font-weight: 500;
font-family: var(--pst-font-family-heading);
}
} */
16 changes: 11 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["jupyter_execute"]
exclude_patterns = ["_build/*"]


# -- Options for HTML output -------------------------------------------------
Expand All @@ -64,8 +64,10 @@

pyproject = toml.load("../pyproject.toml")
version = pyproject["tool"]["poetry"]["version"]
html_short_title = "nuance"
html_title = f"{html_short_title}"
# html_short_title = "nuance"
# html_title = f"{html_short_title}"
html_logo = "_static/logo.png"
html_favicon = "_static/favicon.png"
# -----

source_suffix = {
Expand All @@ -79,7 +81,7 @@
html_theme_options = {
"repository_url": "https://github.com/lgrcia/nuance",
"use_repository_button": True,
"show_navbar_depth": 2,
# "show_navbar_depth": 2,
}

nb_render_image_options = {"align": "center"}
Expand All @@ -93,4 +95,8 @@
autodoc_typehints = "signature"
autoclass_content = "both"

nb_execution_excludepatterns = ["_build/*", "notebooks/tutorials/*"]
nb_execution_excludepatterns = [
"_build/*",
"notebooks/tutorials/*",
"notebooks/_*.ipynb",
]
20 changes: 10 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
sd_hide_title: true
# *nuance*

Efficient detection of planets transiting active stars

---

# *nuance*
<div style="margin: 100px"></div>

```{image} _static/nuance.svg
:height: 300px
```{image} _static/illu.png
:height: 200px
:align: center
```
<div style="margin: 100px"></div>

```{warning}
Documentation and code under development
```

A python package to search for planetary transits in light curves containing correlated noise (like instrumental systematics or stellar variability). Powered by [JAX](https://github.com/google/jax) and [tinygp](https://github.com/dfm/tinygp).
*nuance* uses linear models and gaussian processes (using [JAX](https://github.com/google/jax)-based [tinygp](https://github.com/dfm/tinygp)) to simultaneously **search for planetary transits while modeling correlated noises** (e.g. stellar variability) in a tractable way.

```{toctree}
:maxdepth: 1
Expand All @@ -40,5 +39,6 @@ notebooks/tutorials/ground_based.ipynb
:maxdepth: 1
:caption: Reference
markdown/how
markdown/API
```
5 changes: 5 additions & 0 deletions docs/markdown/how.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# How it works

<video width="320" height="240" autoplay loop muted>
<source src="notebooks/test.mp4" type="video/mp4">
</video>
130 changes: 28 additions & 102 deletions docs/notebooks/combined.ipynb

Large diffs are not rendered by default.

Binary file added docs/notebooks/exocomet.pdf
Binary file not shown.
47 changes: 15 additions & 32 deletions docs/notebooks/multi.ipynb

Large diffs are not rendered by default.

79 changes: 20 additions & 59 deletions docs/notebooks/periodic.ipynb

Large diffs are not rendered by default.

37 changes: 10 additions & 27 deletions docs/notebooks/single.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,18 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[CpuDevice(id=0),\n",
" CpuDevice(id=1),\n",
" CpuDevice(id=2),\n",
" CpuDevice(id=3),\n",
" CpuDevice(id=4),\n",
" CpuDevice(id=5),\n",
" CpuDevice(id=6),\n",
" CpuDevice(id=7),\n",
" CpuDevice(id=8),\n",
" CpuDevice(id=9)]"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"# in order to run on all CPUs\n",
"import os\n",
"import jax\n",
"\n",
"os.environ[\"XLA_FLAGS\"] = f\"--xla_force_host_platform_device_count={os.cpu_count()}\"\n",
"jax.devices()"
"os.environ[\"XLA_FLAGS\"] = f\"--xla_force_host_platform_device_count={os.cpu_count()}\""
]
},
{
Expand All @@ -59,7 +42,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/lgrcia/code/dev/nuance/nuance/combined.py:7: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
"/Users/lgarcia/mambaforge/envs/nuance/lib/python3.11/site-packages/nuance/combined.py:7: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
" from tqdm.autonotebook import tqdm\n"
]
},
Expand Down Expand Up @@ -107,12 +90,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "61fb5d6d76c048dfb2d842a437de8f10",
"model_id": "ccd3be485d1b42e48896f25b36cf78c3",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/200 [00:00<?, ?it/s]"
" 0%| | 0/167 [00:00<?, ?it/s]"
]
},
"metadata": {},
Expand Down
Binary file removed docs/notebooks/single.pkl
Binary file not shown.
44 changes: 12 additions & 32 deletions docs/notebooks/tutorials/exocomet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,17 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[CpuDevice(id=0),\n",
" CpuDevice(id=1),\n",
" CpuDevice(id=2),\n",
" CpuDevice(id=3),\n",
" CpuDevice(id=4),\n",
" CpuDevice(id=5),\n",
" CpuDevice(id=6),\n",
" CpuDevice(id=7),\n",
" CpuDevice(id=8),\n",
" CpuDevice(id=9),\n",
" CpuDevice(id=10),\n",
" CpuDevice(id=11)]"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"# in order to run on all CPUs\n",
"import os\n",
"import jax\n",
"\n",
"os.environ[\"XLA_FLAGS\"] = f\"--xla_force_host_platform_device_count={os.cpu_count()}\"\n",
"jax.devices()"
"os.environ[\"XLA_FLAGS\"] = f\"--xla_force_host_platform_device_count={os.cpu_count()}\""
]
},
{
Expand Down Expand Up @@ -101,7 +81,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x2be934310>]"
"[<matplotlib.lines.Line2D at 0x1124bcb10>]"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -193,7 +173,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/lgarcia/code/dev/nuance/nuance/combined.py:7: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
"/Users/lgarcia/mambaforge/envs/nuance/lib/python3.11/site-packages/nuance/combined.py:7: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
" from tqdm.autonotebook import tqdm\n"
]
},
Expand Down Expand Up @@ -310,7 +290,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x2dffc0e90>]"
"[<matplotlib.lines.Line2D at 0x2c8fab550>]"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -355,7 +335,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f363dd543b504b86850662f528cb9f49",
"model_id": "28b50c0a86984a8ba03d84f142fd63e6",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -414,7 +394,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 17458/17458 [00:25<00:00, 694.99it/s]\n"
"100%|██████████| 17458/17458 [00:18<00:00, 962.87it/s] \n"
]
}
],
Expand Down
Binary file added docs/notebooks/tutorials/exocomet.pdf
Binary file not shown.
Loading

0 comments on commit 8dbcdf0

Please sign in to comment.