Skip to content

Commit

Permalink
Merge pull request #4 from keflavich/fix_issue3
Browse files Browse the repository at this point in the history
Fix for #3
  • Loading branch information
connor-mcclellan committed Nov 6, 2018
2 parents 59af1af + 3ad7106 commit 95d4305
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dendrocat/aperture.py
Expand Up @@ -68,8 +68,8 @@ def __init__(self, center, major, minor, pa, unit=None, frame='icrs',

def _refresh_xycen(self):
if type(self.center) == SkyCoord:
self.x_cen = ucheck(self.center._sky_coord_frame._data._lon.value, self.unit)
self.y_cen = ucheck(self.center._sky_coord_frame._data._lat.value, self.unit)
self.x_cen = ucheck(self.center.spherical.lon, self.unit)
self.y_cen = ucheck(self.center.spherical.lat, self.unit)

elif type(self.center) == regions.PixCoord:
self.x_cen = ucheck(self.center.x, self.unit)
Expand Down Expand Up @@ -100,7 +100,7 @@ def place(self, image, wcs=None):
self._refresh_xycen()
if self.unit.is_equivalent(u.deg) and wcs is not None:
pixel_scale = (np.abs(wcs.pixel_scale_matrix.diagonal()
.prod())**0.5 * u.deg/u.pix)
.prod())**0.5 * u.deg/u.pix)
center = np.array(SkyCoord(self.x_cen.to(u.deg),
self.y_cen.to(u.deg),
frame=self.frame,
Expand Down Expand Up @@ -172,15 +172,15 @@ def place(self, image, wcs=None):
Parameters
----------
image : array
The image upon which to place the aperture.
The image upon which to place the aperture.
wcs : astropy.wcs.wcs.WCS object, optional
The world coordinate system for the image, used for coordinate
transformations.
Returns
----------
numpy.ndarray
A boolean mask for the aperture with the same dimensions as `image`
A boolean mask for the aperture with the same dimensions as `image`
"""
return Aperture.place(self, image, wcs=wcs)

Expand Down

0 comments on commit 95d4305

Please sign in to comment.