Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix wcs_autolink to work with GWCS #2209

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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