<!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>Pre-processing the spectra</TITLE> <META NAME="description" CONTENT="Pre-processing the spectra"> <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="node507.html"> <LINK REL="previous" HREF="node505.html"> <LINK REL="up" HREF="node501.html"> <LINK REL="next" HREF="node507.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html7782" HREF="node507.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html7779" HREF="node501.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html7773" HREF="node505.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html7781" 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="tex2html7783" HREF="node507.html">Getting the Dispersion Solution</A> <B> Up:</B> <A NAME="tex2html7780" HREF="node501.html">A Typical Session: Cook-book</A> <B> Previous:</B> <A NAME="tex2html7774" HREF="node505.html">Reading the Data</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION003033000000000000000"> Pre-processing the spectra</A> </H2> <P> Observation pre-processing consists of standard bias, dark and flat-field corrections. The package provides different commands to average images, extract sub-images or normalize flat-fields. General information related to preprocessing commands is available in the section Dark, Bias and Flat-Field of <TT>SHOW/LONG</TT> and can be obtained by: <BR> <BR> Midas...> <TT>SHOW/LONG d</TT> <BR> <P> The command <TT>PREPARE/LONG</TT> extracts sub-images. The pixel positions <!-- MATH: $(x_{low},y_{low})$ --> (<I>x</I><SUB><I>low</I></SUB>,<I>y</I><SUB><I>low</I></SUB>) and <!-- MATH: $(x_{upp},y_{upp})$ --> (<I>x</I><SUB><I>upp</I></SUB>,<I>y</I><SUB><I>upp</I></SUB>) of the lower-left and upper-right corners of the extracted sub-image can be specified with the keyword <!-- MATH: $\fbox{TRIM}$ --> <IMG WIDTH="74" HEIGHT="29" ALIGN="BOTTOM" BORDER="0" SRC="img1017.gif" ALT="\fbox{TRIM}">. The command processes a catalog by default or an image if the name is provided with the extension <B>.bdf</B>. The sequence: <BR> <BR> Midas...> <TT>CREATE/ICAT flatcat ff*.bdf</TT> <BR> Midas...> <TT>SET/LONG TRIM=10,20,500,550</TT> <BR> Midas...> <TT>PREPARE/LONG flatcat exf</TT> <BR> <BR> generates a catalog <B>flatcat.cat</B> referencing the files <B>ff*.bdf</B> and extracts the sub-window <TT>[@10,@20:@500,@550]</TT> (see help file of <TT>EXTRACT/IMAGE</TT>). The output files will be called <B>exf<EM>nnnn</EM>.bdf</B> where <EM>nnnn</EM> is a four-digit number starting at 0001. <P> Images can be combined using an average or median method with the command <TT>COMBINE/LONG</TT>. This command processes a catalog of images and generates a combined image. The two commands: <BR> <BR> Midas...> <TT>CREATE/ICAT flatcat exf*.bdf</TT> <BR> Midas...> <TT>COMBINE/LONG flatcat avflat AVERAGE</TT> <BR> <BR> generate a catalog <B>flatcat.cat</B> referencing the files <B>exf*.bdf</B> and average them to produce the image <B>avflat.bdf</B>. The option <TT>MEDIAN</TT> can be used to eliminate particle hits when combining dark exposures. Flat-field normalisation can be achieved by the command: <BR> <BR> Midas...> <TT>SET/LONG BIAS=190. FDEG=2</TT> <BR> Midas...> <TT>NORMALIZE/FLAT avflat normff</TT> <BR> <BR> which performs a bias correction of value <!-- MATH: $\fbox{BIAS}$ --> <IMG WIDTH="66" HEIGHT="29" ALIGN="BOTTOM" BORDER="0" SRC="img1018.gif" ALT="\fbox{BIAS}"> on the image <B>avflat.bdf</B> and interpolates the flat-field continuum by a polynome of degree <!-- MATH: $\fbox{FDEG}$ --> <IMG WIDTH="77" HEIGHT="29" ALIGN="BOTTOM" BORDER="0" SRC="img1019.gif" ALT="\fbox{FDEG}"> to produce the image <B>normff.bdf</B>. It can be noted that flat-field normalisation can require a different approach than the one implemented in the command <TT>NORMALIZE/FLAT</TT>. The Section 1.2.4 (Flat-Fielding) of Chapter 6 in Vol. B presents alternative methods. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html7782" HREF="node507.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html7779" HREF="node501.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html7773" HREF="node505.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html7781" 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="tex2html7783" HREF="node507.html">Getting the Dispersion Solution</A> <B> Up:</B> <A NAME="tex2html7780" HREF="node501.html">A Typical Session: Cook-book</A> <B> Previous:</B> <A NAME="tex2html7774" HREF="node505.html">Reading the Data</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-15</I> </ADDRESS> </BODY> </HTML>