cdshealpix.nested.external_neighbours

cdshealpix.nested.external_neighbours(ipix, depth, delta_depth, num_threads=0)

Get the neighbours of specific healpix cells.

This method returns two arrays. One containing the healpix cells located on the external borders of the cells (at depth: depth + delta_depth). The other containing the healpix cells located on the external corners of the cells (at depth: depth + delta_depth). Please note that some pixels do not have 4 external corners e.g. the 12 base pixels have each only 2 external corners.

Parameters:
ipixnumpy.ndarray

The healpix cells from which the external neighbours will be computed

depthint

The depth of the input healpix cells

delta_depthint

The depth of the returned external neighbours will be equal to: depth + delta_depth

num_threadsint, optional

Specifies the number of threads to use for the computation. Default to 0 means it will choose the number of threads based on the RAYON_NUM_THREADS environment variable (if set), or the number of logical CPUs (otherwise)

Returns:
external_border_cells, external_corner_cells(numpy.ndarray, numpy.ndarray)

external_border_cells will store the pixels located at the external borders of ipix. It will be of shape: (N, 4 * 2 ** (delta_depth)) for N input pixels and because each cells have 4 borders. external_corner_cells will store the pixels located at the external corners of ipix It will be of shape: (N, 4) for N input pixels. -1 values will be put in the array when the pixels have no corners for specific directions.