Skip to content

Commit

Permalink
Merge pull request #2209 from pllim/gwcs-autolink
Browse files Browse the repository at this point in the history
BUG: Fix wcs_autolink to work with GWCS
  • Loading branch information
astrofrog authored Jul 27, 2021
2 parents 88cbb4a + be91c02 commit bb2e8b3
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 bb2e8b3

Please sign in to comment.