Installation instructions¶
Requirements¶
Running the BEAST requires:
Python >= 3.9
One easy way to obtain the above is through the AstroConda Python stack:
First install Miniconda which contains the conda package manager. Once Miniconda is installed, you can use the
condacommand to install any other packages and create environments, etc.Create a conda environment for the BEAST. Replace <env_name> with the name of the conda environment you want (e.g.,
beast). The specific version of python can be different than 3.11, note it must be at least 3.8.
$ conda create -n <env_name> python=3.12
Switch to this newly create conda environment
$ conda activate <env_name>
Installation for Users¶
In addition to installing the code, library files also need to be installed. See BEAST Library Files.
Using pip¶
beast can be installed using pip. This installs the latest released version.
$ pip install beast
If you already have an older version installed, use:
$ pip install --upgrade beast
Or, from the repository directly. This installs the development version with the latest features.
$ pip install git+https://github.com/BEAST-Fitting/beast.git
From source¶
If you are happy with your current environment, beast can also be installed from
the source code in the normal python fashion after cloning from the git repo or
downloading from Github
$ pip install .
If you are using conda, you may wish to create a conda environment with the dependencies before doing the install
$ conda env create -n beast --file conda-environment.yml
$ conda activate beast
$ pip install .
Installation for Developers¶
If you plan on modifying the beast in addition to running the code, it may
be useful to create a development installation. First, create a fork of the
official beast repository and clone it:
$ git clone https://github.com/YourName/beast.git
Optionally, you can rename this cloned copy:
$ git clone https://github.com/YourName/beast.git beast-YourName
Set the value of the fork’s ‘upstream’ to the official distribution so you can incorporate changes made by others to your development fork. In the clone of your fork, run the following:
$ git remote add upstream https://github.com/BEAST-Fitting/beast.git
In order to run a development installation, navigate to the directory in your
beast repository that contains setup.py, and run:
$ pip install -e .
BEAST Library Files¶
For the BEAST to work properly, you need to place a set of files in a directory. These files contain information related to filters, stellar atmospheres, and in the future stellar evolution models.
Manual download¶
The required library files can be manually acquired from:
https://stsci.box.com/v/beastlibs
Note that the archive at this link contains a folder called files. The
contents of this folder are the library files required by the BEAST. These files need to be placed within (any of) the possible locations specified in Location.
Script download¶
Alternatively, after installing the BEAST, run the following script and the library files will be downloaded into the location specified in Location:
$ beast get_libfiles
Location¶
There are 2 possible locations for the required library files. The possible locations are (in the order the code will search for them):
In a directory designated by a BEAST_LIBS environment variable.
In the
.beastdirectory in the home directory of the current user (ie,~/.beast); this is usually the easiest and will be automatically created if it doesn’t exist.