Skip to content

Commit

Permalink
Merge pull request #3097 from bmorris3/exclude-subsets-orientation-dr…
Browse files Browse the repository at this point in the history
…opdown

Exclude subsets from WCS-only layer filter
  • Loading branch information
bmorris3 authored Jul 17, 2024
2 parents 23b3edd + b13c3bc commit 4fe79a9
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 @@ -207,6 +207,8 @@ Imviz
- Fix multiple footprints bug that prevented footprint updates on changes to the
viewer orientation. [#2918]

- 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 @@ -241,16 +241,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 4fe79a9

Please sign in to comment.