optimize_sherpa

gammapy.utils.fitting.optimize_sherpa(parameters, function, **kwargs)[source]

Sherpa optimization wrapper method.

Parameters:
parameters : Parameters

Parameter list with starting values.

function : callable

Likelihood function

**kwargs : dict

Options passed to the optimizer instance.

Returns:
result : (factors, info, optimizer)

Tuple containing the best fit factors, some info and the optimizer instance.