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 MapMaker run method #1562

Merged
merged 2 commits into from Jul 25, 2018
Merged

Add MapMaker run method #1562

merged 2 commits into from Jul 25, 2018

Conversation

@AtreyeeS
Copy link
Member

@AtreyeeS AtreyeeS commented Jul 25, 2018

This supersedes PR #1561 to solve merge conflicts

@AtreyeeS AtreyeeS mentioned this pull request Jul 25, 2018
@cdeil cdeil added the feature label Jul 25, 2018
@cdeil cdeil added this to the 0.8 milestone Jul 25, 2018
@cdeil cdeil added this to To do in gammapy.maps via automation Jul 25, 2018
@cdeil
Copy link
Member

@cdeil cdeil commented Jul 25, 2018

Please add a test or change the existing test to exercise run for one example (could have one or two runs).

@AtreyeeS
Copy link
Member Author

@AtreyeeS AtreyeeS commented Jul 25, 2018

Hi! Added a test.

But I don't really see the added advantage of having a MapMaker.run(). It simply returns a dictionary right? The user could have achieved this quite simply.

Or maybe I am missing the point @mackaiver was trying to make!

@cdeil
Copy link
Member

@cdeil cdeil commented Jul 25, 2018

@AtreyeeS - The whole MapMaker is a convenience high-level interface, nothing there is really needed.

Adding run taking an obslist is equivalent to
http://docs.gammapy.org/dev/api/gammapy.spectrum.SpectrumExtraction.html#gammapy.spectrum.SpectrumExtraction.run

A discussion on API patterns in Gammapy is coming soon, but for now, let's just continue this pattern here with the MapMaker that basically one does something like:

results = MapMaker(config).run(observations)
@cdeil
cdeil approved these changes Jul 25, 2018
@cdeil
cdeil approved these changes Jul 25, 2018
Copy link
Member

@cdeil cdeil left a comment

@registerrier - I'm merging this in now, to avoid merge conflicts and so that we can move ahead with more work on MapMaker tomorrow.

@cdeil cdeil merged commit 019e4d7 into gammapy:master Jul 25, 2018
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
gammapy.maps automation moved this from To do to Done Jul 25, 2018
@cdeil cdeil changed the title Added MapMaker.run Add MapMaker run method Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
gammapy.maps
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants