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

orientation: remove deprecated link_type, wcs_use_affine #3385

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Cubeviz
Imviz
^^^^^

- Orientation plugin: ``link_type`` and ``wcs_use_affine`` (previously deprecated) have now been removed. [#3385]

Mosviz
^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion docs/imviz/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ From the API within the Jupyter notebook (if linking by WCS):

.. code-block:: python

imviz.link_data(link_type='wcs')
imviz.link_data(align_by='wcs')

.. _imviz-orientation-rotation:

Expand Down
23 changes: 1 addition & 22 deletions jdaviz/configs/imviz/plugins/orientation/orientation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from astropy import units as u
from astropy.utils import deprecated
from astropy.wcs.wcsapi import BaseHighLevelWCS
from glue.core.link_helpers import LinkSame
from glue.core.message import (
Expand Down Expand Up @@ -152,33 +151,13 @@ def user_api(self):
return PluginUserApi(
self,
expose=(
'align_by', 'link_type', 'wcs_fast_approximation', 'wcs_use_affine',
'align_by', 'wcs_fast_approximation',
'delete_subsets', 'viewer', 'orientation',
'rotation_angle', 'east_left', 'add_orientation',
'set_north_up_east_left', 'set_north_up_east_right',
)
)

@property
@deprecated(since="4.0", alternative="align_by")
def link_type(self):
return self.align_by

@link_type.setter
@deprecated(since="4.0", alternative="align_by")
def link_type(self, link_type):
self.align_by = link_type

@property
@deprecated(since="4.0", alternative="wcs_fast_approximation")
def wcs_use_affine(self):
return self.wcs_fast_approximation

@wcs_use_affine.setter
@deprecated(since="4.0", alternative="wcs_fast_approximation")
def wcs_use_affine(self, wcs_use_affine):
self.wcs_fast_approximation = wcs_use_affine

def _link_image_data(self):
self.linking_in_progress = True
try:
Expand Down
3 changes: 0 additions & 3 deletions jdaviz/configs/imviz/tests/test_helper.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import numpy as np
import pytest


@pytest.mark.filterwarnings(r"ignore:The link_type function is deprecated")
@pytest.mark.filterwarnings(r"ignore:The wcs_use_affine function is deprecated")
def test_plugin_user_apis(imviz_helper):
for plugin_name, plugin_api in imviz_helper.plugins.items():
plugin = plugin_api._obj
Expand Down
2 changes: 1 addition & 1 deletion notebooks/ImvizDitheredExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
"metadata": {},
"outputs": [],
"source": [
"imviz.link_data(link_type='wcs')"
"imviz.link_data(align_by='wcs')"
]
},
{
Expand Down
Loading