Skip to content

Commit

Permalink
Update getting_started docs
Browse files Browse the repository at this point in the history
  • Loading branch information
romeeld committed Jun 6, 2020
1 parent b249bdf commit 5111d5b
Showing 1 changed file with 61 additions and 40 deletions.
101 changes: 61 additions & 40 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ Requirements

* `python >= 3.x <https://www.python.org/>`_

* `numpy >= 1.13.x <http://www.numpy.org/>`_
* `numpy <http://www.numpy.org/>`_
* `scipy <https://www.scipy.org/>`_
* `cython <http://cython.org/>`_
* `h5py <http://www.h5py.org/>`_
* `matplotlib <http://www.matplotlib.org/>`_
* `psutil <https://pypi.org/project/psutil/>`_
* `joblib <https://joblib.readthedocs.io/>`_
* `six <https://six.readthedocs.io/>`_
* `astropy <https://www.astropy.org/>`_
* `yt >= 3.3 <https://bitbucket.org/yt_analysis/yt>`_

* `sympy <http://www.sympy.org/en/index.html>`_

----

Installation
Expand All @@ -30,68 +33,86 @@ Python and friends
------------------

Since this is a python package, you must have python installed!
``CAESAR`` should be py2 and py3 compatible so feel free to pick
whichever you are most comforatable with. This said, the developers
do not support issues related to py2 anymore.

If you do not have a pre-existing python installation (other than your
system's native python, of which we do **not** recommend using) we
*strongly* encourage you to consider a pre-packaged distribution such
as `Anaconda <https://www.continuum.io/downloads>`_. Anaconda for
instance, will install an isolated python environment in your home
``CAESAR`` formally requires python-3. Some basic functionality is
still compatible with python-2, but we have discontinued further
support for this in ``CAESAR``.

We strongly encourage using a pre-packaged python distribution,
such as `Anaconda <https://www.anaconda.com/products/individual>`_.
This will install an isolated python environment in your home
directory giving you full access to install and change packages
without fear of screwing up your system's default python install.
Another advantage is that it comes with nearly everything you need to
get started working with python (numpy/scipy/matplotlib/etc).
Another advantage is that it comes with nearly everything you need
to get started working with python (numpy/scipy/matplotlib/etc).

A more
minimalist option is `Miniconda
<http://conda.pydata.org/miniconda.html>`_. This package gives you
the functionality of Anaconda without all of the default packages.
----


Anaconda / Miniconda
^^^^^^^^^^^^^^^^^^^^
Dependencies
------------

Regardless of if you use Anaconda or Miniconda, all dependencies can
easily be installed via the ``conda`` command:
Installing the main dependencies is very easy under Anaconda, or using the
python package manager `pip <https://pypi.python.org/pypi/pip>`_.

.. code-block:: bash
$> conda install numpy scipy cython h5py mercurial sympy
$> conda install numpy scipy cython h5py matplotlib psutil joblib six astropy
pip
^^^
Alternatively, if you do not wish to use Anaconda, these can all be installed
under ``pip`` by replacing ``conda`` with ``pip`` in the line above. Some
of these automatically come with Anaconda, but the above command
will update these to the latest version if needed.

If you do not elect to use the ``conda`` command, dependencies can
also be installed via `pip <https://pypi.python.org/pypi/pip>`_. Be
aware that in order for `h5py` to properly compile you must first have
Be aware that in order for ``h5py`` to properly compile you must first have
`HDF5 <https://www.hdfgroup.org/HDF5/>`_ correctly installed (via
`apt-get`, `brew`, or manual compilation) and in your respective
e.g. `apt-get`, `brew`, or manual compilation) and in your respective
environment paths.

The optional galaxy/halo photometry computation in ``CAESAR``
requires `python-fsps <http://dfm.io/python-fsps/current/>`_, which
is a python wrapper for the ``FSPS`` fortran package. Please follow
their `installation instructions
<http://dfm.io/python-fsps/current/installation/>`_ to install this.
Furthermore, you will also need two other packages that are only
available via ``pip``:

.. code-block:: bash
$> pip install synphot extinction
If you wish to use the MPI driver to run single instances of Caesar over
many cores via MPI, it is also necessary to install ``mpi4py``:

.. code-block:: bash
$> pip install numpy scipy cython h5py mercurial sympy
$> conda install mpi4py
Note that ``CAESAR`` is natively OpenMP-parallel, and the MPI implementation
may be system-specific.

----

yt
--

``CAESAR`` relies on yt version 3.3 or above. If you currently
have ``yt`` installed and its version number is less than 3.3 you
must
`update <http://yt-project.org/doc/installing.html#updating-yt-and-its-dependencies>`_
before ``CAESAR`` will function. You can check your current ``yt``
version via:
``CAESAR`` builds on the `yt <https://yt-project.org/>`_ simulation analysis toolkit.
``CAESAR`` currently requires yt version >=3.3, though when yt-4.0 is released it will
be updated to utilise this.

We recommend installing ``yt`` via Anaconda:

.. code-block:: bash
$> yt version
$> conda install -c conda-forge yt
but other installation options are `described here <https://yt-project.org/#getyt>`_.

If you already have ``yt``, you can check your version using ``yt version``, and
`update <http://yt-project.org/doc/installing.html#updating-yt-and-its-dependencies>`_
if necessary.

----

CAESAR
------

Expand All @@ -111,7 +132,7 @@ Once it finishes you should be ready to finally get some work done!
Updating
========

To update the code you simply need to pull down changes and reinstall:
To update ``CAESAR`` simply pull the changes and reinstall:

.. code-block:: bash
Expand Down

0 comments on commit 5111d5b

Please sign in to comment.