Skip to content

Commit

Permalink
BUG: Fix wcs_autolink to work with GWCS
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Jul 22, 2021
1 parent ad14432 commit be91c02
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions glue/plugins/wcs_autolinking/wcs_autolinking.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import copy

from astropy.wcs import WCS
from astropy.wcs.utils import pixel_to_pixel
from astropy.wcs.wcsapi import SlicedLowLevelWCS, HighLevelWCSWrapper
from astropy.wcs.wcsapi import BaseHighLevelWCS, SlicedLowLevelWCS, HighLevelWCSWrapper
from glue.config import autolinker, link_helper
from glue.core.link_helpers import MultiLink

Expand Down Expand Up @@ -183,7 +182,7 @@ def wcs_autolink(data_collection):

# Find subset of datasets with WCS coordinates
wcs_datasets = [data for data in data_collection
if hasattr(data, 'coords') and isinstance(data.coords, WCS)]
if hasattr(data, 'coords') and isinstance(data.coords, BaseHighLevelWCS)]

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

0 comments on commit be91c02

Please sign in to comment.