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

Add sample_coord for RegionNDMap #4088

Merged
merged 5 commits into from
Sep 20, 2022
Merged

Conversation

registerrier
Copy link
Contributor

Description

This pull request moves the sample_coord method to the base Map to allow sampling of RegionNDMap.
For now the implementation fails with HpxNDMap, a NotImplmentedError is therefore raised in HpxNDMap.sample_coord.

This should help #4087 and #4070 .

Dear reviewer

@registerrier registerrier added this to the 1.0 milestone Sep 18, 2022
@adonath adonath self-requested a review September 19, 2022 13:53
@adonath adonath self-assigned this Sep 19, 2022
adonath
adonath previously approved these changes Sep 19, 2022
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 a lot @registerrier! Great to see that just moving the method up the hierarchy works. You could optionally simplify the test by removing the creation of the Table.

adonath
adonath previously approved these changes Sep 19, 2022
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 @registerrier! No other comments from my side...

@adonath
Copy link
Member

adonath commented Sep 19, 2022

@registerrier Merging #4085 introduced a merge conflict, would you mind rebasing this PR here? Thanks!

@registerrier
Copy link
Contributor Author

I just rebased.

Signed-off-by: Terrier <rterrier@apc.in2p3.fr>
Signed-off-by: Terrier <rterrier@apc.in2p3.fr>
Signed-off-by: Terrier <rterrier@apc.in2p3.fr>
Signed-off-by: Terrier <rterrier@apc.in2p3.fr>
Signed-off-by: Terrier <rterrier@apc.in2p3.fr>
@codecov
Copy link

codecov bot commented Sep 19, 2022

Codecov Report

Merging #4088 (c9b2428) into master (2a5e529) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4088      +/-   ##
==========================================
- Coverage   94.02%   93.99%   -0.03%     
==========================================
  Files         162      162              
  Lines       21459    21430      -29     
==========================================
- Hits        20176    20144      -32     
- Misses       1283     1286       +3     
Impacted Files Coverage Δ
gammapy/maps/wcs/ndmap.py 90.90% <ø> (-0.22%) ⬇️
gammapy/scripts/main.py 97.36% <ø> (+12.99%) ⬆️
gammapy/utils/scripts.py 90.47% <ø> (+3.51%) ⬆️
gammapy/estimators/points/core.py 91.90% <100.00%> (ø)
gammapy/maps/core.py 86.79% <100.00%> (+0.23%) ⬆️
gammapy/maps/hpx/ndmap.py 92.47% <100.00%> (+0.01%) ⬆️
gammapy/scripts/download.py 84.61% <0.00%> (-15.39%) ⬇️
gammapy/modeling/iminuit.py 92.52% <0.00%> (-1.87%) ⬇️

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

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 @registerrier, looks good to me!

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.

2 participants