Stack requirements:

The general philosophy of the LSST software stack is that some python dependencies are so ubiquitous in scientific computing environments that it is more difficult for users to provide new versions than it is to supply them with the stack.  The simulations framework relies on the following dependencies that are not part of the LSST stack:

The recommended install instructions will provide these dependencies for you through an Anaconda distribution.  

Recommended Installation Instructions

The recommended (simplest) approach is to use the newest W14 LSST software stack, and use the LSST-provided version of anaconda python. (See here if you want to use your own python). 

1. Start by installing the necessary parts of the LSST software stack and the LSST-installed anaconda. 

In these instructions we assume you are installing in ~/lsst, however the install directory can be any place in the file system, including a place visible to all users.  To install in another location, replace ~/lsst with the desired path in the following instructions.  For multi user stacks, permissions are typically restricted to read only for the main stack so packages are not accidentally installed in the main stack.

mkdir -p ~/lsst
cd ~/lsst
curl -O http://sw.lsstcorp.org/eupspkg/newinstall.sh
bash newinstall.sh

Choose yes when prompted to install Anaconda.  Choose yes when prompted to install git**.   These packages will not interfere with your system installed versions. This step will download about 1 GB of files to your machine.

** Only choose 'yes' to install git if your current version is prior to git 1.7 or you have curl-devel installed on your system.

 2. Set up the environment and install the simulations code and data.

Source the appropriate shell script and use eups (see here for more info) to install the software and data. 

source ~/lsst/loadLSST.csh 
eups distrib install lsst_sims -t sims

This will install all packages currently in the catalogs simulations framework (CatSim) and metrics analysis framework and all dependencies.  Currently the complete list of installed packages is:

 

Any of the above packages and all their dependencies can be installed by replacing lsst_sims with the appropriate package name in the above code snippet (e.g. sims_maf).  Installation is now complete.  See package specific pages for documentation.

 

Known issues: 

If you have issues with installation, first check that your system meets the minimum requirements listed here: LSST software user guide prerequisites.

If you are having issues specifically with pyephem on a Mac, check for the existence of a /Developer directory. This is obsolete after upgrading to newer versions of XCode, but not removed by the XCode installer. Rename the /Developer directory and pyephem will install. 

If you are using your own python, be sure to check the Using Your Own Python page. 

Mixing Installed Stack with Development Repositories

If you are going beyond simply using software packages provided by LSST and need a direct git clone of a particular repository (because you wish to contribute development work directly back into repository or because a new feature is available but has not been released officially yet), you can mix an installed stack with development repositories. For pure python packages, this is straightforward.  The following steps will put a local copy of the sims_maf git repository into a pre-existing stack.   **Note you do not have to do this just to install and use any sims package, such as MAF.

All packages may be declared with a version and a tag.  The version distinguishes on instance of a particular package from another.  The eups tag can be used to define a coherent set of packages.  The philosophy is to tag all personal package (packages downloaded via git) with a custom tag using the username.  Using this workflow allows packages to be set up with the -t $USER switch which means that custom packages are used if they are declared and main stack packages are used otherwise.

1. Move to a directory to hold the working repository and clone it:

mkdir ~/lsstRepos; cd ~/lsstRepos
git clone https://$USER@stash.lsstcorp.org/scm/sim/sims_maf.git

Note that you will need a password on the stash server (or have set up ssh keys) to push to the server.

2. Declare and build the package:

cd sims_maf
eups declare -r . -t $USER
setup sims_maf -t $USER
scons

See here for the confluence question dealing with how to be polite in a shared stack.  

3. Code, commit and push

Code reviews should be handled by branching the repository and issuing a pull request through stash.