fewagner/dm_datarelease

getitem: index out of range

Closed this issue · 1 comments

Running

python lhlimitcalc.py -p ./ -i 0 -w b -n 40

crashes with

Traceback (most recent call last):
  File "lhlimitcalc.py", line 446, in <module>
    limit_bob = get_limit_lh(dm_pars=pars_bob, 
  File "lhlimitcalc.py", line 333, in get_limit_lh
    res_excl = bisect(implfunc, a=res_best.x[0], b=1e9, maxiter=1000)  # TODO put b maybe to 2*best fit?? and only if this doesnt work make upper bound 10 times higher
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_zeros_py.py", line 557, in bisect
    r = _zeros._bisect(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
  File "lhlimitcalc.py", line 323, in implfunc
    res = minimize(nll_combined_sigfixed, x0=res_best.x[1:],  # x0=x0s[1:],
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 691, in minimize
    res = _minimize_bfgs(fun, x0, args, jac, callback, **options)
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_optimize.py", line 1362, in _minimize_bfgs
    sf = _prepare_scalar_function(fun, x0, jac, args=args, epsilon=eps,
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_optimize.py", line 332, in _prepare_scalar_function
    sf = ScalarFunction(fun, x0, args, grad, hess,
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 158, in __init__
    self._update_fun()
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 251, in _update_fun
    self._update_fun_impl()
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 155, in update_fun
    self.f = fun_wrapped(self.x)
  File "/Users/felix/.pyenv/versions/3.8.6/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 137, in fun_wrapped
    fx = fun(np.copy(x), *args)
  File "lhlimitcalc.py", line 201, in nll_combined_sigfixed
    lh = densities[i](pars_, datas[i], lamb, efficiencies[i])  # /exposures[i]
IndexError: getitem out of range

was resolved, probably in ed789a8