diff options
author | Aaron LI <aly@aaronly.me> | 2018-02-03 16:18:33 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-02-03 16:18:33 +0800 |
commit | dd54669aec9843b5d4808bfd0cd26da325e914d5 (patch) | |
tree | 73bc854ee65fe481b60dc7527a562d8b7730d8cb | |
parent | 00571571b29cbcc664fc5bb11c7d98d06f5778b5 (diff) | |
download | fg21sim-dd54669aec9843b5d4808bfd0cd26da325e914d5.tar.bz2 |
Numba: disable/restrict JIT usage -> TODO: Cython
-rw-r--r-- | fg21sim/utils/grid.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fg21sim/utils/grid.py b/fg21sim/utils/grid.py index abca9ce..13bb776 100644 --- a/fg21sim/utils/grid.py +++ b/fg21sim/utils/grid.py @@ -8,11 +8,12 @@ Grid utilities. import numpy as np # import numba as nb +import healpy as hp from scipy import ndimage from .draw import ellipse # from .transform import rotate_center -from .healpix import ang2pix_ring +# from .healpix import ang2pix_ring # @nb.jit(nopython=True) @@ -223,7 +224,8 @@ def map_grid_to_healpix(grid, nside): gridmap = grid[2].flatten() phi = np.radians(lon) theta = np.radians(90.0 - lat) - ipix = ang2pix_ring(nside, theta, phi) + # ipix = ang2pix_ring(nside, theta, phi) + ipix = hp.ang2pix(nside, theta, phi, nest=False) # Get the corresponding input grid pixels for each HEALPix pixel # XXX: ``numba`` currently does not support ``numpy.unique()`` ipix_perm = ipix.argsort() |