;+
; NAME:
;     GET_HEAD_STRUCT
; PURPOSE:
;     Define structures necessary for holding information from OVRO APC
;     headers.  This routine is just a bookkeeping convenience--it should
;     be used only once to create the header structure at the start of
;     a session.  If an empty header is needed later, it can more easily
;     be obtained by the statement: header = {header}
; CATEGORY:
;     OVRO APC DATA ANALYSIS
; CALLING SEQUENCE:
;     header = get_head_struct()
; INPUTS:
; OPTIONAL (KEYWORD) INPUT PARAMETERS:
; ROUTINES CALLED:
; OUTPUTS:
;     header   an empty header record structure
; COMMENTS:
; SIDE EFFECTS:
; RESTRICTIONS:
; MODIFICATION HISTORY:
;     Written 13-Jan-1998 by Dale Gary
;     26-Jan-1999  DG
;       Added a time/label structure field to the structure definition
;-
function get_head_struct

   ; Ensure that the TLFIELD structure is defined
   junk = get_tl_struct()

   hed = {header,tls:      {tlfield},$    ; A time/label structure
                 aatab:  intarr(  8),$    ; Active antenna table
                 nptab:  intarr( 10),$    ; Antenna pointer table
                 nant:             0,$    ; Number of active antennas
                 rdoff:            0,$    ; 2-byte word offset of raw data
                                          ;   within a data segment record
                 nsr:              0,$    ; Number of samples per record
                 nws:              0,$    ; Number of 2-byte words per sample
                 ndbw:             0,$    ; Number of db words per sample
                 nfgw:             0,$    ; Number of fg words per sample
                 lchoff: intarr(8,8),$    ; ij channel offsets within sample
                 lfgptr: intarr(8,8)}     ; Order of fg values in fg words

return,hed
end