Skip to content

cdshealpix, a Rust HEALPix implementation #128

@bmatthieu3

Description

@bmatthieu3

@cdeil @fxpineau @astrofrog @tboch - Following our discussion from PyGamma19, a mid-term goal is to replace the current C HEALPix implementation from astrometry.net with the new Rust one (github link) developed by @fxpineau. The assumption behind that being that astropy_healpix will remain an affiliated package (because Rust is currently too recent to be moved to the core of astropy).

On my side, I continued my developments on cdshealpix (github link) and released a version 0.2.0 where:

  • I use the rust-numpy library to interface numpy arrays (and view arrays) between python and rust code.
  • rust-numpy relies on the pyo3 Python-Rust wrapper. Thus, cdshealpix does not rely on cffi anymore meaning that there is no more C code between python and rust (this is safer because I do not manipulate C raw pointers anymore...).

cdshealpix has some features that astropy_healpix does not have:

  • a polygon search that returns all the HEALPix cells in a SkyCoord describing a polygon on the sphere. Self-intersecting polygons are accepted.
  • an elliptical search
  • a method, external_edges_cells that returns the neighbors (i.e. the cells touching) of an HEALPix cell but at a deeper depth (it is a the same as neighbors but with a depth parameter that must be > to the depth of the HEALPix cell from which the neighbors are computed).

And some features from astropy_healpix are missing in cdshealpix. Those are:

  • The ring scheme. Currently, only the nested scheme is implemented.
  • The code responsible for the interpolation
  • The dx, dy offset optional arguments in healpix_to_lonlat and lonlat_to_healpix
  • The step optional argument in boundaries_lonlat (i.e. vertices in cdshealpix)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions