When propagating the error for the fitted spectrum, there is an error if the source position is free in the fit (see PR #78).
We define results_err = results.propagate(results.optimized_model["source"].spectrum.main.shape.evaluate_at, **parameters) where parameters are all of the free parameters in the fit. However, evaluate_at is a method of the spectrum, so when we evaluate the spectrum at energy e flux = results_err(e), it only expects spectral parameters, and I get a key error for 'l' and 'b'.
When propagating the error for the fitted spectrum, there is an error if the source position is free in the fit (see PR #78).
We define
results_err = results.propagate(results.optimized_model["source"].spectrum.main.shape.evaluate_at, **parameters)
whereparameters
are all of the free parameters in the fit. However,evaluate_at
is a method of the spectrum, so when we evaluate the spectrum at energy eflux = results_err(e)
, it only expects spectral parameters, and I get a key error for 'l' and 'b'.