/tutorials

DESI tutorials

Primary LanguageJupyter NotebookBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

DESI tutorials

This repository is for tutorials on simulating and working with DESI data. There are additional more detailed tutorials within many of the DESI code repositories; tutorials here are generally for:

  • Topics that span individual repositories, e.g. working with data challenge outputs
  • Tutorials to be presented at a collaboration meeting where we want to decouple updates to the tutorial itself from the desispec, desisim, etc. code versions that the tutorial is describing.
  • Some tutorials are grouped under a dated directory, e.g. Dec2020, for tutorials presented at a specific DESI meeting.

Getting started

These tutorials use a Jupyter server at NERSC, which provides pre-installed DESI code and access to all DESI data at NERSC without having to download or install anything locally.

First, get a NERSC account following the instructions on the DESI wiki. Then login to cori:

ssh cori.nersc.gov

Jupyter "kernels" define a specific set of code versions to use. To install DESI jupyter kernels from cori.nersc.gov (you only need to do this once):

source /project/projectdirs/desi/software/desi_environment.sh 20.8
$DESIMODULES/install_jupyter_kernel.sh 20.8
$DESIMODULES/install_jupyter_kernel.sh master

Get a copy of the tutorials on cori.nersc.gov:

mkdir -p $HOME/desi/git
cd $HOME/desi/git
git clone https://github.com/desihub/tutorials

Login at https://jupyter.nersc.gov and enter your credentials and OTP (One Time Password). Then, click on the Cori Shared CPU Node "Start" button. In the file browser on the left, navigate to wherever you cloned the tutorials repository. ($HOME/desi/git/tutorials in the above commands). Click on a tutorial to try it out.

If you click on a tutorial and it prompts you to "Select Kernel" from a drop down list, it means that the default tutorial kernel in GitHub isn't one of the ones that you have already installed and it is asking you to select from one of the kernels that you do have installed. In most cases the tutorials will work with the latest release (e.g. 20.8) and the "master" release (updated nightly, name to switch to "main" in 2021). Otherwise the text at the top of the tutorial will tell you which release is needed. Go back to cori.nersc.gov, run "$DESIMODULES/install_jupyter_kernel.sh VERSION" for the required version, and reload the Jupyter page.

Menu of tutorials

Tutorials in this repository include

These links allow you to browse the results of these tutorials from GitHub; to run them yourself follow the instructions in the "Getting started" section above.

Other tutorials

Tutorials hosted in other packages include (but haven't been recently vetted):

For authors of tutorials

Include at the beginning of the tutorial what is needed as a prerequisite for running the tutorial, e.g. specific codes, environment variables, datasets. It's OK to link elsewhere for detailed instructions (e.g. for how to install DESI code in general).