next up previous contents index
Next: Graphic and Image Display Up: Table File System Previous: Table Format Files

   
Example

As an example of use of the table file system, we here describe the tutorial procedure executed via the TUTORIAL/TABLE command. This procedure uses a subset of the Uppsala General Catalogue. The format of the catalogue is defined in the file ugc.fmt as follows:

     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

This file and the actual ASCII data in ugc.dat will be copied into your workspace. The first four lines of the data file have the following layout:

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         *
(The ruler, of course, is not part of the data file.)

This tutorial shows the usage of some of the basic table file commands to analyse and display the data set.

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

=31 =3 =1999



Petra Nass
1999-06-09