Installation

scarlet has several dependencies that must be installed prior to installation:

  1. numpy

  2. scipy

  3. proxmin (proximal algorithms to optimize the likelihood)

  4. pybind11 (integrate C++ code into python)

  5. peigen (used to load the Eigen headers if they are not already installed)

  6. autograd (needed to calculate gradients during optimization)

Optional Dependencies, but probably useful for most users:

  1. matplotlib

  2. astropy

The easiest way is using a combination of conda and pip installers:

conda install numpy scipy astropy pybind11
pip install proxmin peigen autograd

If you don’t work with conda, pip alone will do as well. Then go to a directory that should hold the scarlet code and get the scarlet repository from github, and build and install it:

git clone https://github.com/pmelchior/scarlet.git
cd scarlet
python setup.py install

scarlet requires the Eigen library headers, which are downloaded automatically when using the command above. If you already have a local version of Eigen and don’t want to download the headers, use

python setup.py build_ext -I<full path to your Eigen header files>
python setup.py install

Warning

build_ext does not accept relative paths, so <full path to your Eigen header files> must be a full path.

For OS X Users

For some reason the default XCode build system attempts to use the deprecated stdlc++ library instead of the newer libc++. So you may receive the error clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] ld: library not found for -lstdc++. If this is the case then before you run the setup script you will need to run:

xcode-select --install
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Building the Docs (scarlet developers only)

You need to install several extra packages:

  1. sphinx (required to build the docs)

  2. nbsphinx (required to compile notebooks)

  3. numpydoc (allow for numpy style docstrings)

Then navigate to the docs directory and type

make html

and a local copy of the current docs will be available in the docs/_build/html folder. The home page is available at docs/_build/html/index.html.