Draft: Notebook title#


Imports#

Describe the libraries we’re using here. If there’s something unusual, explain what the library is, and why we need it.

  • numpy to handle array functions

  • astropy.io fits for accessing FITS files

  • astropy.table Table for creating tidy tables of the data

  • matplotlib.pyplot for plotting data

%matplotlib inline
import numpy as np
from astropy.io import fits
from astropy.table import Table
import matplotlib.pyplot as plt
from astroquery.mast import Mast
from astroquery.mast import Observations

Introduction#

Write a short introduction explaining the purpose of the notebook. Link to any background materials/resources that may be useful to the reader to provide additional context.

Defining terms#

Be sure to define any terms/common acronyms at the end of your introduction that your audience may not know. If you’re using some kind of domain-specific astronomical symbol or unusual mathematical concept, make sure you define it (e.g. in its mathematical form) and link to any definitions (literature/Wikipedia etc.).


Loading data#

If the user needs to download data to run the tutorial properly, where possible, use Astroquery (or similar) to retrieve files. If this is not possible, see the data guide for other options.

For example, if we wanted to query for data from MAST for Kepler we might do something like:

keplerObs = Observations.query_criteria(target_name='kplr008957091', obs_collection='Kepler')
keplerProds = Observations.get_product_list(keplerObs[0])
yourProd = Observations.filter_products(keplerProds,extension='kplr008957091-2012277125453_lpd-targ.fits.gz',
                                        mrp_only=False)

Where possible (if the code supports it): use code examples that use Jupyter to show what’s in the data. For example, if you are showing an object such as a Table, display a preview of the table:

yourProd[0:5]
# Download the products
Observations.download_products(yourProd, mrp_only=False, cache=False)

File information#

Explain pertinent details about the file you’ve just downloaded. For example, if working with Kepler lightcurves, explain what’s in the different file extensions:

- No. 0 (Primary): This HDU contains meta-data related to the entire file.
- No. 1 (Light curve): This HDU contains a binary table that holds data like flux measurements and times. We will extract information from here when we define the parameters for the light curve plot.
- No. 2 (Aperture): This HDU contains the image extension with data collected from the aperture. We will also use this to display a bitmask plot that visually represents the optimal aperture used to create the SAP_FLUX column in HDU1.

Sections (xN)#

The meat of your notebook should be sub-divided into sections with useful names to whatever extent makes sense base on the content. Break sections up with standard Markdown syntax headings:

# Section 1

Intro to section 1

### Sub-section 1a

More detailed info about Section 1

## Section 2

A complete thought that's as important as section 1 but doesn't need sub-sections.

Exercises#

Most notebooks are trying to convey some information to their reader. It’s often a good idea, if possible, to include in the notebook something where there is not an included answer so that the reader can cement in their mind how whatever it is they were supposed to learn from that notebook. If you do have exercise(s), be sure to leave a blank code cell underneath to show the user that it’s meant for them to try it out right there. You may also want to include a “solutions” notebook next to your main notebook for the user to look at after they have finished their attempt.

Aditional Resources#

While this isn’t always necessary, sometimes you want to provide some more resources for the reader who wants to learn something beyond what’s in the notebook. Sometimes these don’t exist, but if they do, it’s good to put them at the end to give the reader somewhere else to go. Usually a list of links using markdown bullet-plus-link format is appropriate:

About this notebook#

Let the world know who the author of this great notebook is! If possible/appropriate, include a contact email address for users who might need support (e.g. archive@stsci.edu)

Author: Jessie Blogs, Archive Scientist.
Updated On: YYYY-MM-DD


Top of Page Space Telescope Logo