XSPEC Name
      
       XSPEC Purpose
      
       Compute an ensemble averaged cross spectrum of real data.
Category
Calling Sequence
      
       sxy = xspec(x,y,n,sr,[freq]) Inputs
             x = input signal number 1.                      in
      
       y = input signal number 2.                      in
        
         If x or y have too few points, -1 is returned.
      
       n = number of points to use in each transform   in
                  May be arbitrary.
      
       sr = sample rate in Hz (Def=1 Hz)               in
                  Needed to get actual units.
Keyword Parameters
Keywords
        
         OVERLAP=novr  number of points to overlap spectra.
                      (Def=0).
        
         TRANSFER_FUNCT = transfer function, Txy = Sxy/Sxx
                      in units of y/x
        
         CA_ARRAY = ca :  Coherence and autospectra array.
          
           ca(*,0)=Cxy(f)  Coherence=|Sxy|^2/(Sxx*Syy) dimensnless
          
           ca(*,1) = Sxx(f)  Autospectrum of x in units of x**2/Hz.
          
           ca(*,2) = Syy(f)  Autospectrum of y in units of y**2/Hz.
        
         N_ENSEMBLE=n  returned # spectra ensemble averaged.
        
         /NOTES lists some additional comments.
Outputs
      
       sxy = spectral density in units of x*y/Hz.      out
                  First value is DC, last is Nyquist.
      
       freq = optionally output frequency array.       out
Common Blocks
      
       xspec_com Notes
      
       Notes: Restricted to one dimensional data only.
Reference
Modification History
      
       B. L. Gotwols Mar. 1, 1993 
      
       R. E. Sterner Mar. 1, 1993 --- cleaned up some.
      
       BLG, RES ---  Mar. 10, 1993 --- renamed variables.
      
       BLG --- 19 May, 1993 --- made loop index long.
              Fixed ntimes to be correct.  Also floated sr.
      
       Made OVERLAP default to 0 to be consistent with
      
       future addition of OVERLAP in rspec and cspec. 
  
 Copyright (C) 1993, Johns Hopkins University/Applied Physics Laboratory
  
 This software may be used, copied, or redistributed as long as it is not
  
 sold and this copyright notice is reproduced on each copy made.  This
  
 routine is provided as is without any express or implied warranties
  
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.