PUT_TBHEAD (Apr89)            PROS_Library            PUT_TBHEAD (Apr89)



NAME
    put_tbhead - write standard header information to a table file
    
USAGE
    call put_tbhead(tp, heading, image, plhead)
    
PARAMETERS
    Input Arguments:
            tp              pointer         table handle
            heading         string          parameter heading or null string
            image           string          image name
            plhead          string          plio header string
    
    Output Arguments:
            none
    
DESCRIPTION
    The subroutine put_tbhead writes standard header  information  to  a
    table  file.   The first input argument is the table handle returned
    by tbtcre.  The second input argument is a string  which  gets  used
    as  a  prefix  to  create unique header parameter names (or the null
    string to use defaults.)  The  third  argument  is  the  image  file
    name.   The  fourth  argument is the plio header string, returned by
    pl_loadf or pm_loadf.
    
    The image file name  is  written  to  the  table  header  using  the
    heading  string  as  a  parameter name, or else using the param name
    "image" if heading string is null. The plio header  string  is  then
    decoded   and  plio  parameters  are  added.   The  names  of  these 
    parameters will either be a standard name for each  (if  heading  is
    null),  or  will  contain the first three chars of heading, followed
    by a descriptive suffix.  This use of the heading in creating  table
    parameter  names  allows more than one set of standard parameters to
    be written to the same table header.  For example, one might want to
    write signal and bkgd information to the same file, as imcnts does.
    
    The  plio  header information written to the table file includes the
    plio name, plio type, plio reference files, plio xdim and ydim,  and
    plio  scale.  The  regions  are also written to the file, as well as
    any "notes" appended at  the  end  of  the  plio  header.  (Exposure
    correction information is normally part of the notes section.)
    
EXAMPLES
    ex.  The  following  code  fragment  shows  how to use put_tbhead.x.
    Taken from qpdisp. it is an example of  a  case  where  the  heading
    string  is  null, so that default parameter names are used.  This is
    the correct method to use when only one set of  standard  parameters
    are being written to a table file.
                    ...
            
                    # open the event list
                    io = qpio_open(qp, evlist, READ_ONLY)


                                  -1-
PUT_TBHEAD (Apr89)            PROS_Library            PUT_TBHEAD (Apr89)



                    # reset the event mask
                    call set_qpmask(qp, io, region, expname, thresh, pl, title)
            
                    # display the header
                    call msk_disp("qpdisp mask", poefile, Memc[title])
            
                    # open the table file, if necessary
                    if( dotable == YES ){
                        # and fill in the columns
                        call ini_lsttable(temp, tp, x_cp, y_cp, time_cp, pha_cp, pi_cp,
                                            dx_cp, dy_cp, reg_cp, s10_cp, s11_cp, evsize)
                        # write header into table
                        call put_tbhead(tp, "", poefile, Memc[title])
                    }
                    ...
            
BUGS

SEE ALSO
