Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Simplify reset_frame_identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jul 2, 2014
1 parent bc1e680 commit 54ec688
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions wcsaxes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ def reset_frame_identifiers():
"""
Remove any registered frame identifiers.
"""
from copy import deepcopy
for identifier in deepcopy(FRAME_IDENTIFIERS):
FRAME_IDENTIFIERS.remove(identifier)

global FRAME_IDENTIFIERS
FRAME_IDENTIFIERS = []

def get_coordinate_frame(wcs):
"""
Expand All @@ -134,7 +132,8 @@ def get_coordinate_frame(wcs):
if coordinate_class is not None:
break
if coordinate_class is None:
raise ValueError("Frame not supported: {0}/{1}".format(xcoord, ycoord))
raise ValueError("Frame not supported: {0}/{1}".format(wcs.wcs.ctype[0],
wcs.wcs.ctype[1]))

return coordinate_class

Expand Down

0 comments on commit 54ec688

Please sign in to comment.