RootTalk


ROOT Discussion Forums

minuit2 contours with parameter limits

Discuss installing and running ROOT here. Please post bug reports here.

Moderator: rootdev

minuit2 contours with parameter limits

Unread postby tlatorre » Thu Jul 26, 2012 4:30

I'm trying to produce contour maps for some parameters with limits, and Minuit2 seems intent on drifting into regions outside of the limits.

Is this a known issue? Is there a workaround?

Code: Select all
>>> from minuit2 import Minuit2
>>> def f(x,y):
...     if x < 0 or y < 0:
...             print 'x = %.2f, y = %.2f' % (x,y)
...             raise Exception
...     return x**2 + y**2
...
>>> m = Minuit2(f)
>>> m.limits['x'] = 0, 10
>>> m.limits['y'] = 0, 10
>>> m.migrad()
>>> xy = m.contour('x','y',3)
Info in <Minuit2>: MnMinos UP value has changed, need to update FunctionMinimum class
x = -9.95, y = 0.00
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in f
Exception
tlatorre
 
Posts: 3
Joined: Tue Sep 28, 2010 19:37

Re: minuit2 contours with parameter limits

Unread postby moneta » Tue Aug 28, 2012 10:59

Hi,

Which version of Minuit2 are you using, it looks to me you are using some Python wrapper, which I do not have.
Can you post if possible an example of this in C++ code ?

Thank you

Lorenzo
moneta
 
Posts: 1490
Joined: Fri Jun 03, 2005 14:38
Location: CERN


Return to ROOT Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 4 guests