Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: P. L. Lim <[email protected]>

Add missing import
  • Loading branch information
rosteen committed Oct 23, 2023
1 parent 9e955a8 commit add75cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,6 @@ def _reparent_subsets(self, old_parent, new_parent=None):
# Convert center
x, y = pixel_to_pixel(old_parent.coords, new_parent.coords,
roi.xc, roi.yc)
# Can't use set_center here because CircularAnnulusROI doesn't have it
subset_group.subset_state.move_to(x, y)

for att in ("radius", "inner_radius", "outer_radius",
Expand Down
16 changes: 2 additions & 14 deletions jdaviz/configs/imviz/tests/test_delete_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from astropy.io import fits
from astropy.nddata import NDData
from numpy.testing import assert_allclose
from regions import PixCoord, CirclePixelRegion, RectanglePixelRegion

Expand All @@ -13,19 +13,7 @@ def test_delete_with_subset_wcs(self):
arr = np.ones((10, 10))

# First data with WCS, same as the one in BaseImviz_WCS_NoWCS.
hdu3 = fits.ImageHDU(arr, name='SCI')
hdu3.header.update({'CTYPE1': 'RA---TAN',
'CUNIT1': 'deg',
'CDELT1': -0.0002777777778,
'CRPIX1': 1,
'CRVAL1': 337.5202808,
'NAXIS1': 10,
'CTYPE2': 'DEC--TAN',
'CUNIT2': 'deg',
'CDELT2': 0.0002777777778,
'CRPIX2': 1,
'CRVAL2': -20.833333059999998,
'NAXIS2': 10})
hdu3 = NDData(arr, wcs=self.wcs_1)
self.imviz.load_data(hdu3, data_label='has_wcs_3')

self.imviz.link_data(link_type='wcs', wcs_fallback_scheme=None, error_on_fail=True)
Expand Down

0 comments on commit add75cb

Please sign in to comment.