Installation
AGILE may be installed using Docker (https://www.docker.com/), or manually installing the required external dependencies. The exact manual installation steps could vary from the target machine, while the docker container ought to be portable. We detail both these steps here.
Docker installation
Get the AGILE Dockerfile
wget https://www.ict.inaf.it/gitlab/akke.viitanen/lsst_inaf_agile/-/raw/angela_install/etc/docker/Dockerfile?ref_type=heads
Build the Docker image
docker build -t agile:latest .
Run the Docker image
docker run -it agile:latest /bin/bash
This will launch the container with an initialized AGILE environment. Within the environment, the external dependencies (e.g. EGG, imSim, and the LSST Science Pipelines) can be run directly without further configuration.
Manual installation
Due to the modular nature, installation of AGILE is done in a few distinct steps that are detailed here.
An installation script is provided, which could very well work on a typical
UNIX-based system. The install script is located in install.sh (see
src/scripts/install.sh in the repository). The script attempts to simply
automatize the steps that are detailed here. It is recommended to read through
the following sections in order to gain an understanding of what is being
installed and why.
Installing the AGILE repository
We will install AGILE under the directory AGILE_DIR, which can be freely chosen by the user. For example:
export AGILE_DIR=/home/user/lsst_inaf_agile
For the rest of the installation, we refer to this path as $AGILE_DIR. The main AGILE repository contains the actual pipeline as well as necessary data files for running the software. To clone the repository, run the following commands:
git clone \
https://www.ict.inaf.it/gitlab/akke.viitanen/lsst_inaf_agile.git \
"$AGILE_DIR"
Then, a virtual environment is created by using the python module venv
cd "$AGILE_DIR"
python -m venv ./venv
Finally, this environment is activate by using
cd "$AGILE_DIR"
. venv/bin/activate
pip install -e .
The virtual environment should be activated each time a new terminal session is activated.
Installing EGG
AGILE uses EGG (Empirical Galaxy Generator) for the creation of the truth
galaxy catalog. In addition, EGG requires the vif library to be installed. The
installation of both of these components is described in the EGG documentation
https://cschreib.github.io/egg/files/EGG.pdf
The only AGILE consideration is that we recommend to install EGG and
vif under opt/ e.g. to use the following paths:
$AGILE_DIR/opt/egg
$AGILE_DIR/opt/vif
Note that AGILE uses a custom stellar mass function for EGG based on the
COSMOS2020 galaxies. In addition, the filter bandpasses are provided in the EGG
format. These are described in the EGG documentation. The stellar mass
function as well as the filter bandpasses are shipped with the AGILE repository
and are located in
$AGILE_DIR/data/egg/share
Installing imSim
AGILE uses imSim (https://lsstdesc.org/imSim/) to simulate synthetic
LSST-like images. The installation instructions for imSim are provided
online (https://lsstdesc.org/imSim/install.html). While any of the provided
installation methods may work, the conda method has been tried and tested
by the AGILE team. The details are provided here:
https://lsstdesc.org/imSim/install.html#method-2-conda-and-the-stackvana-package
Installing the LSST Science Pipelines
AGILE uses the LSST Science Pipelines (https://pipelines.lsst.io/) to both
reduce and analyze the simulated images. The installation of the LSST Science
Pipelines is described here: https://pipelines.lsst.io/#installation. The
lsstinstall method has been tried and tested.
To use the LSST Science Pipelines with AGILE, an additional set of
calibration-level data should be downloaded. Instructions on downloading these
repo_assets follow:
# Create repo_assets directory
mkdir $AGILE_DIR/data/repo_assets
# Extract the files from https://portal.nersc.gov/cfs/descssim/imSim/repo_assets/
# to the created directory
. src/scripts/download_repo_assets.sh $AGILE_DIR/data/repo_assets
# Point REPO_ASSET_DIR environment variable to the location
export REPO_ASSET_DIR=$AGILE_DIR/data/repo_assets