From 7cf0e5977e4a885595ca0931f26a5fef7dc8f82e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 26 Oct 2016 15:36:57 +0800 Subject: utils/grid.py: Use own-implemented JIT-optimized "rotate_center()" Also remove the dependence on "scipy". --- fg21sim/utils/grid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/utils/grid.py b/fg21sim/utils/grid.py index 7a81ea2..ca9510c 100644 --- a/fg21sim/utils/grid.py +++ b/fg21sim/utils/grid.py @@ -8,9 +8,9 @@ Grid utilities. import numpy as np import numba as nb -from scipy import ndimage from .draw import ellipse +from .rotate import rotate_center from .healpix import ang2pix_ring @@ -136,8 +136,8 @@ def make_grid_ellipse(center, size, resolution, rotation=None): gridmap[rr, cc] = 1.0 if rotation is not None: # Rotate the ellipse - gridmap = ndimage.rotate(gridmap, angle=rotation, order=1, - reshape=False) + gridmap = rotate_center(gridmap, angle=rotation, interp=True, + reshape=False, fill_value=0.0) return (lon, lat, gridmap) -- cgit v1.2.2