Skip to content

Commit

Permalink
Minor cleanup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adonath committed Nov 4, 2019
1 parent 8ec4399 commit ecbd205
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions gammapy/cube/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,8 @@ def to_image(self, spectrum=None, keepdims=True):
dataset : `MapDataset`
Map dataset containing images.
"""
counts = self.counts.copy()
background = self.background_model.evaluate().copy()

counts *= self.mask_safe
background *= self.mask_safe
counts = self.counts * self.mask_safe
background = self.background_model.evaluate() * self.mask_safe

counts = counts.sum_over_axes(keepdims=keepdims)
exposure = _map_spectrum_weight(self.exposure, spectrum)
Expand Down
3 changes: 0 additions & 3 deletions gammapy/modeling/models/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ class SkyModels:
skymodels : list of `~gammapy.modeling.models.SkyModel`
Sky models
"""

frame = None

def __init__(self, skymodels):
existing_names = []

Expand Down

0 comments on commit ecbd205

Please sign in to comment.