;+
; NAME:
;     GET_OBS_STRUCT
; PURPOSE:
;     Define structure necessary for holding information from OVRO APC
;     observing sequence segment.
; CATEGORY:
;     OVRO APC DATA ANALYSIS
; CALLING SEQUENCE:
;     obseq = get_obs_struct()
; INPUTS:
; OPTIONAL (KEYWORD) INPUT PARAMETERS:
; ROUTINES CALLED:
; OUTPUTS:
;     obseq   an empty config segment structure
; COMMENTS:
;     This structure requires the use of pointers to arrays,
;     because the array sizes are variable and structure definitions
;     must be static.  To use, always free the existing pointer and
;     then create a new one. For example, to add a new array, harm,
;     to the structure, do the following:
;
;       ptr_free,obseq.pharm
;       obseq.pharm = ptr_new(harm)
;
;     This will ensure that the memory area pointed to by the
;     existing pointer is freed back to the memory pool.
;
; SIDE EFFECTS:
; RESTRICTIONS:
; MODIFICATION HISTORY:
;     Written 15-Jan-1998 by Dale Gary
;-
function get_obs_struct

   ; Define obseq structure
   obseq = {obseq, tics:             0,$  ; No. of intgr intvl/entry
                   id:               0,$  ; Obseq id number
                   nt:               0,$  ; No. of times obseq repeats
                   nx:               0,$  ; No. of entries
                   pharm:   ptr_new(0),$  ; ptr to array of harmonics
                   ppol:    ptr_new(0),$  ; ptr to poln array
                   pnd:     ptr_new(0),$  ; ptr to noise diode array
                   phflag:  ptr_new(0),$  ; ptr to harmonic flag array
                   phord:   ptr_new(0)}   ; ptr to ordered list of harms

return,obseq
end