cdshealpix.ring.vertices_skycoord¶
- cdshealpix.ring.vertices_skycoord(ipix, nside, step=1)¶
Get the sky coordinates of the vertices of some HEALPix cells at a given nside.
This method returns the 4 vertices of each cell in
ipix
. This method is wrapped around the vertices method from the cdshealpix Rust crate.- Parameters:
- ipix
numpy.ndarray
The HEALPix cell indexes given as a
np.uint64
numpy array.- nsideint
The nside of the HEALPix cells.
- stepint, optional
The number of vertices returned per HEALPix side. By default it is set to 1 meaning that it will only return the vertices of the cell. 2 means that it will returns the vertices of the cell plus one more vertex per edge (the middle of it). More generally, the number of vertices returned is
4 * step
.
- ipix
- Returns:
- vertices
astropy.coordinates.SkyCoord
The sky coordinates of the 4 vertices of the HEALPix cells.
vertices
is aSkyCoord
object containing a \(N\) x \(4\) numpy array where N is the number of HEALPix cells given inipix
.
- vertices
- Raises:
- ValueError
When the HEALPix cell indexes given have values out of \([0, 12\) x \(N_{side} ^ 2[\).
Examples
>>> from cdshealpix.ring import vertices_skycoord >>> import numpy as np >>> ipix = np.array([42, 6, 10]) >>> depth = 12 >>> vertices = vertices_skycoord(ipix, 1 << depth)