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 background to map model evaluator #1470

Merged
merged 8 commits into from Jul 10, 2018
Merged

Add background to map model evaluator #1470

merged 8 commits into from Jul 10, 2018

Conversation

@AtreyeeS
Copy link
Member

@AtreyeeS AtreyeeS commented Jul 10, 2018

The SkyModelEvaluator now adds background to the npred.

The fit stats value needed to be changed in the test (also mentioned in @mackaiver PR #1466 )

Copy link
Member

@adonath adonath left a comment

I've left a few minor comments, otherwise looks good to me..

@@ -29,11 +29,12 @@ class SkyModelMapFit(object):
PSF kernel
"""

def __init__(self, model, counts, exposure, psf=None):
def __init__(self, model, counts, exposure, psf=None, background=None):

This comment has been minimized.

@adonath

adonath Jul 10, 2018
Member

Please add the background to the docstring as well.

@pytest.fixture(scope='session')
def background(geom):
m = Map.from_geom(geom)
m.quantity = np.ones((9, 150, 400))*1e-5

This comment has been minimized.

@adonath

adonath Jul 10, 2018
Member

Can you infer the data shape from the geom object, when geom changes it will fail otherwise...

@adonath adonath self-assigned this Jul 10, 2018
@adonath adonath added the feature label Jul 10, 2018
@adonath adonath added this to To do in gammapy.maps via automation Jul 10, 2018
@adonath adonath added this to the 0.8 milestone Jul 10, 2018
AtreyeeS added 2 commits Jul 10, 2018
@cdeil
cdeil approved these changes Jul 10, 2018
Copy link
Member

@cdeil cdeil left a comment

Looks good to me, and tests pass locally. Merging.

@AtreyeeS - Thanks!

@cdeil cdeil merged commit e86f36e into gammapy:master Jul 10, 2018
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
gammapy.maps automation moved this from To do to Done Jul 10, 2018
@AtreyeeS AtreyeeS deleted the AtreyeeS:ModelEval branch Jul 10, 2018
@cdeil cdeil changed the title Background added to model evaluator Add background to map model evaluator 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