<!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>Order Definition</TITLE> <META NAME="description" CONTENT="Order Definition"> <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="node151.html"> <LINK REL="previous" HREF="node146.html"> <LINK REL="up" HREF="node145.html"> <LINK REL="next" HREF="node151.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3319" HREF="node151.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html3316" HREF="node145.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html3310" HREF="node149.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html3318" 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="tex2html3320" HREF="node151.html">Removal of particle hits</A> <B> Up:</B> <A NAME="tex2html3317" HREF="node145.html">Echelle Spectra</A> <B> Previous:</B> <A NAME="tex2html3311" HREF="node149.html">General Description</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION001120000000000000000"> </A> <A NAME="order-definition"> </A> <BR> Order Definition </H1> The dispersion relation is defined by the following equations: <BR><P></P> <DIV ALIGN="CENTER"> <!-- MATH: \begin{equation} \begin{array}{rcl} y &=& f_1(x,m) \\ \lambda &=& f_2(x,m) \end{array} \end{equation} --> <TABLE WIDTH="100%" ALIGN="CENTER"> <TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><A NAME="echelle-1"> </A><IMG WIDTH="145" HEIGHT="50" SRC="img275.gif" ALT="\begin{displaymath}\begin{array}{rcl} y &=& f_1(x,m) \\ \lambda &=& f_2(x,m) \end{array}\end{displaymath}"></TD> <TD WIDTH=10 ALIGN="RIGHT"> (7.1)</TD></TR> </TABLE> </DIV> <BR CLEAR="ALL"><P></P> The first of the equations <A HREF="node150.html#echelle-1">7.1</A> defines the position of the spectral orders, <I>m</I>, in the raw image, while the second equation gives, for each order, the dispersion relation in one dimension. The mapping between the spaces <!-- MATH: $(\lambda,m)$ --> <IMG WIDTH="18" HEIGHT="44" ALIGN="MIDDLE" BORDER="0" SRC="img276.gif" ALT="$(\lambda,m)$"> and (<I>x</I>,<I>y</I>) is separated into two different equations; the first one will be discussed in this Section, while the description of the second equation will be postponed to Section <A HREF="node158.html#wavelength-calibration">7.6</A>. <P> The function <I>f</I><SUB>1</SUB> is approximated by a polynomial of the form <BR><P></P> <DIV ALIGN="CENTER"> <!-- MATH: \begin{equation} y = f_1(x,m)\approx\sum_{j=0}^J\sum_{i=0}^I a_{ij} x^i m^j \end{equation} --> <TABLE WIDTH="100%" ALIGN="CENTER"> <TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><A NAME="echelle-2"> </A><IMG WIDTH="283" HEIGHT="64" SRC="img277.gif" ALT="\begin{displaymath}y = f_1(x,m)\approx\sum_{j=0}^J\sum_{i=0}^I a_{ij} x^i m^j \end{displaymath}"></TD> <TD WIDTH=10 ALIGN="RIGHT"> (7.2)</TD></TR> </TABLE> </DIV> <BR CLEAR="ALL"><P></P> where the coefficients <I>a</I><SUB><I>ij</I></SUB> are computed using least squares techniques on a grid <!-- MATH: $(x_k, y_k)$ --> (<I>x</I><SUB><I>k</I></SUB>, <I>y</I><SUB><I>k</I></SUB>), i.e. sample number and line number of points located within the spectral orders of the image. These points in the grid are found automatically by an order-following algorithm, normally using the <TT>FLAT</TT> or <TT>STD</TT> image. <P> <UL> <LI>A first guess of the position of the orders is found on a trace perpendicular to the dispersion direction done in the middle of the flat field image, in this way we define the set of points <!-- MATH: $(x_0,y_{0m})$ --> (<I>x</I><SUB>0</SUB>,<I>y</I><SUB>0<I>m</I></SUB>), <I>m</I> being the relative order number. <LI>For each order, the order-following algorithm finds the series of points located on the order at <!-- MATH: $x_n=x_0+n\times\Delta x$ --> <IMG WIDTH="132" HEIGHT="41" ALIGN="MIDDLE" BORDER="0" SRC="img278.gif" ALT="$x_n=x_0+n\times\Delta x$"> for points on the right half of the order, and at <!-- MATH: $x_{-n}= x_0 - n\times\Delta x$ --> <IMG WIDTH="146" HEIGHT="40" ALIGN="MIDDLE" BORDER="0" SRC="img279.gif" ALT="$x_{-n}= x_0 - n\times\Delta x$"> for points on the left half of the order, <!-- MATH: $n=1,2,\ldots$ --> <IMG WIDTH="68" HEIGHT="39" ALIGN="MIDDLE" BORDER="0" SRC="img280.gif" ALT="$n=1,2,\ldots$"> integer and <IMG WIDTH="60" HEIGHT="54" ALIGN="BOTTOM" BORDER="0" SRC="img281.gif" ALT="$\Delta x$"> is the step of the grid. </UL> <P> This set of points forms the basic grid with the geometric positions of the orders. Typical values of the standard deviation of the residuals of this approximation are about 0.3 to 0.1 pixel. <P> It is worth mentioning here that the order<A NAME="7164"> </A> following algorithm finds the center of the orders by taking the middle point with respect to the edges of the orders. The edges of the orders are detected automatically by thresholding the order profiles, perpendicular to the dispersion direction; the level of the threshold is a function of the signal in the order. The command <TT>DEFINE/ECHELLE</TT> performs the automatic order detection. <P> An alternative method is available, based on the Hough transform to perform the order detection and involving a tracing algorithm able to estimate an optimal threshold for each order independently. The order definition is performed as follows: <UL> <LI>A preprocessing of the frame is performed, including a median filtering (radx,y=2,1) to remove hot pixels and bad rows from the image. Then the background value is measured in the central area of the image and subtracted. This preprocessing assumes that the defaults are small enough to be corrected by a simple median filtering and that the interorder background is basically constant all over the image. If the above conditions are not respected, the frame must be processed by the user. The echelle command <TT>BACKGROUND/SMOOTH</TT> enables performance of a background correction at this early stage of the calibration. <LI>A first guess<A NAME="7168"> </A> of the position and the slope of the orders is found by processing the Hough transform of a subset of columns of the input image. The order detection by Hough transform is described in (Ballester, 1994). <LI>For each order, an initial threshold is estimated by measuring the pixel values in the middle of the order. The order following algorithm finds the series of points located on the order at regular steps on the grid, as describd above. The threshold is optimised in order to follow the order on the longest possible distance. If the trace of the order is lost, the algorithm extrapolates linearly the positions and attempts to skip the gap. <LI>For each position, the center of the order is defined as the first moment of the pixel values above the threshold: <BR><P></P> <DIV ALIGN="CENTER"> <!-- MATH: \begin{displaymath} y_{center} = \frac{\sum_{y=y_{min}}^{y_{max}} y*(I_y - threshold)} {\sum_{y=y_{min}}^{y_{max}} y} \end{displaymath} --> <IMG WIDTH="363" HEIGHT="57" SRC="img283.gif" ALT="\begin{displaymath}y_{center} = \frac{\sum_{y=y_{min}}^{y_{max}} y*(I_y - threshold)} {\sum_{y=y_{min}}^{y_{max}} y} \end{displaymath}"> </DIV> <BR CLEAR="ALL"> <P></P> This algorithm is implemented in the command <TT>DEFINE/HOUGH</TT>. The algorithm can run in a fully automatic mode (no parameters are required apart from the name of the input frame). It is also possible to set the following parameters to enforce a given solution: <UL> <LI>numbers of orders to be detected. <LI>half-width of orders <LI>threshold<A NAME="7176"> </A> </UL></UL>A practical decription of the way to use this algorithm and to optimise the parameters is described in the Appendix <A HREF="node455.html#app:echelle">D</A> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html3319" HREF="node151.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html3316" HREF="node145.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html3310" HREF="node149.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html3318" 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="tex2html3320" HREF="node151.html">Removal of particle hits</A> <B> Up:</B> <A NAME="tex2html3317" HREF="node145.html">Echelle Spectra</A> <B> Previous:</B> <A NAME="tex2html3311" HREF="node149.html">General Description</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-15</I> </ADDRESS> </BODY> </HTML>