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

adding weights option to fill_events #4458

Merged
merged 5 commits into from
May 4, 2023

Conversation

MRegeard
Copy link
Member

@MRegeard MRegeard commented Apr 6, 2023

This pull request is related to #4457.
I added a weights option to Map.fill_events. Since Map.fill_events uses Map.fill_by_coord which has a weights option, the implementation is straight forward.

Signed-off-by: Maxime Regeard <regeard@apc.in2p3.fr>
Signed-off-by: Maxime Regeard <regeard@apc.in2p3.fr>
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #4458 (7ffeb9b) into main (4f91177) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4458      +/-   ##
==========================================
+ Coverage   94.87%   94.93%   +0.05%     
==========================================
  Files         216      218       +2     
  Lines       30626    30888     +262     
==========================================
+ Hits        29057    29322     +265     
+ Misses       1569     1566       -3     
Impacted Files Coverage Δ
gammapy/maps/core.py 85.19% <100.00%> (ø)
gammapy/maps/region/tests/test_ndmap.py 100.00% <100.00%> (ø)

... and 45 files with indirect coverage changes

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

@adonath
Copy link
Member

adonath commented Apr 6, 2023

Thanks @MRegeard! I'm not sure we would really like to expose this, where we explicitly refer to "events" (see my comment ). What do you think @registerrier ?

Copy link
Member

@adonath adonath left a comment

Choose a reason for hiding this comment

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

Thanks @MRegeard! Please add a minimal test to establish the behavior...

gammapy/maps/core.py Outdated Show resolved Hide resolved
Signed-off-by: Maxime Regeard <regeard@apc.in2p3.fr>
Signed-off-by: Maxime Regeard <regeard@apc.in2p3.fr>
Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @MRegeard . Looks good. Please a a test for this new functionality.

@registerrier registerrier linked an issue Apr 14, 2023 that may be closed by this pull request
@registerrier registerrier added this to the 1.1 milestone Apr 14, 2023
Signed-off-by: Maxime Regeard <regeard@apc.in2p3.fr>
Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @MRegeard . No further comment.

@registerrier registerrier merged commit cf3166f into gammapy:main May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is no weights options for Map.fill_events
3 participants