In order to both better familiarize myself with reducing astronomical data (both the basics from a CCD and the additional steps needed for reducing spectra), and create a lasting document from which to quick-reference, I’ve decided to write up a summary of the steps needed.
This assumes that I have calibration exposures:
biases (zero-second exposures)
twighlight exposures – (labeled as ‘skyflat’ in my data, I assume) *these are used to create the illumination correction or ‘slit illumination function’
1. Examine flatfield exposure and determine the area of the chip that contains good data. Also determine the area of the chip that contains a flat overscan.
Overscan: typically the 32 columns at the RIGHT edge of the frames. We will average the data over all the columns in the overscan region, and fit these values as a function of line number. This fit will then be subtracted from each column in the image. The overscan is then chopped off. Typically chopping also includes the first/last few rows/columns…just in case
2. combine the biases into one image (using zerocombine)
3. before moving forward, remove the overscan region, process the average bias, and trim the first/last few lines/columns
(essentially, subtracting out the bias from the chip)
4. Creating a proper flat field exposure:
a. combine the flat-field exposures
b. fit a function in the dispersion direction to the combined flat-field (normalizing the combined flat-field)
c. process all target frames and skyflats using the combined flat-field (essentially, dividing out the flat field from all science images).
d. if there is some sort of gradient left over, use the the skyflats to create an illumination correction function, then turn on the illumination correction switch specifying these illumination function in ccdproc
The above is the basics for removing the biases and non-uniformity of the CCD. At this point, it should be considered that ZERO counts in a pixel is equal to zero light. Now there are additional steps for extracting and calibrating the spectrum you’ve obtained.
1. Find the spectrum
May be done manually or automatically (the latter works only when the desired spectrum has the strongest peak in the image)
2. Define the extraction window and the background window
3. Trace the centre of spatial profile as a function of the dispersion axis
4. Sum the spectrum within the extraction window, subtracting the sky
5. wavelength calibration – using the comparison lamp spectra
(optional) 6. flux calibration /normalization