return the values of fitted peaks from multipeak fit
calichem
Is it possible to "remake" the fit_name curve that is produced by multipeak fit? I would like to extend the fit on the x-axis; I have some spectroscopic data with partial peaks that i would like to model in.
Here is the trouble i am running into:
junk = gauss1d(W_coef, xWave) can rebuild a single Gaussian peak produced by curvefit
junk = gauss1d('Peak 0 Coefs', xWave) cannot rebuild a single Gaussian peak produced by multipeak fit
Any clues as to why I can't remake a Gaussian using 'Peak 0 coefs'?
displayhelptopic "wave names"
Try to avoid those liberal names wherever possible (rename to e.g. "Peak_0_Coefs")... usually they cause trouble especially in user defined functions.
May 1, 2012 at 04:10 am - Permalink
GaussPeak('Peak 0 Coefs', junk, xWave)
It's not hard to make a new version that's not all-at-once:
static Constant sqrt2 = 1.4142135623731
Function GaussPeak(w, x)
Wave w
Variable x
return w[2]*w[1]*SqrtPi*gauss(x, w[0], w[1]/sqrt2)
end
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 1, 2012 at 11:54 am - Permalink