Force a peak to be only positive height

71 views
Skip to first unread message

Giacomo Del Bianco

unread,
Jun 30, 2020, 11:39:10 AM6/30/20
to fityk-users
Dear All,

I have a question. I need to do a multiple peak fitting. I put on it several peaks but during the interpolation sometime I get a negative height one. I force the variable domain to be positive:

$_9 = ~1000[0:]

But it looks like it doesn't work always. Is it correct the definition I make? In the Variable window I see the result:

$_9 = ~1000
 [0:]
In: %_1.height

As far as I understand the value should never go below 0 during interpolation. Is it correct?

Thank you in advance for every reply.

Alis Anon

unread,
Jun 30, 2020, 12:01:44 PM6/30/20
to fityk-users
You could always make another variable where the current variable is squared, then this second variable can only be positive. Or, use the abs() functionality as for example:

%_1=Gaussian(height=~1,center=~1,hwhm=abs(~1))

Giacomo Del Bianco

unread,
Jun 30, 2020, 3:10:26 PM6/30/20
to fityk-users
I fixed and underatood the issue. During the fittng procedure, the domains conditions are not working on the simple Lev-Mar fitting method. I used the modificated LEV.MARQ and it recognizes my domain conditions [0:] which means from 0 to infinity.

Thank you anyhow!!
Reply all
Reply to author
Forward
0 new messages