<!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>Example</TITLE> <META NAME="description" CONTENT="Example"> <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="previous" HREF="node143.html"> <LINK REL="up" HREF="node120.html"> <LINK REL="next" HREF="node145.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3223" HREF="node145.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html3220" HREF="node120.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html3216" HREF="node143.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html3222" 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="tex2html3224" HREF="node145.html">Echelle Spectra</A> <B> Up:</B> <A NAME="tex2html3221" HREF="node120.html">Long-Slit and 1D Spectra</A> <B> Previous:</B> <A NAME="tex2html3217" HREF="node143.html">Parameters</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION0010100000000000000000"> Example</A> </H1> <P> As an example of the use of the commands described above, we here include the tutorial procedure, executed as <TT>TUTORIAL/LONG</TT>. <P> The input images are <TT>wlc</TT>, the wavelength calibration frame, and <TT>obj</TT>, the object. The catalogue of laboratory wavelengths used is stored in the table <TT>lincat</TT>. <P><PRE> INIT/LONG GRAPH/LONG MAKE/DISPLAY ! WRITE/OUT Copy test images -DELETE lndemo_*.* -COPY MID_TEST:emhear.bdf lndemo_wlch.bdf -COPY MID_TEST:emth.bdf lndemo_wlcth.bdf -COPY MID_TEST:emstd.bdf lndemo_wstd.bdf -COPY MID_TEST:emmi0042.bdf lndemo_bias1.bdf -COPY MID_TEST:emmi0043.bdf lndemo_bias2.bdf -COPY MID_TEST:emmi0044.bdf lndemo_bias3.bdf -COPY MID_TEST:emmi0045.bdf lndemo_bias4.bdf -COPY MID_TEST:emmi0046.bdf lndemo_flat1.bdf -COPY MID_TEST:emmi0047.bdf lndemo_flat2.bdf -COPY MID_TEST:emmi0048.bdf lndemo_flat3.bdf -COPY MID_TEST:emmi0049.bdf lndemo_flat4.bdf -COPY MID_TEST:thorium.tbl lndemo_thorium.tbl -COPY MID_TEST:hear.tbl lndemo_hear.tbl -COPY MID_TEST:l745.tbl lndemo_l745.tbl -COPY MID_TEST:atmoexan.tbl lndemo_atmo.tbl ! WRITE/OUT "This tutorial shows how to calibrate long slit spectra" WRITE/OUT "The package assumes wavelengths increasing from" WRITE/OUT "left to rigth." WRITE/OUT "It is assumed that the images have been already" WRITE/OUT "rotated, corrected for pixel to pixel variation" WRITE/OUT "and the dark current has been subtracted." WRITE/OUT "Input data are:" WRITE/OUT "wlc.bdf - wavelength calibration image" WRITE/OUT "obj.bdf - object image" WRITE/OUT "lincat.tbl - line catalogue" ! WRITE/OUT "Combining flat and dark images" ! LOAD lndemo_flat1 CREATE/ICAT bias lndemo_bias*.bdf COMBINE/LONG bias lnbias MEDIAN STAT/IMA lnbias ! CREATE/ICAT flat lndemo_flat*.bdf SET/LONG TRIM=20,60,520,457 PREPARE/LONG flat.cat lndemo_ft CREATE/ICAT flat lndemo_ft*.bdf COMBINE/LONG flat lnff AVERAGE NORMALIZE/FLAT lnff lnflat 190. ! CREATE/ICAT lndemocat lndemo_w*.bdf READ/ICAT lndemocat LOAD lndemo_wlch WRITE/OUT "Extracting useful part of spectra with command PREPARE/LONG" SET/LONG TRIM = 0,60,0,457 PREPARE/LONG lndemocat.cat lndemo ! WLC: SET/GRAPH PMODE=1 XAXIS=AUTO YAXIS=AUTO SET/LONG WLC=lndemo1 LINCAT=lndemo_hear YWIDTH=10 THRES=30. SET/LONG YSTEP=10 WIDTH=8 TWODOPT=YES DCX=2,1 ! SESSDISP = "NO " SHOW/LONG wlc ! WRITE/OUT Search lines: WRITE/DESCR {WLC} STEP/D/2/1 -2. SEARCH/LONG ! search calibration lines PLOT/SEARCH ! WRITE/OUT "Identify some of the brightest lines:" WRITE/OUT WRITE/OUT " X = 379.30 922.50 " WRITE/OUT " WAV = 5015.680 5606.733" WAIT 2 IDENTIFY/LONG ! interactive line identification SET/LONG WLCMTD=IDENT TOL=0.3 CALIBRATE/TWICE ! wavelength calibration PLOT/IDENT ! display initial identifications ! WRITE/OUT Compute the dispersion coefficients by fitting a 2-D polynomial WRITE/OUT to the whole array PLOT/CALIBRATE ! display all identifications PLOT/RESIDUAL PLOT/DISTORTION 5015.680 ! SAVE/LONG ses1 WRITE/OUT "Now calibrating another arc spectrum in GUESS mode" SET/LONG WLCMTD=GUESS GUESS=ses1 WLC=lndemo2 LINCAT=lndemo_thorium SET/LONG WIDTH=4 THRES=3. TOL=0.1 ALPHA=0.2 LOAD {wlc} SEARCH/LONG CALIBRATE/LONG ! WRITE/OUT "Now demonstrating the three possible ways to apply the" WRITE/OUT "dispersion relation : " WRITE/OUT " - APPLY/DISPERSION involves no rebinning and outputs a table." WRITE/OUT " Input must be a 1D spectrum or a row of a long-slit spectrum" WRITE/OUT " - REBIN/LONG rebins row by row, taking coefficients from coerbr.tbl" WRITE/OUT " - RECTIFY/LONG applies the 2D polynomial dispersion relation" WRITE/OUT "Note: Rebin can be applied before or after extraction" ! !INIT/LONG ses1 ! APPLY/DISPERSION {wlc} wlct @100 PLOT/SPECTRUM wlct ! REBIN/LONG {wlc} wlcrb LOAD wlcrb PLOT wlcrb @100 ! RECTIFY/LONG {wlc} wlc2 LOAD wlc2 PLOT wlc2 @100 ! WRITE/OUT "Session is now saved, initialized, and loaded from session tables" SAVE/LONG mysess INIT/LONG SESSDISP = "NO " SHOW/LONG INIT/LONG mysess SESSDISP = "NO " SHOW/LONG ! WRITE/OUT "Now extracting a spectrum with two possible methods:" WRITE/OUT " - Simple rows average with EXTRACT/AVERAGE" WRITE/OUT " - Optimal extraction with EXTRACT/LONG" LOAD/IMA lndemo3 SET/LONG REBSTR=4600. REBEND=5800. REBSTP=2.00 REBIN/LONG lndemo3 ext8 SET/LONG LOWSKY = 189,198 UPPSKY = 204,215 SET/LONG GAIN=2. RON=5. THRES=3. RADIUS=2 SKYFIT/LONG ext8 stdsky LOAD stdsky COMPUTE/IMAGE ext7 = ext8 - stdsky SET/LONG OBJECT = 199,203 EXTRACT/AVERAGE ext7 stda PLOT stda EXTRACT/LONG ext8 stde stdsky PLOT stde ! WRITE/OUT "Now computing instrumental response" ! SET/LONG FLUXTAB=lndemo_l745 EXTAB=lndemo_atmo PLOT/FLUX EXTINCTION/LONG stde stdext RESPONSE/FILTER stdext INTEGRATE/LONG stdext RESPONSE/LONG fit=SPLINE PLOT/RESPONSE CALIBRATE/FLUX stdext stdcor CUTS stdcor 100.,500. PLOT stdcor </PRE> =1 =11 =1994 <P> <BR><HR> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-15</I> </ADDRESS> </BODY> </HTML>