Re: Finding PSD Mean Frequency [message #15174] |
Thu, 22 April 1999 00:00 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Mark McGillion <mm@fs1.co.umist.ac.uk> writes:
>
> I have a PSD and would like to find the mean frequency. The goal of this
>
> is to fit a gaussian curve to the PSD to represent the mean and variance
>
> of the power in the given frequency range. I am making the assumption
> that the frequency power is normally distributed and can be modelled by
> 1 or more gaussians. The frequency range is 0-1000Hz.
>
Procedures you will want to look at are
GAUSSFIT - fits a gaussian to a series
CURVEFIT - fits an arbitrary IDL function to a series
MPFIT, MPFITFUN - fits an arbitrary IDL function to a series
GAUSSFIT is the least general, but may be enough for your purposes.
If you decide that your function needs to be more complicated, for
example gaussian plus a constant, then you should try one of the
latter solutions. CURVEFIT is built into IDL and has on-line
documentation.
MPFIT, MPFITFUN and MPFITEXPR are available from my web page,
http://astrog.physics.wisc.edu/~craigm/idl/idl.html. They are IDL
versions of the MINPACK robust least squares fitting routines. For
noisy data I have found them to be more reliable than CURVEFIT. The
headers of each have complete documentation, and a tutorial example of
fitting a guassian is on the web page.
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|