Skip to content

Commit

Permalink
Merge 0b342d0 into ec8636b
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Oct 5, 2017
2 parents ec8636b + 0b342d0 commit 644e7c5
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "astropy_helpers"]
path = astropy_helpers
url = https://github.com/astropy/astropy-helpers.git
url = https://github.com/astrofrog/astropy-helpers.git
3 changes: 3 additions & 0 deletions .run_docker_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ uname -m
echo "Output of sys.maxsize in Python:"
python -c 'import sys; print(sys.maxsize)'
apt-get update
apt-get install -y git
# We only test the docs output on 64-bit Linux so as not to have to
# degrade the output with ellipses to work on all platforms.
python setup.py test -V -a "-s" --skip-docs
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0.2 (unreleased)
================

- No changes yet.
- Use OpenMP to parallelize the Cython wrappers. [#59]

0.1 (2017-10-01)
================
Expand Down
2 changes: 1 addition & 1 deletion astropy_healpix/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def bench_run(fast=False):
fast=fast)

results_single = dict(fct='pix2ang', size=int(size),
nside=nside, time_self=time_self)
nside=nside, time_self=time_self, nest=nest)

if HEALPY_INSTALLED:
time_healpy = bench_pix2ang(size=size, nside=nside,
Expand Down
16 changes: 8 additions & 8 deletions astropy_healpix/core_cython.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ from numpy cimport int64_t
cdef extern from "healpix.h":

# Converts a healpix index from the XY scheme to the RING scheme.
int64_t healpixl_xy_to_ring(int64_t hp, int Nside);
int64_t healpixl_xy_to_ring(int64_t hp, int Nside) nogil

# Converts a healpix index from the RING scheme to the XY scheme.
int64_t healpixl_ring_to_xy(int64_t ring_index, int Nside);
int64_t healpixl_ring_to_xy(int64_t ring_index, int Nside) nogil

# Converts a healpix index from the XY scheme to the NESTED scheme.
int64_t healpixl_xy_to_nested(int64_t hp, int Nside);
int64_t healpixl_xy_to_nested(int64_t hp, int Nside) nogil

# Converts a healpix index from the NESTED scheme to the XY scheme.
int64_t healpixl_nested_to_xy(int64_t nested_index, int Nside);
int64_t healpixl_nested_to_xy(int64_t nested_index, int Nside) nogil

# Converts a healpix index, plus fractional offsets (dx,dy), into (x,y,z)
# coordinates on the unit sphere. (dx,dy) must be in [0, 1]. (0.5, 0.5)
# is the center of the healpix. (0,0) is the southernmost corner, (1,1) is
# the northernmost corner, (1,0) is the easternmost, and (0,1) the
# westernmost.
void healpixl_to_radec(int64_t hp, int Nside, double dx, double dy,
double* ra, double* dec);
double* ra, double* dec) nogil

# Converts (RA, DEC) coordinates (in radians) to healpix XY index
int64_t radec_to_healpixlf(double ra, double dec, int Nside, double* dx, double* dy);
int64_t radec_to_healpixlf(double ra, double dec, int Nside, double* dx, double* dy) nogil

# Finds the healpixes neighbouring the given healpix, placing them in the
# array "neighbour". Returns the number of neighbours. You must ensure
# that "neighbour" has 8 elements.
#
# Healpixes in the interior of a large healpix will have eight neighbours;
# pixels near the edges can have fewer.
int healpixl_get_neighbours(int64_t hp, int64_t* neighbours, int Nside);
int healpixl_get_neighbours(int64_t hp, int64_t* neighbours, int Nside) nogil

int healpix_rangesearch_radec_simple(double ra, double dec, double radius, int Nside, int approx, int64_t** indices)
int healpix_rangesearch_radec_simple(double ra, double dec, double radius, int Nside, int approx, int64_t** indices) nogil

0 comments on commit 644e7c5

Please sign in to comment.