Reduction Tips


This document describes commonly adjusted User-level Parameters related to object finding, sky-subtraction, and extraction of the spectra.

It assumes (but does not require):

  1. You have already generated a set of Spec2D Output files.

  2. You have inspected the spectra wish to improve aspects of them.

Object Finding

Refer to Object Finding for full details on the algorithm. This process is guided by the FindObjPar Keywords.

The most common to modify is snr_thresh, which sets the search for any source with peak flux in excess of snr_thresh times the RMS. The default is 10 and you may wish to reduce this parameter. Add the following to the Parameter Block:

        snr_thresh = 3.

This will search for any source with peak flux 3-sigma above the estimated RMS in the smashed slit profile.

No 1D Spectra Extracted

If you are missing 1D spectra, this means that PypeIt did not find any objects in the corresponding frame. Here are some common modifications that you can make to your Parameter Block to remedy this. It may help to run the reduction on a few of your exposures in -s mode to make sure that your modifications are being implemented the way you intend.

  • Ensure that the slits are correctly identified. See Slit Tracing for tips on how to adjust your slit edges (for example, modifying edge_thresh or minimum_slit_length) and add or remove a slit.

  • Modify the significance threshold for object finding (see above).

  • Modify the maximum number of objects that you expect to see in your frames. The default is 10, but, for example, if your exposure only contains one object of interest, you will want to change your Parameter Block to look like this:

            maxnumber = 1
  • Modify the FWHM of your object of interest in pixels. The default is 10, but you may want to increase or decrease this, depending on the number of pixels per spatial PSF:

            find_fwhm = 8.


Emission Lines

It is common for bright emission lines to spatially extend beyond the source continuum, especially for galaxies. In these cases, the code may reject the emission lines because they present a different spatial profile from the majority of the flux.

While this is a desired behavior for optimal extraction of the continuum, it leads to incorrect and non-optimal fluxes for the emission lines.

The current mitigation is to allow the code to reject the pixels for profile estimation but then to include them in extraction. This may mean the incurrence of cosmic rays in the extraction.

Here is the expert move. Add the following to the Parameter Block:

        use_2dmodel_mask = False

And it is likely you will want to use the BOXCAR extractions instead of OPTIMAL. But do a comparison.