From 7f77c191694de4fd2a956a1b67929f5f1620f1e9 Mon Sep 17 00:00:00 2001 From: "Pey Lian Lim (Github)" <2090236+pllim@users.noreply.github.com> Date: Thu, 2 Dec 2021 12:32:22 -0500 Subject: [PATCH] Address review comment --- glue_astronomy/translators/ccddata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glue_astronomy/translators/ccddata.py b/glue_astronomy/translators/ccddata.py index 47372f4..c7f0d87 100644 --- a/glue_astronomy/translators/ccddata.py +++ b/glue_astronomy/translators/ccddata.py @@ -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') @@ -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