Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem "fixing" parameters #21

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 1 comment
Open

Problem "fixing" parameters #21

GoogleCodeExporter opened this issue Mar 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Define a standard Chi2 function for 3 parameters. Trying to fix one of the 
parameters and then run m.minos()

Example code :

import minuit

data =  [50,  12,   -8]
sigma = [13,     0.07,    0.1]

def chi2(a,b,c) :
    return   (data[0]-a)**2/sigma[0]**2 \
            +(data[1]-b)**2/sigma[1]**2 \
            +(data[2]-c)**2/sigma[2]**2

m = minuit.Minuit(chi2)
m.values["a"] = 50
m.fixed["a"] = True

m.migrad()
m.minos()

What is the expected output? What do you see instead?

Expect no errors, equivalent to just having fixed 'a' from the start. Instead 
get the following error:

python: MnMinos.cpp:101: MnCross MnMinos::loval(unsigned int, unsigned int) 
const: Assertion `!theMinimum.userState().parameter(par).isFixed()' failed.
Abort

What version of the product are you using? On what operating system?

Using pyminuit 1.1.2 with Minuit-1_7_9 on SLC6.4 (x64)

Please provide any additional information below.

I've been unable to fix parameters in combination with Minos or Contour for a 
variety of different functions/data

Original issue reported on code.google.com by rknegj...@gmail.com on 16 Sep 2010 at 3:22

@GoogleCodeExporter
Copy link
Author

I have resolved this issue now. Calling minos() tries to find sigma=+/- 1 
errors for the fixed value as well and crashes in the proces. This can easily 
be avoided by calling minos("param",N) for each non-fixed parameter manually.

Great work with the minuit-python interface btw!

Original comment by rknegj...@gmail.com on 21 Sep 2010 at 12:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant