<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998) originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Sky Subtraction</TITLE> <META NAME="description" CONTENT="Sky Subtraction"> <META NAME="keywords" CONTENT="vol2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK REL="STYLESHEET" HREF="vol2.css"> <LINK REL="next" HREF="node133.html"> <LINK REL="previous" HREF="node127.html"> <LINK REL="up" HREF="node120.html"> <LINK REL="next" HREF="node133.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3091" HREF="node133.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html3088" HREF="node120.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html3082" HREF="node131.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html3090" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html3092" HREF="node133.html">Flux Calibration</A> <B> Up:</B> <A NAME="tex2html3089" HREF="node120.html">Long-Slit and 1D Spectra</A> <B> Previous:</B> <A NAME="tex2html3083" HREF="node131.html">Resampling the Data</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION001040000000000000000"> Sky Subtraction</A> </H1> <P> As stated before, sky<A NAME="5846"> </A> subtraction can be a very critical step in the reduction of long slit spectra with the main problem being the curvature of the lines along the slit (due to both misalignment of CCD and spectrum and residual optical distortions). <P> Although one may intuitively tend to subtract the sky spectrum still in pixel space in order to avoid the problems inherent to non-linear rebinning, experience shows that a proper wavelength calibration can remove the curvature of the sky lines to a high degree of accuracy (one should aim for <IMG WIDTH="46" HEIGHT="70" ALIGN="MIDDLE" BORDER="0" SRC="img259.gif" ALT="$\pm$">0.1 pixels rms). <P> The command <TT>SKYFIT/LONG</TT> makes a polynomial fit to the sky in two windows above and below the object spectrum, either with one single function for the full length of the spectrum (<TT>mode = 0</TT>) or with one function for every column (<TT>mode = 1</TT>). <TT>Mode 0</TT> is recommended for the spectral regions where the sky is faint, because usually there is not enough signal to achieve a meaningful fit for every column. The same is not true for the bright sky lines, where <TT>mode 1</TT> helps dealing with the variable line width and with residual line curvature. <P> For this reason, it often is best to prepare two sky spectra first: <TT>sky0</TT> fitted obtained in <TT>mode 0</TT> and with a polynomial of degree 0-2 fitted to windows with ``clear'' sky, and <TT>sky1</TT> derived with <TT>mode 1</TT> and multiple polynomials of degree 2-4 on windows going as close as possible to the object. The final sky spectrum, (<TT>sky</TT>), to be subtracted from the object is obtained from a combination of the two sky spectra and essentially consists of <TT>sky0</TT> which only for the bright sky lines has been replaced with <TT>sky1</TT>. Such a combination can be prepared by mean of the command <TT>REPLACE/IMAGE</TT> (e.g., <TT>REPLACE/IMA sky0 sky 120.,>=sky1</TT>). <P> <HR> <!--Navigation Panel--> <A NAME="tex2html3091" HREF="node133.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html3088" HREF="node120.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html3082" HREF="node131.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html3090" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html3092" HREF="node133.html">Flux Calibration</A> <B> Up:</B> <A NAME="tex2html3089" HREF="node120.html">Long-Slit and 1D Spectra</A> <B> Previous:</B> <A NAME="tex2html3083" HREF="node131.html">Resampling the Data</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-15</I> </ADDRESS> </BODY> </HTML>