Problem with Parinfo on Craig B. Markwardt's MPFITPEAK [message #84681] |
Wed, 27 June 2012 05:52 |
Tito
Messages: 16 Registered: March 2012
|
Junior Member |
|
|
I am trying to fit Gaussians/Lorentzians with mpfitpeak on witch I know the center, the apmlitude and the Background offset and I want those 3 to be fixed and I am surching only the Sigma width. I tried this:
parinfo = replicate({value:0.0d, fixed:0, limited:[0,0], $
limits:[0.0d,0.0d]}, 4)
parinfo[0].fixed = 1b
parinfo[1].fixed = 1b
parinfo[2].limited[0] = 1b
parinfo[2].limits[0] = 0.005
parinfo[3].fixed = 1b
parinfo[*].value = [1.0d - stell_dep[i],xaxis[index[i]],0.0005, 0.0]
y_fit2 = mpfitpeak(xaxis[minus2+ind:index[i] + ind2],$
1-spec[minus2+ind:index[i] + ind2],$
p2, parinfo = parinfo)
But this jus is not working..... As I see it fix the centroid but all the rest of the parameters are not fixed and I am gettng terrible fit/fits.
Anybody know what I am doing wrong?
All the best!
Trifon
|
|
|