comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Finding PSD Mean Frequency
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Finding PSD Mean Frequency [message #15174] Thu, 22 April 1999 00:00
Craig Markwardt is currently offline  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
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Previous Topic: Problem with the HELP window on UNIX.
Next Topic: Finding PSD Mean Frequency

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:09:47 PDT 2025

Total time taken to generate the page: 0.00433 seconds