<!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="vol1"> <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="vol1.css"> <LINK REL="previous" HREF="node67.html"> <LINK REL="up" HREF="node55.html"> <LINK REL="next" HREF="node69.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html1331" HREF="node69.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html1327" HREF="node55.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html1323" HREF="node67.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html1329" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html1330" HREF="node216.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="icons.gif/index_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html1332" HREF="node69.html">Graphic and Image Display</A> <B> Up:</B> <A NAME="tex2html1328" HREF="node55.html">Table File System</A> <B> Previous:</B> <A NAME="tex2html1324" HREF="node67.html">Table Format Files</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00880000000000000000"> </A> <A NAME="example"> </A> <BR> Example </H1> <P> As an example of use of the table file system, we here describe the tutorial procedure executed via the <TT>TUTORIAL/TABLE</TT> command. This procedure uses a subset of the Uppsala General Catalogue. The format of the catalogue is defined in the file <TT>ugc.fmt</TT> as follows: <PRE> DEFINE/FIELD 9 20 R G11.6 :RA "HOUR" DEFINE/FIELD 21 32 R G11.6 :DEC "DEGREE" DEFINE/FIELD 33 44 R G11.6 :DB "ARC.MIN." DEFINE/FIELD 45 56 R G11.6 :DR "ARC.MIN." DEFINE/FIELD 57 68 R G11.6 :BT "MAGNITUDE" DEFINE/FIELD 69 80 R G11.6 :RV "KM.SEC-1" END </PRE> <P> This file and the actual ASCII data in <TT>ugc.dat</TT> will be copied into your workspace. The first four lines of the data file have the following layout:<PRE> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 0.0117 15.87 6.500 6.300 12.00 1047. 0.0233 20.47 4.000 3.800 12.70 * 0.2933 59.03 8.000 10.00 * * 0.3583 16.20 5.800 5.100 14.60 * </PRE> (The ruler, of course, is not part of the data file.) <P> This tutorial shows the usage of some of the basic table file commands to analyse and display the data set. <P><PRE> CREATE/TABLE ugc 10 700 ugc ! create the table file (UGC.tbl) NAME/COL ugc :RA F11.3 ! change format NAME/COL ugc :DEC G12.6 ! change format SHOW/TABLE ugc ! display structure READ/TABLE ugc @1 @30 ! display a few entries ! PLOT/TABLE ugc :DR :DB ! plot diameters in red and blue bands ! REGR/LINEAR ugc :DB :DR ! linear regression on these variables READ/KEY OUTPUTD ! and display stored coefficients ! READ/HIST ugc :BT ! display results on terminal PLOT/HIST ugc :BT ! and plot device ! SELECT/TAB ugc :BT.LT.13.5 ! select brightest objects ! STAT/TAB ugc :DR ! do statistics on the subset, READ/HIST ugc :DR ! display the result ! PLOT/TAB ugc :BT :RV ! and plot the selected set ! SELECT/TAB ugc :RV.GT.4000.0 ! select new subset with largest rad.vel. ! PRINT/TAB ugc ! print them ! COMPUTE/TAB ugc :MBT = :BT-25.-5.*LOG10(:RV/50) ! compute abs.magnitude NAME/COL ugc :MBT "ABS.B.MAG." ! include units ! COMPUTE/TAB ugc :SIZE = :RV*SIN(0.000291*:DB)*20 ! diameter NAME/COL ugc :SIZE "KPC" ! include units ! PLOT/TAB ugc :MBT :SIZE ! display result </PRE> <P> =31 =3 =1999 <P> <BR><HR> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-09</I> </ADDRESS> </BODY> </HTML>