Cluster Generator (CG) is a cross-platform Python library for generating initial conditions of galaxy clusters for N-body / hydrodynamics codes. CG provides a variety of construction approaches, different physical assumption, profiles, and gravitational theories. Furthermore, CG is intented to interface with the vast majority of N-body / hydrodynamics codes, reducing the headache of converting initial conditions between formats for different simulation softwares. GCP's goal is to provide comprehensive tools for modeling and implementation of galaxy clusters in astrophysical simulations to promote the study of galaxy cluster dynamics.
This repository contains the core package, which is constructed modularly to facilitate easy development by users to meet particular scientific use cases. All of the necessary tools to get started building initial conditions are provided.
You can access the documentation here, or build it from scratch using the ./docs
directory in this source distribution.
Developement occurs here on Github, if you encounter any bugs, issues, documentation failures, or want to suggest features, we recommend that you submit an issue on the issues page of the repository.
For installation directions, continue reading this README, or visit the getting started page.
The cluster_generator
package can be obtained for python versions 3.8 and up. Installation instructions are provided
below for installation from source code, from pip
and from conda
.
Important
This feature is not yet available.
Important
This feature is not yet available.
Important
This feature is not yet available.
To install the library directly from source code, there are two options. If you are using / have installed pip, you can install directly from the github URL as follows:
-
Using your preferred environment (venv, local python installation, etc), call
pip install git+https://www.github.com/eliza-diggins/cluster_generator
This will install directly from this repository without generating a local clone.
-
If you're interested in having a local clone, you can instead do the following
-
First, clone the repository using
git clone https://www.github.com/eliza-diggins/cluster_generator
[!WARNING] Make sure to navigate to a directory where you want the clone to appear.
Once the clone has been generated, change your directory so that you are inside the clone and in the same directory as the
setup.py
script. Then run the following command:pip install .
This will install the local clone to your python installations
site-packages
directory. If you want to install the package in place, you can usepip install -e .
which will install the package in development mode.
[!WARNING] If the package is installed in development mode, it will not be generically available from any directory.
-
To test that you've installed the project, simply run
pip show cluster_generator
cluster_generator
is compatible with Python 3.8+, and requires the following
Python packages:
- unyt [Units and quantity manipulations]
- numpy [Numerical operations]
- scipy [Interpolation and curve fitting]
- h5py [h5 file interaction]
- tqdm [Progress bars]
- ruamel.yaml [yaml support]
- dill [Serialization]
- halo [Progress Spinners]
- pandas [Dataset Manipulations]
These will be installed automatically if you use pip
or conda
as detailed below.
Though not required, it may be useful to install yt
for creation of in-memory datasets from cluster_generator
and/or analysis of
simulations which are created using initial conditions from
cluster_generator
.
All contributions, bug fixes, documentation improvements, and ideas are welcome. If you're interested in pursuing further development of Cluster Generator, we suggest you start by browsing the API Documentation. When you're ready create a fork of this branch and begin your development. When you finish, feel free to add a pull request to this repositiory and we will review your code contribution.