[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: Finding PSD Mean Frequency*From*: Craig Markwardt <craigmnet(at)astrog.physics.wisc.edu>*Date*: 22 Apr 1999 14:10:54 -0500*cc*: mm(at)fs1.co.umist.ac.uk*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <371F5A21.1C094541@fs1.co.umist.ac.uk>*Reply-To*: craigmnet(at)astrog.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:14466

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 --------------------------------------------------------------------------

- Prev by Date:
**Re: hexadecimal variables** - Next by Date:
**Re: Global variables and IDL** - Prev by thread:
**Re: hexadecimal variables** - Next by thread:
**Re: Object Oriented programming question** - Index(es):