Emerge, an Empirical ModEl for the foRmation of GalaxiEs, is a freely available code that populates simulated dark matter halo merger trees with galaxies using simple empirical relations between galaxy and halo properties. For each model represented by a set of parameters, it computes a mock universe, which it then compares to observed statistical data to obtain a likelihood. Parameter space can be explored with several advanced stochastic algorithms such as MCMC to find the models that are in agreement with the observations. For any model, Emerge can generate mock galaxy catalogues and main branch histories.

The code is written in ANSI C and supports massively parallel computers with distributed memory. Emerge uses an explicit communication model that is implemented with the standardized message passing interface (MPI) and suports hyperthreading via the OpenMP interface. It can be run on essentially all supercomputer systems, including clusters of workstations or individual personal computers. Emerge has been tested with more than 10,000 computing cores and shows near perfect scaling. The main reference for the scientific methods that are used in this code is the paper by Moster, Naab & White (2018), and references therein. This website and the included user guide provide additional technical information about the code to allow anyone interested an independent use of the code. For support beyond this documemtation, users can join the Gitter community.

Emerge is made publicly available under the GNU general public license version 3. This implies that the sources may be freely copied, distributed, or modified, but the copyright for the original code remains with the author. All users that the code useful for their scientific work are kindly asked to include a reference to the Emerge paper in all studies that use data obtained with the public code.

Getting the code

Emerge is available in a git repository hosted on GitHub and can be obtained either by cloning the git repository
git clone
or by downloading a compressed tarball of the latest version:
To compile Emerge, a few necessary libraries need to be installed (MPI, GSL, and optionally HDF5).


The developers of Emerge acknowledge many helpful discussions with Peter Behroozi, Andreas Burkert, Joanne Cohn, Darren Croton, Benedikt Diemer, George Efstathiou, Michael Fall, Martin Haehnelt, Andrew Hearin, Bruno Henriques, Ben Hoyle, Houjun Mo, Jerry Ostriker, Debora Sijacki, Rachel Somerville, Jeremy Tinker, and Frank van den Bosch. The authors also acknowledge financial support by the German Research Foundation through the Emmy Noether grant MO 2979/1-1, and by the Cluster of Excellence 'Origin and Structure of the Universe'.

User Guide

A detailed description of the compilation and usage can be found in the user guide, which is included in the repository both as a pdf file (user-guide.pdf) and as a markdown file ( A complete version of the user guide can also be found on this website, see the link below. Further, a cross-referenced documentation of the source code can be accessed below. It also contains a short description of the code usage, and the various code options and parameters.

Gitter Community

If the documentation provided in the user guide is not sufficient, users can join the Emerge Gitter community, which hosts rooms to discuss how to use the code, report problems and bugs, and suggest new features. This community provides a publicly accessible place for any code related question. More advanced users are also encouraged to join the community to share their experience and help other users. A link to the comminity is given below.


Emerge needs dark matter halo merger trees as input data, and creates several output data, such as galaxy catalogues and main branch histories. For the format of these files, please consult the user guide.

Halo merger trees

To run Emerge, dark matter halo merger trees have to be provided in a specific binary format. This can either be achieved by creating the files following the format given in the user guide, or by using the tools provided in the code repository to convert merger tree files created with the consitent-trees code to the Emerge format. Although there is no specific code recommendation by the authors, the following pipeline has been used in the Emerge paper: creating a power spectrum and transfer function with CAMB, computing initial conditions with MUSIC, running the dark matter simulation with Gadget, finding the dark matter haloes with Rockstar, and creating halo merger trees with consitent-trees.

To provide an easy access to Emerge, without the need for following the pipeline to create the trees, pre-generated halo merger trees in the Emerge format are provided here. They have been extracted from a dark matter simulation box with 67.81 Mpc/h side length using a cosmology with: H = 67.81 km s-1 Mpc-1, ΩM = 0.308, ΩΛ = 0.692, and Ωb = 0.0484. These files have not been included in the code repository because of their size, but can be downloaded by following the link below.

Mock galaxy catalogues

Once a suitable model has been found, Emerge generates mock galaxy catalogues that can be used to compare to observations and simulations. Mock catalogues for the best-fit model can be downloaded from this website, see the link below. The files can be optained in either ASCII or HDF5 format. For details on the structure of the files, please consult the user guide. All catalogues are based on a dark matter simulation with a box size of 200 Mpc.

Main branch histories

As each halo in the merger trees is populated with a galaxy, it becomes possible to follow the formation of individual galaxies through cosmic time. To this end, Emerge writes the properties of galaxies on the main branch to different files. Example main branch histories can be downloaded from this website, see the link below. The files can be optained in either ASCII or HDF5 format. For details on the structure of the files, please consult the user guide. All formation histories are based on a dark matter simulation with a box size of 200 Mpc.


Publications that use results by Emerge


The developers of Emerge

Benjamin P. Moster

University Observatory, LMU Munich
moster at

Thorsten Naab

Max Planck Institute for Astrophysics, Garching
naab at

Joseph A. O'Leary

University Observatory, LMU Munich
joleary at

Simon D. M. White

Max Planck Institute for Astrophysics, Garching
swhite at