Make test_point_source_spectral_fit a circular test#480
Merged
eneights merged 7 commits intocositools:developfrom Feb 13, 2026
Merged
Conversation
…it (for a circular test). Fixes cositools#357 and cositools#477 Signed-off-by: Israel Martinez <imc@umd.edu>
# Conflicts: # tests/threeml/test_spectral_fitting.py
Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Btw, I also changed Band to PowerLaw. Even with a better response, people have reported that it is really difficult to fit the Crab to a Band function due to the narrow COSI energy resolution (the lower energy index is not well constrained). We should do the same with the tutorials. |
Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
Signed-off-by: Israel Martinez <imc@umd.edu>
eneights
approved these changes
Feb 13, 2026
Contributor
eneights
left a comment
There was a problem hiding this comment.
This looks good to me, thanks @israelmcmc!
Collaborator
Author
|
Thanks @eneights |
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.
Create fake test data and background using the same response as the fit. This is circular because if test the fitting routine itself, not the simulations or anything else.
Fixes #357 (because the response, despite being coarse, is the true response as far as the algorithm cares) and #477 (because the energy bins edges are by definition the same).
This was the last unit test that was still failing in the interfaces refactoring, but I believe it's due to unrelated reasons (those in the issues.