Update: The best method for getting sims_maf_contrib
is to follow these instructions:
-
Install
sims
andsims_maf
following https://confluence.lsstcorp.org/display/SIM/MAF+Installation+and+Initial+Examples -
See the sims_maf_contrib README to install and use
sims_maf_contrib
.
The original instructions below are now out of date.
This is a short and unofficial tutorial on how to get sims_maf_contrib up and running on your machine. sims_maf_contrib
will be an important package to many astronomers who want to run and contribute new metrics that guide the LSST observing strategy.
This tutorial will use the LSST’s Conda packages to minimize build time. Good references along the way are
- The Catalogs and MAF confluence page has good sims installation instructions
-
The README for sims_maf_contrib for
sims_maf_contrib
-specific instructions. - @mjuric also produced a screencast showing an LSST stack binary installation with Conda. This tutorial borrows from and extends those instructions.
Installing the lsst-distrib Conda Package
1. Install Anaconda or Miniconda
Miniconda is the easiest way to get a good Python 2.7 on your machine: http://conda.pydata.org/miniconda.html
Download an installation script and run it. For example:
bash ~/Downloads/Miniconda-latest-MacOSX-x86_64.sh
This installs miniconda into ~/miniconda2
2. Add the Conda channel with LSST software
conda config --add channels http://research.majuric.org/conda/stable
This is mentioned at https://confluence.lsstcorp.org/display/SIM/Catalogs+and+MAF
3. Install the Stack with lsst-distrib
conda install lsst-distrib
This will take a while. The stack itself will be installed in your $CONDA_ROOT/opt/lsst
directory. You don’t need to cd into this directory at any time, though.
4. Setup the Eups environment
source eups-setups.sh
setup lsst_sims
You’ll need to do this every time you open a new shell.
5. Add a sims tag to Eups
Eups needs to know about the sims
tag used by the simulations group.
mkdir -p ~/.eups
vim ~/.eups/startup.py
and add the line
hooks.config.Eups.globalTags += ['sims’]
to startup.py
and save the file (:wq
).
This is a one-time operation.
Getting sims_maf_contrib
Now we follow instructions for sims_maf_contrib
itself at https://github.com/LSST-nonproject/sims_maf_contrib
6. Clone the sims_maf_contrib repo
Choose a directory to work in, and
git clone https://github.com/LSST-nonproject/sims_maf_contrib.git
cd sims_maf_contrib
7. Declare the sims_maf_contrib package to Eups
eups declare sims_maf_contrib -t $USER -r .
Ignore the Eups warning about absolute paths.
8. Setup the sims_maf_contrib package.
setup sims_maf_contrib -t $USER -t sims
Do this every time you open a new shell for working on sims_maf_contrib
.
Run sims_maf_contrib code and notebooks
Finally, you can run the ipython notebooks in the tutorials/ directory and contribute metrics.
cd tutorials
ipython notebook
and take a look at Index.ipynb