Installation

The most straightforward way to install yt_astro_analysis is to first install yt. This will take care of all yt_astro_analysis dependencies. After that, yt_astro_analysis can be installed with pip:

$ pip install yt-astro-analysis

If you use conda to manage packages, you can install yt_astro_analysis from conda-forge:

$ conda install -c conda-forge yt-astro-analysis

Note, the package name is spelled with hyphens (yt-astro-analysis) when installing from pip or conda. With pip, the package name can be spelled with either hyphens or underscores, but with conda it must always be hyphens.

Installing from source

To install from source, it is still recommended to first install yt in the manner described above. Then, clone the git repository and install like this:

$ git clone https://github.com/yt-project/yt_astro_analysis
$ cd yt_astro_analysis
$ pip install -e .

Installing with Rockstar support

Note

As of yt_astro_analysis version 1.1, yt_astro_analysis runs with the most recent version of rockstar-galaxies. Older versions of rockstar will not work.

Rockstar support requires yt_astro_analysis to be installed from source. Before that, the rockstar-galaxies code must also be installed.

Warning

If using the conda version or building from source with Peter Behroozi’s repository, the following command must be issued after loading the resulting halo catalog in yt:

ds = yt.load(...)
ds.parameters["format_revision"] = 2

Installing rockstar-galaxies through conda

If you are using conda to manage packages, you can install rockstar-galaxies as follows

$ conda install -c conda-forge rockstar-galaxies

Then, go into the yt_astro_analysis source directory and install it.

$ cd yt_astro_analysis
$ pip install -e .

Installing rockstar-galaxies from source

Alternatively, you can install rockstar-galaxies from source. Two recommended repositories exist for installing rockstar-galaxies, this one, by the original author, Peter Behroozi, and this one, maintained by John Wise.

To install rockstar-galaxies, do the following:

$ git clone https://bitbucket.org/jwise77/rockstar-galaxies
$ cd rockstar-galaxies
$ make lib

Then, go into the yt_astro_analysis source directory and add a file called “rockstar.cfg” with the path the rockstar-galaxies repo you just cloned. Then, install yt_astro_analysis.

$ cd yt_astro_analysis
$ echo <path_to_rockstar> > rockstar.cfg
$ pip install -e .

Finally, if you installed rockstar-galaxies from source, you’ll need to make sure that the location of librockstar-galaxies.so is in your LD_LIBRARY_PATH.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_rockstar>