Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed offset calculation in Background2D.to_3d #4728

Merged
merged 4 commits into from Aug 29, 2023

Conversation

cgalelli
Copy link
Contributor

I tried to fix the bug presented in issue #4724 by @maxnoe

Background2D.to_3d was using cartesian offset instead of angular separation. Implemented using astropy.coordinates.angular_separation

Signed-off-by: cgalelli <claudio.galelli@obspm.fr>
gammapy/irf/background.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #4728 (d4cfb4d) into main (eb87310) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #4728   +/-   ##
=======================================
  Coverage   76.00%   76.00%           
=======================================
  Files         223      223           
  Lines       32018    32019    +1     
=======================================
+ Hits        24336    24337    +1     
  Misses       7682     7682           
Files Changed Coverage Δ
gammapy/irf/background.py 93.49% <100.00%> (+0.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: cgalelli <claudio.galelli@obspm.fr>
bkhelifi
bkhelifi previously approved these changes Aug 25, 2023
Copy link
Member

@bkhelifi bkhelifi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cgalelli

gammapy/irf/background.py Outdated Show resolved Hide resolved
gammapy/irf/background.py Outdated Show resolved Hide resolved
@QRemy QRemy added this to To do in gammapy.irf via automation Aug 28, 2023
@QRemy QRemy added backport-v1.0.x on-merge: backport to v1.0.x backport-v1.1.x on-merge: backport to v1.1.x labels Aug 28, 2023
@QRemy QRemy modified the milestones: 1.0.2, 1.1.1 Aug 28, 2023
Copy link
Contributor

@QRemy QRemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cgalelli, the remaining test fails are unrelated

@QRemy QRemy merged commit c71cb47 into gammapy:main Aug 29, 2023
14 of 15 checks passed
gammapy.irf automation moved this from To do to Done Aug 29, 2023
meeseeksmachine pushed a commit to meeseeksmachine/gammapy that referenced this pull request Aug 29, 2023
meeseeksmachine pushed a commit to meeseeksmachine/gammapy that referenced this pull request Aug 29, 2023
registerrier added a commit that referenced this pull request Sep 4, 2023
…8-on-v1.0.x

Backport PR #4728 on branch v1.0.x (Fixed offset calculation in Background2D.to_3d)
registerrier added a commit that referenced this pull request Sep 4, 2023
…8-on-v1.1.x

Backport PR #4728 on branch v1.1.x (Fixed offset calculation in Background2D.to_3d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v1.0.x on-merge: backport to v1.0.x backport-v1.1.x on-merge: backport to v1.1.x bug
Projects
gammapy.irf
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants