PypeIt Cookbook

This document gives an overview on how to run PypeIt, i.e. minimal detail is provided. Notes on Installing PypeIt are found elsewhere.

We now also provide a set of Slides that provide a more visual step-by-step. Find them here at the PYPEIT HOWTO These should be considered to contain the most up-to-date information.

The following outlines the standard steps for running PypeIt on a batch of data. There are alternate ways to run these steps, but non-experts should adhere to the following approach.

Outline

Here is the basic outline of the work flow. The following is for one instrument in one working directory.

  1. Organize/Prepare your data
  • Identify folder(s) with raw images
  • The raw images can be gzip compressed although the Python FITS reader works much more slowly on gzipped files
  • We will refer to that folder as RAWDIR
  1. Run the pypeit_setup without the –custom option to handle instrument Setups.

    Inputs are the path to the raw data with the data prefix (e.g. lrisb) and then one of the PypeIt-approved Instruments (e.g. keck_lris_blue, shane_kast_red). Here is an example:

    pypeit_setup -r /full_path/RAWDIR/lrisb  -s keck_lris_blue
    

    This does the following:

  • Generates a setup_files/ folder that holds two files
  • Generates a dummy PypeIt reduction file within the folder [ignore it]
  • Generates a .sorted file which lists files sorted by setup

You should scan the output WARNING messages for insufficient calibration files (e.g. missing arc frames)

  1. Inspect the Sorted File to confirm the expected instrument configuration(s)
  • If needed, add more files to your RAWDIR
  • If you do, repeat Step 2 above
  1. Run pypeit_setup with the –custom option

This produces one folder per setup and a custom PypeIt Reduction File. Here is an example of the call:

pypeit_setup -r /full_path/RAWDIR/lrisb  -s keck_lris_blue -c=all

This generates one folder per setup and a unique PypeIt Reduction File file in each folder.

  1. Prepare the custom PypeIt Reduction File for reducing a given setup
  • Enter one of the setup folders (e.g. kast_lris_blue_A)
  • Modify the custom PypeIt Reduction File as needed
    • trim/add calibration files
    • edit frametypes
    • Modify user-defined execution parameters
  1. Run the reduction (described in Running PypeIt)
  1. Examine QA (PypeIt QA)
  • When an exposure is fully reduced, a QA file (PDF) is generated in the QA folder
  • Examine the output as described in the PypeIt QA documentation
  1. Examine spectra
  1. Flux
  2. Coadd (see Coadd 1D Spectra)
  3. Repeat steps 5-10 for additional setups, as desired