<commit_before># Tutorial Guide to Running DESI Survey Simulations

The instructions below simulate the DESI survey as a sequence of tile exposures and record the observing conditions (airmass, seeing, exposure time) for each observation. Simulations are stochastic since the scheduling algorithms respond to randomly generated weather.

These instructions do not perform fiber assignment or simulate any spectra, but instead provide the necessary scheduling inputs for these tasks.

Please [create an issue](https://github.com/desihub/surveysim/issues/new) with any corrections or suggestions for improvement to this tutorial.

## Install Software

If this is your first exposure to DESI software, [start here](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted). We use [git for source control](https://desi.lbl.gov/trac/wiki/Computing/UsingGit) and you will need to install the base DESI packages [on your laptop](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted/Laptop)
or else [work at NERSC](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted/NERSC).  The instructions below have not yet been tested at NERSC.

The instructions below assume that you have already installed recent versions of the following DESI packages:
- specsim
- desiutil
- desimodel
- desisurvey
- surveysim

If you are not sure about how to do this or just want a specific recipe, the following instructions assume that you have installed the [anaconda scientific python distribution](https://docs.continuum.io/anaconda/install) and will create a new python environment for your DESI work. Start from the directory you wish to install software into, then:
```
conda create --name desi --yes python=3.5 numpy scipy astropy pyyaml requests ipython h5py scikit-learn matplotlib
source activate desi
pip install fitsio
pip install speclite
for package in specsim desiutil desimodel desisurvey surveysim:
    git clone https://github.com/desihub/$package
    cd $package
    python setup.py install
    cd ..
export DESIMODEL=$PWD/desimodel<commit_msg>Add healpy to list of pip installs<commit_after># Tutorial Guide to Running DESI Survey Simulations

The instructions below simulate the DESI survey as a sequence of tile exposures and record the observing conditions (airmass, seeing, exposure time) for each observation. Simulations are stochastic since the scheduling algorithms respond to randomly generated weather.

These instructions do not perform fiber assignment or simulate any spectra, but instead provide the necessary scheduling inputs for these tasks.

Please [create an issue](https://github.com/desihub/surveysim/issues/new) with any corrections or suggestions for improvement to this tutorial.

## Install Software

If this is your first exposure to DESI software, [start here](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted). We use [git for source control](https://desi.lbl.gov/trac/wiki/Computing/UsingGit) and you will need to install the base DESI packages [on your laptop](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted/Laptop)
or else [work at NERSC](https://desi.lbl.gov/trac/wiki/Pipeline/GettingStarted/NERSC).  The instructions below have not yet been tested at NERSC.

The instructions below assume that you have already installed recent versions of the following DESI packages:
- specsim
- desiutil
- desimodel
- desisurvey
- surveysim

If you are not sure about how to do this or just want a specific recipe, the following instructions assume that you have installed the [anaconda scientific python distribution](https://docs.continuum.io/anaconda/install) and will create a new python environment for your DESI work. Start from the directory you wish to install software into, then:
```
conda create --name desi --yes python=3.5 numpy scipy astropy pyyaml requests ipython h5py scikit-learn matplotlib
source activate desi
pip install fitsio speclite ephem healpy
for package in specsim desiutil desimodel desisurvey surveysim:
    git clone https://github.com/desihub/$package
    cd $package
    python setup.py install
    cd ..
export DESIMODEL=$PWD/desimodel
{'fraction_non_alphanumeric': 0.06390243902439025, 'fraction_numerical': 0.0014634146341463415, 'mean_word_length': 4.833570412517781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3254600', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1067, 'n_words': 489}