forked from antonpannekoek/sunbather
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Dion Linssen edited this page Apr 18, 2024
·
6 revisions
sunbather was developed using Cloudy v17.02. Recently, Cloudy v23.01 was released. We have also made sunbather compatible with this new version, but it has not been tested as thoroughly as for v17. Still, for state-of-the-art Cloudy simulations, we recommend using v23. Complete download and installation instructions can be found here. In short, for most Unix systems, the steps are as follows:
- Go to the v23 download page and download the "c23.01.tar.gz" file, or go to the v17 download page and download the "c17.02.tar.gz" file.
- Extract it in a location where you want to install Cloudy.
-
cd
into the /c23.01/source/ or /c17.02/source/ folder and compile the code by runningmake
. - 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.
- 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 to run sunbather in. - Create a directory anywhere on your machine where the code will save all models/simulations/etc. This will be the "project" folder, and you can give it any name you like. This is to keep the output of sunbather separate from the sunbather source code.
- Set an environmental variable
$CLOUDY_PATH
to your Cloudy installation base directory, and set$SUNBATHER_PROJECT_PATH
to the "project" folder. We recommend setting these in your ~/.bashrc or ~/.zshrc file:export CLOUDY_PATH="/full/path/to/c23.01/" export SUNBATHER_PROJECT_PATH="/full/path/to/project/folder/"
- Copy the /sunbather/planets.txt file to your project folder.
- Test your sunbather installation: copy /sunbather/stellar_SEDs/eps_Eri_binned.spec to $CLOUDY_PATH/data/SED/ and then run /sunbather/tests/test.py, which should print "Success". If the test fails, feel free to contact [email protected] with your error.
- 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.
- 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".