>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  CSPEC

CSPEC

CSPEC

Name


      CSPEC

Purpose


      Compute ensemble averaged frequency spectrum of complex data.

Category


Calling Sequence


      s = cspec(z,n,sr,[freq])

Inputs


      z = input signal: Z = X + iY. in
        If z has too few points, -1 is returned.
      n = number of points to use in each transform in
        May be arbitrary.
      sr = sample rate in Hz in
        Needed to get actual units

Keyword Parameters


Keywords


        OVERLAP=novr number of points to overlap spectra (Def=0).
        ZEROPAD=zlen length to zero pad out to (def=no 0 pad).
        N_ENSEMBLE=n returned # spectra ensemble averaged.
        /NOTES lists some additional comments.

Outputs


      freq = optionally output frequency array. out
        If freq is requested then s is shifted for plots.
      s = spectral density in units of z**2/Hz. out
        First value is DC, unless freq is requested.

Common Blocks


      cspec_com

Notes


      Notes: For example, if Z=I+iQ, and I and Q are in volts,
        s will be volts**2/Hz
        Restrictions: one dimensional data only.

Modification History


      B. L. Gotwols Oct. 13, 1990.
      R. E. Sterner Sep. 13, 1991 --- added freq and cleaned up.
      R. E. Sterner Mar. 1, 1993 --- Tested for ntimes eq 0 sooner.
      R. Sterner, 1994 Oct 31 --- added overlap
      R. Sterner, 1994 Nov, 10 --- Added ZEROPAD keyword.
      R. Sterner, 2004 Jun 01 --- Fixed freq0 in case n is not integer.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1990, 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.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us