cdshealpix.nested.cone_search¶
- cdshealpix.nested.cone_search(lon, lat, radius, depth, depth_delta=2, flat=False)¶
Get the HEALPix cells contained in a cone at a given depth.
This method is wrapped around the cone method from the cdshealpix Rust crate.
- Parameters:
- lon
astropy.coordinates.Longitude
Longitude of the center of the cone.
- lat
astropy.coordinates.Latitude
Latitude of the center of the cone.
- radius
astropy.units.Quantity
Radius of the cone.
- depthint
Maximum depth of the HEALPix cells that will be returned.
- depth_deltaint, optional
To control the approximation, you can choose to perform the computations at a deeper depth using the
depth_delta
parameter. The depth at which the computations will be made will therefore be equal todepth
+depth_delta
.- flatboolean, optional
False by default (i.e. returns a consistent MOC). If True, the HEALPix cells returned will all be at depth indicated by
depth
.
- lon
- Returns:
- ipix, depth, fully_covered(
numpy.ndarray
,numpy.ndarray
,numpy.ndarray
) A tuple containing 3 numpy arrays of identical size:
ipix
stores HEALPix cell indices.depth
stores HEALPix cell depths.fully_covered
stores flags on whether the HEALPix cells are fully covered by the cone.
- ipix, depth, fully_covered(
- Raises:
- ValueError
When one of
lat
,lon
andradius
contains more that one value.
Examples
>>> from cdshealpix import cone_search >>> from astropy.coordinates import Longitude, Latitude >>> import astropy.units as u >>> ipix, depth, fully_covered = cone_search(lon=Longitude(0 * u.deg), lat=Latitude(0 * u.deg), radius=10 * u.deg, depth=10)