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

Home » Public Forums » archive » solving alghorithm for gaus curves
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: solving alghorithm for gaus curves [message #8344 is a reply to message #8223] Sun, 23 February 1997 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Mark Rivers (rivers@cars3.uchicago.edu) wrote:
: I routinely work on similar scale problems with energy-dispersive x-ray
: fluorescence data. There are 2048 channels of data and 10-30 peaks to fit. I
: used to use CALL_EXTERNAL to an IMSL fitting routine, but have switched to
: using CURVEFIT in IDL. That way the application is portable and an IMSL
: license is not required. The performance hit was only about a factor of 2.
: Fitting a spectrum on a low-end DEC Alpha takes about 5-10 seconds.
: We also fit the background separately.

: In general when fitting multiple Gaussians there are 3 parameters to be fit for
: each peak: centroid, width and amplitude. In certain applications it may make
: sense to constrain one or more of these. For example, when fitting our XRF
: data, the position of each peak is typically not optimized, since the
: fluorescence energies are known and constant. Rather, only 2 energy calibration
: coefficients (which control the relation of channel # to energy) are fitted.
: Similarly, I know the instrument response function of my detector is
: sigma=A + B*SQRT(energy). Thus sigma of each peak is typically not fitted
: independently, but rather only the coefficients A and B are optimized.

: Making use of the physics of the experiment not only speeds things up, but
: makes for results which are more physically meaningful.

To follow up Mark's comment: once you are down to amplitude only, the
problem becomes linear again, and can be solved without iteration. It
often pays, if you have a pretty good idea of the non-linear parameters,
but no idea of the linear ones (e.g. here you know the widths, but not
the amplitudes) to fix the non-linears, perform a linear fit to get the
amplitudes, then start the non-linear optimizer at a good starting
point.

Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL & multi-thread
Next Topic: Slicer

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

Current Time: Wed Oct 08 17:25:11 PDT 2025

Total time taken to generate the page: 0.00370 seconds