Skip to content

Commit

Permalink
Backward compat patch
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Dec 7, 2021
1 parent 7f77c19 commit e54b08c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions glue_astronomy/translators/ccddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ def to_object(self, data_or_subset, attribute=None):
data = data_or_subset
subset_state = None

has_fitswcs = False
if isinstance(data.coords, WCS):
has_fitswcs = True
wcs = data.coords
elif type(data.coords) is Coordinates or data.coords is None:
wcs = None
elif isinstance(data.coords, BaseHighLevelWCS):
has_fitswcs = False
wcs = data.coords
elif type(data.coords) is Coordinates or data.coords is None:
has_fitswcs = True # For backward compatibility
wcs = None
else:
raise TypeError('data.coords should be an instance of Coordinates or WCS')

Expand Down

0 comments on commit e54b08c

Please sign in to comment.