Repository navigation
Refactor analysis package - #916
Merged
Merged
Conversation
…mization settings to separate modules, parameter manipulation tools to another; make fit_history and detailed metric info in HypoFitResult configurable; catch any exception due to random failure of constrained-slsqp test; cosmetics
…o use fit_recursively (and also apply some cleanups)
thehrh
marked this pull request as ready for review
March 11, 2026 17:02
…o setter and warn in case of failure (e.g. for externally constructed HypoFitResult)
JanWeldert
requested changes
Apr 17, 2026
| Common tools for performing an analysis collected into a single class | ||
| `Analysis` that can be subclassed by specific analyses. | ||
| Common tools for performing an analysis collected into the class | ||
| `BasicAnalysis` that can be subclassed by specific analyses. |
Collaborator
There was a problem hiding this comment.
Wouldn't it be good to rename the BasicAnalysis class to Analysis now that the Analysis class is gone? That way other scripts could still import Analysis.
Collaborator
Author
There was a problem hiding this comment.
I'd tend to agree with the sentiment that "Analysis" is a more appropriate name (the single fit it returns might be considered "basic" compared to a set of fits as in a scan, but the available fitting methods are anything but "basic"). We can define the alias BasicAnalysis = Analysis for backwards compatibility.
…tibility, move mcmc_sampling to own module (shouldn't and doesn't need to be part of Analysis class)
…ze docs from analysis module; add intersphinx-registry to develop dependency group; refer to instructive Analysis class docstring for extended fitting tutorial; add previously missing poisson_llh method to Map class; add a few sphinx cross-references
…xamples napoleon section) and remove temporary simplejson cap
JanWeldert
approved these changes
May 28, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HypoFitResultconfigurable (less memory and disk space usage by default) and verify consistency between detailed metric info and the external metric value (where possible; not for a fit that usedDetectors-> TODO added)Analysisclass and renameBasicAnalysis -> Anaysis, but keeping an alias (is a replacement of nofit_hypo desirable?)Analysisclass docstringFixes #915
Fixes #913 (create a replacement issue for the randomness)
Closes #910
Fixes #827
Should at least partially address #644
In addition, #661 could be closed as not planned if this PR goes through.