Aperture Extraction

A spectrum can be extracted from each trace found. It supports tophat and optimal extraction. In both cases, the sky background is fitted in one dimention only. The uncertainty at each pixel is also computed, but the values are only meaningful if correct gain and read noise are provided.

Tophat

The extraction loops over each pixel (x) position along the spectral direction. At pixel x, a slice with apwidth on either side of the trace (y), rounded to the nearest pixel, is summed to get the combined signal, sky and noise ADU. The slices of length skyidth with a spearation of skysep from the spectral slice are used to model the sky background fitted with a polynomial with an order of skydeg.

Optimal (horne86)

A LOWESS or Gaussian profile can be used for optimal extraction. Then at each step of the iteration, the new weighted model and data are compared until the difference is less than 0.01%. Detailed descriptions can be found in Horne 1986.

For more about the LOWESS profile, see statsmodels and on Wikipedia.

Optimal (marsh89)

An optimal extraction that fits the change in the profile across the dispersion direction. Detailed descriptions can be found in Marsh 1989.

../_images/fig_03_extraction_profile.jpg ../_images/fig_04_extraction_compared.jpg