Skip to content

Commit

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

has_gwcs = False
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_gwcs = True
wcs = data.coords
else:
raise TypeError('data.coords should be an instance of Coordinates or WCS')
Expand Down Expand Up @@ -78,7 +78,7 @@ def to_object(self, data_or_subset, attribute=None):

values = values * u.Unit(component.units)

if not has_gwcs:
if has_fitswcs:
result = CCDData(values, mask=mask, wcs=wcs, meta=data.meta)
else:
# https://github.com/astropy/astropy/issues/11727
Expand Down

0 comments on commit 7f77c19

Please sign in to comment.