Installation

Tips for Python beginners

Using anaconda is strongly recommended. Simply follow the instructions here for your operating system (Linux, Mac, Windows, ...). If you already feel confident with virtual environments, consider setting up a new one for allesfitter (more infos here). Otherwise, don't worry, you're good to go with the base anaconda, too.

Having installed anaconda, open a new terminal window and make sure you are in the right anaconda environment (it will say "base" or your virtual environment name at the start of the line).

If you are on a Mac, make sure to switch to a bash terminal. You can do this for this session only by executing "bash" or do it permanently by executing "chsh -s /bin/bash".

Now execute "which conda" to make sure it returns the correct path. Something like "/Users/janeeyre/opt/anaconda3/bin/conda" if you use the base anaconda.

Then execute "which pip" to make sure it returns the correct path. Something like "/Users/janeeyre/opt/anaconda3/bin/pip" if you use the base anaconda.

Some packages come pre-installed with anaconda. You can check if you have them by opening a Terminal window and executing the generic "conda list" (shows you everything) or the specific "conda list xyz"(xyz being the respective package name below).

You can install missing packages via conda:

conda install xyz

And more specific packages via pip:

pip install xyz

Installing allesfitter

pip install allesfitter

Installing requirements

Standard packages (pre-installed or install via conda):

  • python (>=2.7 or >=3.5)

  • numpy

  • scikit-learn

  • matplotlib

  • seaborn

  • tqdm

Special packages (install via pip):

  • ellc (>=1.8.0) [1]

  • dynesty (>=0.9.3) [2]

  • emcee (>=3.0.0) [3]

  • celerite (>=0.3.0) [4]

  • corner (>=2.0.1) [5]

Even more special packages (install via pip, optional):

  • rebound (>=3.8.0) [6]

  • wotan (>=1.9) [7]

  • transitleastsquares (>=1.0.25) [8]

Footnotes

  • [1] semi-optional; for planets and binaries; see below for troubleshooting

  • [2] semi-optional; for Nested Sampling

  • [3] semi-optional; for MCMC

  • [4] semi-optional; for Gaussian Processes

  • [5] semi-optional; if you want corner plots (you know you do.)

  • [6] optional; if you want top-down-view plots of the orbits (you might not yet know, but you do.)

  • [7] optional; if you want to search for transits and guesstimate TTVs (you might not yet know, but you do.)

  • [8] optional; if you want to search for transits (you might not yet know, but you do.)

Trouble with Fortran and C compilers for ellc?

ellc needs you to have a Fortran compiler installed. Try using `pip install ellc' at first, as you would usually do. If it fails and complains about compilers, follow the steps below.


On Mac and Linux

  • Check if you have homebrew installed. In a terminal, execute `brew info'. If some text about kegs and files and GB appears, you're all set. If not, you have to install homebrew. Follow the instructions here.

  • Now open a new terminal and execute `brew install gcc'. That's all!

  • Now you can proceed to `pip install ellc'.


On Windows

  • It seems that you won't get around installing the heavy Microsoft Visual Studio. This should come with Fortran and C compilers and set you up with everything.