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

Home » Public Forums » archive » Problem with Parinfo on Craig Markwardt's MPFITPEAK
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problem with Parinfo on Craig Markwardt's MPFITPEAK [message #80662] Wed, 27 June 2012 06:07 Go to previous message
Tito is currently offline  Tito
Messages: 16
Registered: March 2012
Junior Member
I am trying to fit Gaussians/Lorentzians with mpfitpeak on which I know the center, the amplitude and the Background offset and I want those 3 to be fixed and I am searching 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.005, 0.0]

y_fit2 = mpfitpeak(xaxis[minus2+ind:index[i] + ind2],$
1-spec[minus2+ind:index[i] + ind2],$
p2, parinfo = parinfo)

But this just is not working..... As I see it fix the center but all the rest of the parameters are not fixed and I have a terrible fit in the end.

Anybody know what I am doing wrong?

All the best!
Trifon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: convert from Julian date to calendar date and vice verse
Next Topic: Equivalent of direct graphics PSYM=10 in function graphics?

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

Current Time: Wed Oct 08 15:33:12 PDT 2025

Total time taken to generate the page: 0.00399 seconds