Skip to content

Commit

Permalink
Merge pull request #3102 from bmorris3/backport-of-pr-3097-on-v3.10.x
Browse files Browse the repository at this point in the history
Backport PR #3097: Exclude subsets from WCS-only layer filter
  • Loading branch information
bmorris3 authored Jul 19, 2024
2 parents 0103718 + aa1c2ce commit 96cebe3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Cubeviz
Imviz
^^^^^

- Exclude subset layers from the orientation options in the Orientation plugin. [#3097]

Mosviz
^^^^^^

Expand Down
16 changes: 7 additions & 9 deletions jdaviz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,14 @@ def layer_is_table_data(layer):


def is_wcs_only(layer):
# exclude WCS-only layers from the layer choices:
# identify WCS-only layers
if hasattr(layer, 'layer'):
state = layer.layer
elif hasattr(layer, 'data'):
state = layer.data
elif hasattr(layer, 'meta'):
state = layer
else:
raise NotImplementedError
return getattr(state, 'meta', {}).get(_wcs_only_label, False)
layer = layer.layer

return (
# WCS-only layers have a metadata label:
getattr(layer, 'meta', {}).get(_wcs_only_label, False)
)


def is_not_wcs_only(layer):
Expand Down

0 comments on commit 96cebe3

Please sign in to comment.