fermi-lat / Likelihood

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Minos value outside of existing bounds #101

Open jballet opened 3 years ago

jballet commented 3 years ago

For a long time I have noticed that Minos sometimes ends in error on MinosErrors = like.optObject.Minos( numpar, 1) File "/dsm/saplxglast/glast/anaconda2/envs/fermi-1.3.5/lib/python2.7/site-packages/fermitools/pyLikelihood.py", line 3200, in Minos return _pyLikelihood.Optimizer_Minos(self, n, level, numericDeriv) RuntimeError: Attempt to set the value outside of existing bounds. I do not understand how this should be possible, since Minuit normally converts internally finite intervals into the full set of real numbers. I have prepared a test harness at ftp://ftp.cea.fr/incoming/y2k01/jbbglast/testMinos2.tgz (will remain there for one week). The livetime cube and the interstellar model are the standard ones. It fails on the negative error but the interval it should find is far from 0 so I don't think the "value outside bounds" is that of the parameter on which Minos is working. One of the other parameters is close to its boundary. The error is flimsy (I think it depends sensitively on the initial conditions). For example if I simplify the call by removing like.Ts and the second like.fit (just before the Minos call) it returns the correct interval. I have not been able to simplify it as much as I would like (my test case uses summed likelihood). I could probably find a test case on a single data set, but in unbinned mode. This was tested on FT 1.3.5.