Modify API fitting tutorial
This PR is to address https://github.com/gammapy/gammapy/issues/5291#issuecomment-2163313687
We want to avoid accessing datasets.parameters[name] but rather take directly from the model
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.48%. Comparing base (
64cdfa2) to head (969565f). Report is 1 commits behind head on main.
:exclamation: Current head 969565f differs from pull request most recent head bba6072
Please upload reports for the commit bba6072 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## main #5347 +/- ##
=======================================
Coverage 94.48% 94.48%
=======================================
Files 232 232
Lines 35742 35742
=======================================
Hits 33772 33772
Misses 1970 1970
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am also going to adjust the plotting of the stat_contour because these lines can be confusing for the user
https://astro-kirsty.github.io/gammapy-docs-preview/tutorials/api/fitting.html#sphx-glr-tutorials-api-fitting-py
I have a side question: the discusssion outcomes was not to use the FitResult object within the tutorials?
I thought the end decision was to use datasets.models or fit_result.models
I have a side question: the discusssion outcomes was not to use the FitResult object within the tutorials?
@bkhelifi : Thanks to @QRemy recent efforts, datasets.models is now complete.
We can, of course, expose better fit_results as a matter of habit, but it is not urgent