Skip to content

Fix issue 669#672

Merged
ndilalla merged 4 commits into
masterfrom
fix_issue_669
May 14, 2026
Merged

Fix issue 669#672
ndilalla merged 4 commits into
masterfrom
fix_issue_669

Conversation

@ndilalla
Copy link
Copy Markdown
Contributor

PR to solve issue #669.

When edisp is enabled globally and some sources have edisp disabled, loading an XML that contains apply_edisp='false' on those sources causes BinnedAnalysis to set edisp_val=0 instead of -1, leading to incorrect model counts after load_roi.  Strip the attribute before construction so the constructor always starts with edisp_val=-1; set_edisp_flag below will then correctly mark those sources as no-edisp.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 96.29630% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.23%. Comparing base (4046bca) to head (6a09b4f).

Files with missing lines Patch % Lines
fermipy/gtanalysis.py 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #672      +/-   ##
==========================================
+ Coverage   51.10%   51.23%   +0.12%     
==========================================
  Files         145      145              
  Lines       27384    27437      +53     
==========================================
+ Hits        13994    14056      +62     
+ Misses      13390    13381       -9     
Flag Coverage Δ
unittests 51.23% <96.29%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ndilalla ndilalla merged commit 669b4b2 into master May 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant