cdshealpix:docs
  • Index
  • Modules

Navigation

  • next »
  • « previous |
  • cdshealpix 0.7.1 documentation »
  • API »
  • cdshealpix.nested.elliptical_cone_search

cdshealpix.nested.elliptical_cone_search¶

cdshealpix.nested.elliptical_cone_search(lon, lat, a, b, pa, depth, delta_depth=2, flat=False)¶

Get the HEALPix cells contained in an elliptical cone at a given depth.

This method is wrapped around the elliptical_cone_coverage_custom method from the cdshealpix Rust crate.

Parameters:
lonastropy.coordinates.Longitude

Longitude of the center of the elliptical cone.

latastropy.coordinates.Latitude

Latitude of the center of the elliptical cone.

aastropy.coordinates.Angle

Semi-major axe angle of the elliptical cone.

bastropy.coordinates.Angle

Semi-minor axe angle of the elliptical cone.

paastropy.coordinates.Angle

The position angle (i.e. the angle between the north and the semi-major axis, east-of-north).

depthint

Maximum depth of the HEALPix cells that will be returned.

delta_depthint, 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 to depth + 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.

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 elliptical cone.

Raises:
ValueError

If one of lon, lat, major_axe, minor_axe or pa contains more that one value.

ValueError

If the semi-major axis a exceeds 90deg (i.e. area of one hemisphere)

ValueError

If the semi-minor axis b is greater than the semi-major axis a

Examples

>>> from cdshealpix import elliptical_cone_search
>>> from astropy.coordinates import Angle, SkyCoord, Longitude, Latitude
>>> import astropy.units as u
>>> import numpy as np
>>> lon = Longitude(0, u.deg)
>>> lat = Latitude(0, u.deg)
>>> a = Angle(50, unit="deg")
>>> b = Angle(10, unit="deg")
>>> pa = Angle(45, unit="deg")
>>> max_depth = 12
>>> ipix, depth, fully_covered = elliptical_cone_search(lon, lat, a, b, pa, max_depth)

Page Contents

  • cdshealpix.nested.elliptical_cone_search
    • elliptical_cone_search()

Previous topic

cdshealpix.nested.polygon_search

Next topic

cdshealpix.nested.bilinear_interpolation

This Page

  • Show Source

Page Source   Back to Top

© Copyright 2024, Matthieu Baumann <matthieu.baumann@astro.unistra.fr> F.-X. Pineau <francois-xavier.pineau@astro.unistra.fr>.
Created using Sphinx 8.1.3.