Skip to content

Commit bb2e8b3

Browse files
authored
Merge pull request #2209 from pllim/gwcs-autolink
BUG: Fix wcs_autolink to work with GWCS
2 parents 88cbb4a + be91c02 commit bb2e8b3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

glue/plugins/wcs_autolinking/wcs_autolinking.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import copy
22

3-
from astropy.wcs import WCS
43
from astropy.wcs.utils import pixel_to_pixel
5-
from astropy.wcs.wcsapi import SlicedLowLevelWCS, HighLevelWCSWrapper
4+
from astropy.wcs.wcsapi import BaseHighLevelWCS, SlicedLowLevelWCS, HighLevelWCSWrapper
65
from glue.config import autolinker, link_helper
76
from glue.core.link_helpers import MultiLink
87

@@ -183,7 +182,7 @@ def wcs_autolink(data_collection):
183182

184183
# Find subset of datasets with WCS coordinates
185184
wcs_datasets = [data for data in data_collection
186-
if hasattr(data, 'coords') and isinstance(data.coords, WCS)]
185+
if hasattr(data, 'coords') and isinstance(data.coords, BaseHighLevelWCS)]
187186

188187
# Only continue if there are at least two such datasets
189188
if len(wcs_datasets) < 2:

0 commit comments

Comments
 (0)