Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: reorganise the doc + API docs + logo #191

Merged
merged 34 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
29424cd
docs: adding a clean API page (keep autoapi?) + open toctree
lgrcia Aug 5, 2024
994d8c0
docs: more docstrings
lgrcia Aug 5, 2024
bf3cf27
docs: revamped tutorial to include more measurements (RV ,light curve…
lgrcia Aug 5, 2024
f1117cf
docs: removed unused
lgrcia Aug 5, 2024
f395390
docs: fix main docstrings
lgrcia Aug 5, 2024
dc1256d
docs: adding a logo
lgrcia Aug 5, 2024
52cd0e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 5, 2024
7bca165
fix: line too long
lgrcia Aug 5, 2024
59d7ed8
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 5, 2024
6e136a2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 5, 2024
3188303
docs: adding full api link
lgrcia Aug 6, 2024
bce03b6
docs: fix objects refs
lgrcia Aug 6, 2024
d76a444
docs: temporary remove fail on warning
lgrcia Aug 6, 2024
0bba13f
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 6, 2024
8f89c73
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 6, 2024
216426c
docs: make autoapi index orphan (to avoid warnings in sphinx) + fix r…
lgrcia Aug 6, 2024
3dd1e00
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 6, 2024
95b58f7
docs: separate starry api
lgrcia Aug 7, 2024
705bff4
docs: remove why.md
lgrcia Aug 7, 2024
5ed6bd3
fix: map_light_curve dosctring
lgrcia Aug 7, 2024
03f659a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 7, 2024
7309709
docs: reset `sphinx -W` option to fail on warning
lgrcia Aug 7, 2024
d22e731
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 7, 2024
a1cb088
docs: add about page to tutorials + modify transit tuto to reflect that
lgrcia Aug 7, 2024
667f7eb
Merge remote-tracking branch 'origin/main' into docs_reorganize_logo_api
lgrcia Aug 7, 2024
6854a72
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 7, 2024
3a14cf8
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 7, 2024
d96a83f
fix: api ref
lgrcia Aug 7, 2024
7883818
docs: add link to about
lgrcia Aug 7, 2024
030e145
docs: put model_light_curve into function
lgrcia Aug 7, 2024
bfe067c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 7, 2024
508c1e7
docs: remove duplicate note about extra packages
lgrcia Aug 7, 2024
57ef0c8
Merge branch 'docs_reorganize_logo_api' of https://github.com/exoplan…
lgrcia Aug 7, 2024
6cc3a60
fix: add @jiayindong suggestions and `light_curves.transforms` to API
lgrcia Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/_autoapi_templates/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:orphan:

Full API Reference
==================

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:

{% for page in pages|selectattr("is_top_level_object") %}
{{ page.include_path }}
{% endfor %}

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
Binary file modified 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 modified 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.
55 changes: 55 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# API reference

These pages contain the API reference for the `jaxoplanet` package.

## Orbital systems

The modules to define orbital systems are:

- [keplerian](jaxoplanet.orbits.keplerian) : a module to define a Keplerian system made of a central object and its orbiting bodies.
- [transit](jaxoplanet.orbits.transit) : a module to define a system made of a star and its transiting planet, defined by the transit parameters assuming the planet transits at a constant velocity.

## Limb-darkened stars

Given an orbital system, the following modules can be used to compute different kind of light curves:

- [limb-darkened](jaxoplanet.light_curves.limb_dark) : a module to compute occultation light curve of a star with polynomial limb darkening.
- [transforms](jaxoplanet.light_curves.transforms) : a module providing decorators to transform light curve functions.


## Non-uniform surfaces


```{warning}
While being stable, computing *starry* light curves of non-uniform surfaces is still experimental.
```

The following modules can be used to create systems of bodies with limb-darkened and non-uniform emitting surfaces:

- [starry orbit](jaxoplanet.experimental.starry.orbit) : a module to define a system made of a central object and orbiting bodies, all with non-uniform emitting surfaces. (experimental)
- [starry light curve](jaxoplanet.experimental.starry.light_curves) : a module to compute the light curve of a non-uniform star whose surface is represented by a sum of spherical harmonics.

And the following are lower-level modules to define and manipulate non-uniform surfaces:

- [Ylm](jaxoplanet.experimental.starry.ylm) : a lower-level module to create and manipulate vectors in the spherical harmonic basis.
- [Pijk](jaxoplanet.experimental.starry.pijk) : a lower-level module to create and manipulate vectors in the polynomial basis.
- [Surface](jaxoplanet.experimental.starry.surface) : a module to manipulate the oriented surface of spherical bodies, represented by a sum of spherical harmonics.
- [visualization](jaxoplanet.experimental.starry.visualization) : a module to visualize the surface of non-uniform spherical bodies.


```{toctree}
:hidden:

keplerian orbit <autoapi/jaxoplanet/orbits/keplerian/index>
transit orbit <autoapi/jaxoplanet/orbits/transit/index>
starry orbit <autoapi/jaxoplanet/experimental/starry/orbit/index>
limb-darkened light curve <autoapi/jaxoplanet/light_curves/limb_dark/index>
transforms <autoapi/jaxoplanet/light_curves/transforms/index>
starry light curve <autoapi/jaxoplanet/experimental/starry/light_curves/index>
Surface <autoapi/jaxoplanet/experimental/starry/surface/index>
Ylm <autoapi/jaxoplanet/experimental/starry/ylm/index>
Pijk <autoapi/jaxoplanet/experimental/starry/pijk/index>
visualization <autoapi/jaxoplanet/experimental/starry/visualization/index>
```

**Missing something?** Check the [full API reference](autoapi/jaxoplanet/index).
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]

autoapi_dirs = ["../src"]
autoapi_ignore = ["*/experimental/*", "*_version*", "*/types*"]
autoapi_ignore = ["*_version*", "*/types*"]
autoapi_options = [
"members",
"undoc-members",
Expand All @@ -29,6 +29,9 @@
"special-members",
# "imported-members",
]
# autoapi_add_toctree_entry = False
autoapi_template_dir = "_autoapi_templates"

suppress_warnings = ["autoapi.python_import_resolution"]

myst_enable_extensions = ["dollarmath", "colon_fence"]
Expand All @@ -44,7 +47,7 @@
version = jaxoplanet.__version__
release = jaxoplanet.__version__

exclude_patterns = ["_build"]
exclude_patterns = ["_build", "_autoapi_templates"]
html_theme = "sphinx_book_theme"
html_title = "jaxoplanet documentation"
html_logo = "_static/logo.png"
Expand Down
15 changes: 0 additions & 15 deletions docs/guide.md

This file was deleted.

28 changes: 23 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,29 @@
## Table of contents

```{toctree}
---
maxdepth: 1
---
:caption: User guide

guide
tutorials
install
troubleshooting
tutorials/getting-started.ipynb
```

```{toctree}
:caption: Tutorials

tutorials/about.ipynb
tutorials/transit.ipynb
tutorials/rv.ipynb
tutorials/starry.ipynb
```

```{toctree}
:caption: Reference

api
tutorials/autodiff.ipynb
tutorials/introduction-to-jax.ipynb
tutorials/core-from-scratch.ipynb
contributing

```
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(install)=

# Installation Guide
# Installation

`jaxoplanet` is built on top of [`jax`](https://github.com/google/jax) so that's the
primary dependency that you'll need. All of the methods below will install any
Expand Down
28 changes: 0 additions & 28 deletions docs/tutorials.md

This file was deleted.

79 changes: 79 additions & 0 deletions docs/tutorials/about.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# About these tutorials\n",
"\n",
"The tutorials in this section are automatically executed with every change of\n",
"the code to make sure that they are always up-to-date. As a result, they are\n",
"designed to require only a relatively small amount of computation time; when\n",
"using `jaxoplanet` for real problems you will probably find that your run\n",
"times are longer.\n",
"\n",
"To execute a tutorial on your own, you can click on the buttons at the top right\n",
"or this page to launch the notebook using [Binder](https://mybinder.org),\n",
"[Colab](https://colab.research.google.com), or download the `.ipynb` file\n",
"directly.\n",
"\n",
"## Extra dependencies\n",
"\n",
"Most of these tutorials use the probabilistic programming library `NumPyro` to make \n",
"inference based on real or synthetic datasets. Hence, you will need the following extra packages:\n",
"- [NumPyro](https://num.pyro.ai/en/stable/getting_started.html) : a lightweight probabilistic programming library.\n",
"- [NumPyro-ext](https://github.com/dfm/numpyro-ext) : a package that extends NumPyro with a set of helper functions, custom distributions and other utilities.\n",
"- [corner](https://corner.readthedocs.io/en/latest/) : a package to visualize multidimensional samples using a scatterplot matrix.\n",
"- [Arviz](https://python.arviz.org/en/stable/) : a package for exploratory analysis of Bayesian models\n",
"\n",
"In addition, the [Lightkurve](https://docs.lightkurve.org/) may be required to download real datasets from the Kepler and TESS missions.\n",
"\n",
"For reference, here is the version of the packages used to generate these tutorials:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import jax\n",
"import arviz\n",
"import numpy\n",
"import corner\n",
"import numpyro\n",
"import jaxoplanet\n",
"import numpyro_ext\n",
"\n",
"print(f\"jaxoplanet.__version__ = {jaxoplanet.__version__}\")\n",
"print(f\"numpy.__version__ = {numpy.__version__}\")\n",
"print(f\"numpyro.__version__ = {numpyro.__version__}\")\n",
"print(f\"numpyro_ext.__version__ = {numpyro_ext.__version__}\")\n",
"print(f\"jax.__version__ = {jax.__version__}\")\n",
"print(f\"corner.__version__ = {corner.__version__}\")\n",
"print(f\"arviz.__version__ = {arviz.__version__}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "jaxoplanet",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading