I managed to crash fityk using domains on fitting params

85 views
Skip to first unread message

tzo...@physics.uoc.gr

unread,
Jan 18, 2017, 4:43:11 PM1/18/17
to fityk-users
Hi I was trying to add some limits to the values the fitting parameters could take using the [:] option. 

The following statement makes fityk crash.

%g2S  = GaussianA(height=~300, center=75, area=~11174, hwhm=~6.3[0:10])

while the same without the [0:10]

%g2S  = GaussianA(height=~300, center=75, area=~11174, hwhm=~6.3)

or without the ~ but keeping the [0:10] 

%g2S  = GaussianA(height=~300, center=75, area=~11174, hwhm=6.3[0:10])

both work even though there is a complaint on syntax error.

Not sure why, but I guess a good program should NOT be allowed to crash. So this can probably be fixed?

I'm not sure what I'm doing wrong. All I wanted is to have hwhm be allowed to vary in the interval [0:10] and this option is explained in the manual in the section of Domains

I also could not find anything on  how to use the domain_percent option. Could somebody show me a working example of both [:] and domain_percent?
Thanks



Marcin Wojdyr

unread,
Jan 22, 2017, 9:59:30 PM1/22/17
to fityk...@googlegroups.com
Yes, it's a bug. Hopefully I've just fixed it.

As a workaround you could do the same in two steps:
%g2S = GaussianA(center=75, area=~11174, hwhm=~6.3)
%g2S.hwhm = ~6.3[0:10]

Domains are respected only by some fitting methods. In particular they
are _not_ respected by the default fitting method. This will be
changed in the future.

Some fitting methods, such as Nelder-Mead, need to know a domain for
each parameter. Because they generate a random set of possible values
for each parameters. Since Fityk in most of cases doesn't have such
information we use assume arbitrarily that the domain is +/- 30% of
the current value. Option domain_percent can change the percentage.
> --
> http://groups.google.com/group/fityk-users
> ---
> You received this message because you are subscribed to the Google Groups
> "fityk-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fityk-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages