From 6c4e3f7156146af121168c01a2d63823aae19497 Mon Sep 17 00:00:00 2001 From: Steven Rieder Date: Wed, 27 Nov 2024 15:34:14 +0100 Subject: [PATCH] prepare documentation --- docs/conf.py | 2 +- wiki/FAQ.md => docs/faq.md | 4 ++- wiki/Glossary.md => docs/glossary.md | 1 + docs/index.md | 16 ++++++++++++ docs/index.rst | 18 ------------- wiki/Installation.md => docs/installation.md | 27 ++++++++++---------- docs/logo_text.png | 1 + wiki/Home.md | 4 --- 8 files changed, 36 insertions(+), 37 deletions(-) rename wiki/FAQ.md => docs/faq.md (99%) rename wiki/Glossary.md => docs/glossary.md (99%) create mode 100644 docs/index.md delete mode 100644 docs/index.rst rename wiki/Installation.md => docs/installation.md (98%) create mode 120000 docs/logo_text.png delete mode 100644 wiki/Home.md diff --git a/docs/conf.py b/docs/conf.py index 2a6d44a..827410d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ "sphinx_rtd_theme", "sphinx.ext.autodoc", "sphinx.ext.autosummary", - # "myst_parser", + "myst_parser", ] templates_path = ["_templates"] diff --git a/wiki/FAQ.md b/docs/faq.md similarity index 99% rename from wiki/FAQ.md rename to docs/faq.md index 1619f39..ee8a284 100644 --- a/wiki/FAQ.md +++ b/docs/faq.md @@ -1,3 +1,5 @@ +# FAQ + ## How do I create Parker wind profiles? Add the parameters of the planet/star system to the *$SUNBATHER_PROJECT_PATH/planets.txt* file. Make sure the SED you specify in _planets.txt_ is present in the _$CLOUDY_PATH/data/SED/_ folder in the right format. Then run the `construct_parker.py` module in your terminal (use `-help` to see the arguments). @@ -87,4 +89,4 @@ The `construct_parker.py` module always creates a profile up until 20 $R_p$ and The `convergeT_parker.py` module by default simulates the atmosphere with *Cloudy* up until 8 $R_p$ and this can be changed with the `-altmax` argument. -The `RT.FinFout()` function by default makes a transit spectrum based on the full *Cloudy* simulation (so up until 8 $R_p$), but you can give an upper boundary in cm with the `cut_at` argument. For example, if you want to include only material up until the planet's Roche radius when making the transit spectrum, it generally doesn't hurt to leave `construct_parker.py` and `convergeT_parker.py` at the default values, and just pass `cut_at=mysimulation.p.Rroche` to `RT.FinFout()` (assuming `mysimulation` is the `tools.Sim` object of your *Cloudy* simulation). \ No newline at end of file +The `RT.FinFout()` function by default makes a transit spectrum based on the full *Cloudy* simulation (so up until 8 $R_p$), but you can give an upper boundary in cm with the `cut_at` argument. For example, if you want to include only material up until the planet's Roche radius when making the transit spectrum, it generally doesn't hurt to leave `construct_parker.py` and `convergeT_parker.py` at the default values, and just pass `cut_at=mysimulation.p.Rroche` to `RT.FinFout()` (assuming `mysimulation` is the `tools.Sim` object of your *Cloudy* simulation). diff --git a/wiki/Glossary.md b/docs/glossary.md similarity index 99% rename from wiki/Glossary.md rename to docs/glossary.md index ea5a2a1..070a9e3 100644 --- a/wiki/Glossary.md +++ b/docs/glossary.md @@ -1,3 +1,4 @@ +# Glossary This wiki page is a glossary that provides additional information on various modules/classes/functionalities included in _sunbather_. We also refer to "Hazy", which is the official documentation of _Cloudy_ and can be found in your _$CLOUDY_PATH/docs/_ folder. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..52db9b6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,16 @@ +# sunbather documentation + +Welcome to the _sunbather_ docs! On the left side, you\'ll find the +table of contents. + +![Sunbather logo](logo_text.png) + +```{toctree} Table of Contents +:depth: 2 +installation +glossary +faq +api +Notebook: Fit Helium \ +Notebook: Predict UV \ +``` diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index cde744e..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. sunbather documentation master file, created by - sphinx-quickstart on Wed Nov 13 11:48:00 2024. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -sunbather documentation -======================= - -Add your content using ``reStructuredText`` syntax. See the -`reStructuredText `_ -documentation for details. - - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - api diff --git a/wiki/Installation.md b/docs/installation.md similarity index 98% rename from wiki/Installation.md rename to docs/installation.md index d03c940..3e00f25 100644 --- a/wiki/Installation.md +++ b/docs/installation.md @@ -1,14 +1,3 @@ -# Installing _Cloudy_ - -_sunbather_ has been developed and tested with _Cloudy v17.02_ and _v23.01_. Newer versions of _Cloudy_ are likely also compatible with _sunbather_, but this has not been thoroughly tested. Therefore, we currently recommend using _v23.01_. Complete _Cloudy_ download and installation instructions can be found [here](https://gitlab.nublado.org/cloudy/cloudy/-/wikis/home). In short, for most Unix systems, the steps are as follows: - -1. Go to the [v23 download page](https://data.nublado.org/cloudy_releases/c23/) and download the "c23.01.tar.gz" file (or go to the [v17 download page](https://data.nublado.org/cloudy_releases/c17/old/) and download the "c17.02.tar.gz" file). -2. Extract it in a location where you want to install _Cloudy_. -3. `cd` into the _/c23.01/source/_ or _/c17.02/source/_ folder and compile the code by running `make`. -4. Quickly test the _Cloudy_ installation: in the source folder, run `./cloudy.exe`, type "test" and hit return twice. It should print "Cloudy exited OK" at the end. - -If you have trouble installing _Cloudy_, we refer to the download instructions linked above, as well as the _Cloudy_ [help forum](https://cloudyastrophysics.groups.io/g/Main/topics). - # Installing _sunbather_ 1. Clone _sunbather_ from Github. The code runs entirely in Python. It was developed using Python 3.9.0 and the following packages are prerequisites: `numpy (v1.24.3), pandas (v1.1.4), matplotlib (v3.7.1), scipy (v1.8.0), astropy (v5.3), p-winds (v1.3.4)`. _sunbather_ also succesfully ran with the newest versions (as of Sep. 18, 2023) of these packages. We have however not yet thoroughly tested all of its functionality with these newer versions, so we currently cannot guarantee that it works, but feel free to try! In any case, we recommend making a Python [virtual environment](https://realpython.com/python-virtual-environments-a-primer/) to run _sunbather_ in. @@ -22,7 +11,19 @@ If you have trouble installing _Cloudy_, we refer to the download instructions l 5. Copy the stellar spectra from _/sunbather/stellar_SEDs/_ to _$CLOUDY_PATH/data/SED/_ . These include the [MUSCLES](https://archive.stsci.edu/prepds/muscles/) spectra. 6. Test your _sunbather_ installation: run _/sunbather/tests/test.py_, which should print "Success". If the test fails, feel free to open an issue or contact d.c.linssen@uva.nl with your error. -# Getting started +## Installing _Cloudy_ + +_sunbather_ has been developed and tested with _Cloudy v17.02_ and _v23.01_. Newer versions of _Cloudy_ are likely also compatible with _sunbather_, but this has not been thoroughly tested. Therefore, we currently recommend using _v23.01_. Complete _Cloudy_ download and installation instructions can be found [here](https://gitlab.nublado.org/cloudy/cloudy/-/wikis/home). In short, for most Unix systems, the steps are as follows: + +1. Go to the [v23 download page](https://data.nublado.org/cloudy_releases/c23/) and download the "c23.01.tar.gz" file (or go to the [v17 download page](https://data.nublado.org/cloudy_releases/c17/old/) and download the "c17.02.tar.gz" file). +2. Extract it in a location where you want to install _Cloudy_. +3. `cd` into the _/c23.01/source/_ or _/c17.02/source/_ folder and compile the code by running `make`. +4. Quickly test the _Cloudy_ installation: in the source folder, run `./cloudy.exe`, type "test" and hit return twice. It should print "Cloudy exited OK" at the end. + +If you have trouble installing _Cloudy_, we refer to the download instructions linked above, as well as the _Cloudy_ [help forum](https://cloudyastrophysics.groups.io/g/Main/topics). + + +## Getting started 1. To get familiar with _sunbather_, we recommend you go through the Jupyter notebooks in the _/sunbather/examples/_ folder, where example use cases (such as creating atmospheric profiles, calculating transmission spectra and fitting observational data) are worked out and explained. -2. For more details on how to use the code, check out the Glossary and FAQ pages on this wiki. We specifically recommend you read the glossary sections "The _planets.txt_ file" and "Stellar SED handling". \ No newline at end of file +2. For more details on how to use the code, check out the Glossary and FAQ pages on this wiki. We specifically recommend you read the glossary sections "The _planets.txt_ file" and "Stellar SED handling". diff --git a/docs/logo_text.png b/docs/logo_text.png new file mode 120000 index 0000000..7e00e04 --- /dev/null +++ b/docs/logo_text.png @@ -0,0 +1 @@ +../logo/Logo + text.png \ No newline at end of file diff --git a/wiki/Home.md b/wiki/Home.md deleted file mode 100644 index 1605b5d..0000000 --- a/wiki/Home.md +++ /dev/null @@ -1,4 +0,0 @@ -Welcome to the _sunbather_ wiki! On the right side, you'll find the table of contents. - -Logo + text -