[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pyminuit: use of contour



Hi there

I have recently downloaded and installed (as per the site
instructions) pyminuit and I have already used it successfully for
some simulations and optimizations, under a desktop machine, with
Debian sid and Python 2.6..

I have a problem though: when I try to use the pyminuit command contour such as:

cont = array(m.contour("a", "b", 1.,50))

expecting to have an array output of 50 contour points (instead of the
default 20 points), in the parameter plane (a,b), at the 1 sigma
level, of the chi2 function, m, to be minimized,  I get rather the
following error:

TypeError                                 Traceback (most recent call last)

/home/orca/Dropbox/supernovae/SN_sim/scripts/<ipython console> in <module>()

/home/orca/Dropbox/supernovae/SN_sim/scripts/trotta_sim_func.py in
trotta_sim(a_fid, b_fid, x_std, y_std, nobs, xmin, xmax)
     48         m.printMode = 1
     49         m.migrad()
---> 50         cont = array(m.contour("a", "b", 1.,50))
     51         cont = append(cont,[[cont[0,0],cont[0,1]]],axis=0)
     52         subplot(1,2,2)

TypeError: Arguments are: param1, param2, number of sigmas, and
optionally approximate number of points (20).


That same call does work perfectly well under an older box, running
Debian lenny, with Python 2.5

I have looked up some documentation in pymuit site and its arguments,
as stated in the error message above, do really seem to be the ones I
have provided in the call. I have even checked the parsing (something
like !Pyparse_ArgsTupleKeywords or the like) and wasn't able to figure
anything which might explain the difference in behavior between the
two situations...

Any help is greatly appreciated!


-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: orca@if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################


Reply to: