Skip to content

Commit

Permalink
Modified fill_map_counts to use the new maps.fill_by_coords
Browse files Browse the repository at this point in the history
  • Loading branch information
registerrier committed Feb 23, 2018
1 parent a25ba13 commit 9aaf316
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions gammapy/cube/basic_cube.py
Expand Up @@ -23,13 +23,9 @@ def fill_map_counts(event_list, ndmap):
ref_geom = ndmap.geom
# Convert events coordinates
if ref_geom.coordsys == 'GAL':
galactic_coords = event_list.galactic
tmp.append(galactic_coords.l)
tmp.append(galactic_coords.b)
tmp.append(event_list.galactic)
elif ref_geom.coordsys == 'CEL':
radec_coords = event_list.radec
tmp.append(radec_coords.ra)
tmp.append(radec_coords.dec)
tmp.append(event_list.radec)
else:
# should raise an error here. The map is not correct.
raise ValueError("Incorrect coordsys of input map.")
Expand Down

0 comments on commit 9aaf316

Please sign in to comment.