|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": { |
| 6 | + "slideshow": { |
| 7 | + "slide_type": "slide" |
| 8 | + } |
| 9 | + }, |
| 10 | + "source": [ |
| 11 | + "# Title\n", |
| 12 | + "<br>Owner(s): **First Owner** ([@username1](https://github.com/LSSTScienceCollaborations/StackClub/issues/new?body=@username1)), **Second Owner** ([@username2](https://github.com/LSSTScienceCollaborations/StackClub/issues/new?body=@username2))\n", |
| 13 | + "<br>Last Verified to Run: **20XX-XX-XX**\n", |
| 14 | + "<br>Verified Stack Release: **16.0**\n", |
| 15 | + "\n", |
| 16 | + "### Learning Objectives:\n", |
| 17 | + "\n", |
| 18 | + "After working through this tutorial you should be able to: \n", |
| 19 | + "1. Do this thing;\n", |
| 20 | + "2. Do this other thing;\n", |
| 21 | + "3. Understand this concept;\n", |
| 22 | + "4. Produce your own etc etc.\n", |
| 23 | + "\n", |
| 24 | + "### Logistics\n", |
| 25 | + "This notebook is intended to be runnable on `lsst-lsp-stable.ncsa.illinois.edu` from a local git clone of https://github.com/LSSTScienceCollaborations/StackClub.\n", |
| 26 | + "\n", |
| 27 | + "## Set-up" |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "cell_type": "markdown", |
| 32 | + "metadata": {}, |
| 33 | + "source": [ |
| 34 | + "The next few cells give you some options for your \"Set-up\" section - you may not need them all." |
| 35 | + ] |
| 36 | + }, |
| 37 | + { |
| 38 | + "cell_type": "markdown", |
| 39 | + "metadata": {}, |
| 40 | + "source": [ |
| 41 | + "We'll need the `stackclub` package to be installed. If you are not developing this package, you can install it using `pip`, like this:\n", |
| 42 | + "```\n", |
| 43 | + "pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub\n", |
| 44 | + "```\n", |
| 45 | + "If you are developing the `stackclub` package (eg by adding modules to it to support the Stack Club tutorial that you are writing, you'll need to make a local, editable installation. In the top level folder of the `StackClub` repo, do:" |
| 46 | + ] |
| 47 | + }, |
| 48 | + { |
| 49 | + "cell_type": "code", |
| 50 | + "execution_count": null, |
| 51 | + "metadata": {}, |
| 52 | + "outputs": [], |
| 53 | + "source": [ |
| 54 | + "! cd .. && python setup.py -q develop --user && cd -" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "markdown", |
| 59 | + "metadata": {}, |
| 60 | + "source": [ |
| 61 | + "When editing the `stackclub` package files, we want the latest version to be imported when we re-run the import command. To enable this, we need the %autoreload magic command." |
| 62 | + ] |
| 63 | + }, |
| 64 | + { |
| 65 | + "cell_type": "code", |
| 66 | + "execution_count": null, |
| 67 | + "metadata": {}, |
| 68 | + "outputs": [], |
| 69 | + "source": [ |
| 70 | + "%load_ext autoreload\n", |
| 71 | + "%autoreload 2" |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + "cell_type": "markdown", |
| 76 | + "metadata": { |
| 77 | + "slideshow": { |
| 78 | + "slide_type": "slide" |
| 79 | + } |
| 80 | + }, |
| 81 | + "source": [ |
| 82 | + "You can find the Stack version that this notebook is running by using eups list -s on the terminal command line:" |
| 83 | + ] |
| 84 | + }, |
| 85 | + { |
| 86 | + "cell_type": "code", |
| 87 | + "execution_count": null, |
| 88 | + "metadata": {}, |
| 89 | + "outputs": [], |
| 90 | + "source": [ |
| 91 | + "# What version of the Stack am I using?\n", |
| 92 | + "! echo $HOSTNAME\n", |
| 93 | + "! eups list lsst_distrib -s" |
| 94 | + ] |
| 95 | + }, |
| 96 | + { |
| 97 | + "cell_type": "markdown", |
| 98 | + "metadata": { |
| 99 | + "slideshow": { |
| 100 | + "slide_type": "subslide" |
| 101 | + } |
| 102 | + }, |
| 103 | + "source": [ |
| 104 | + "For this tutorial we'll need the following modules:" |
| 105 | + ] |
| 106 | + }, |
| 107 | + { |
| 108 | + "cell_type": "code", |
| 109 | + "execution_count": null, |
| 110 | + "metadata": {}, |
| 111 | + "outputs": [], |
| 112 | + "source": [ |
| 113 | + "%matplotlib inline\n", |
| 114 | + "#%matplotlib ipympl\n", |
| 115 | + "\n", |
| 116 | + "import os\n", |
| 117 | + "import numpy as np\n", |
| 118 | + "import matplotlib as mpl\n", |
| 119 | + "import matplotlib.pyplot as plt\n", |
| 120 | + "from IPython.display import IFrame, display, Markdown\n", |
| 121 | + "import warnings\n", |
| 122 | + "\n", |
| 123 | + "# Filter some warnings printed by v16.0 of the stack\n", |
| 124 | + "warnings.simplefilter(\"ignore\", category=FutureWarning)\n", |
| 125 | + "warnings.simplefilter(\"ignore\", category=UserWarning)" |
| 126 | + ] |
| 127 | + }, |
| 128 | + { |
| 129 | + "cell_type": "code", |
| 130 | + "execution_count": null, |
| 131 | + "metadata": {}, |
| 132 | + "outputs": [], |
| 133 | + "source": [ |
| 134 | + "import lsst.daf.persistence as dafPersist\n", |
| 135 | + "import lsst.daf.base as dafBase\n", |
| 136 | + "\n", |
| 137 | + "import lsst.afw.math as afwMath\n", |
| 138 | + "import lsst.afw.geom as afwGeom\n", |
| 139 | + "\n", |
| 140 | + "import lsst.afw.detection as afwDetect\n", |
| 141 | + "import lsst.afw.image as afwImage\n", |
| 142 | + "import lsst.afw.table as afwTable\n", |
| 143 | + "\n", |
| 144 | + "import lsst.afw.display as afwDisplay" |
| 145 | + ] |
| 146 | + }, |
| 147 | + { |
| 148 | + "cell_type": "markdown", |
| 149 | + "metadata": { |
| 150 | + "slideshow": { |
| 151 | + "slide_type": "slide" |
| 152 | + } |
| 153 | + }, |
| 154 | + "source": [ |
| 155 | + "## Section Title\n", |
| 156 | + "\n", |
| 157 | + "Explain what we are going to do in this section." |
| 158 | + ] |
| 159 | + }, |
| 160 | + { |
| 161 | + "cell_type": "code", |
| 162 | + "execution_count": null, |
| 163 | + "metadata": { |
| 164 | + "slideshow": { |
| 165 | + "slide_type": "-" |
| 166 | + } |
| 167 | + }, |
| 168 | + "outputs": [], |
| 169 | + "source": [ |
| 170 | + "# If a particular line of python needs explaining, do it!\n", |
| 171 | + "print(\"Hello World\")" |
| 172 | + ] |
| 173 | + }, |
| 174 | + { |
| 175 | + "cell_type": "markdown", |
| 176 | + "metadata": {}, |
| 177 | + "source": [ |
| 178 | + "## Summary\n", |
| 179 | + "\n", |
| 180 | + "Remind the user what they have done, and what they should now be able to do." |
| 181 | + ] |
| 182 | + }, |
| 183 | + { |
| 184 | + "cell_type": "markdown", |
| 185 | + "metadata": {}, |
| 186 | + "source": [ |
| 187 | + "You could also point them to a related tutorial or reference source, to help them go further." |
| 188 | + ] |
| 189 | + } |
| 190 | + ], |
| 191 | + "metadata": { |
| 192 | + "celltoolbar": "Slideshow", |
| 193 | + "kernelspec": { |
| 194 | + "display_name": "LSST", |
| 195 | + "language": "python", |
| 196 | + "name": "lsst" |
| 197 | + }, |
| 198 | + "language_info": { |
| 199 | + "codemirror_mode": { |
| 200 | + "name": "ipython", |
| 201 | + "version": 3 |
| 202 | + }, |
| 203 | + "file_extension": ".py", |
| 204 | + "mimetype": "text/x-python", |
| 205 | + "name": "python", |
| 206 | + "nbconvert_exporter": "python", |
| 207 | + "pygments_lexer": "ipython3", |
| 208 | + "version": "3.6.6" |
| 209 | + }, |
| 210 | + "livereveal": { |
| 211 | + "scroll": true, |
| 212 | + "start_slideshow_at": "selected" |
| 213 | + } |
| 214 | + }, |
| 215 | + "nbformat": 4, |
| 216 | + "nbformat_minor": 2 |
| 217 | +} |
0 commit comments