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.
- 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
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)
- 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
- 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=allThis generates one folder per setup and a unique PypeIt Reduction File file in each folder.
- 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
- Run the reduction (described in Running PypeIt)
- run_pypeit PypeIt_file
- Hope for the best… :)
- 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
- Examine spectra
- Examine the extracted 1D spectra with pypeit_show_1dspec
- Examine the extracted 2D spectra with pypeit_show_2dspec
- Flux
- Coadd (see Coadd 1D Spectra)
- Repeat steps 5-10 for additional setups, as desired