# [−][src]Crate cdshealpix

Implementation of the HEALPix framework.

See papers:

- Gorsky2005: "HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere", Górski, K. M. et al., 2005; 2005ApJ...622..759G.
- Calabretta2004: "Mapping on the HEALPix grid", Calabretta, M. R., 2004; 2004astro.ph.12607C
- Calabretta2007: "Mapping on the HEALPix grid", Calabretta, M. R. et Roukema, B. F., 2007; 2007MNRAS.381..865C
- Reinecke2015: "Efficient data structures for masks on 2D grids", Reinecke, M. et Hivon, E., 2015; 2015A&A...580A.132R

## Modules

compass_point | Module defining the commodity enums Cardinal (points) and MainWind (points). |

nested | Module containing NESTED scheme methods |

## Constants

DEPTH_MAX | Constant = 29, i.e. the largest possible depth we can store on a signed positive long (4 bits for base cells + 2 bits per depth + 2 remaining bits (1 use in the unique notation). |

FOUR_OVER_PI | Constant = 4/pi. |

HALF_PI | Constant = pi/2. |

NSIDE_MAX | Constant = nside(29), i.e. the largest possible nside available when we store HEALPix hash on a u64. |

PI_OVER_FOUR | Constant = pi/4. |

TRANSITION_LATITUDE | Limit on the latitude (in radians) between the equatorial region and the polar caps. Equals asin(2/3) = 0.7297276562269663 radians ~= 41,81 degrees. Written $\theta_X$ in Calabretta2007. |

TRANSITION_Z | Limit on |z|=|sin(lat)| between the equatorial region and the polar caps. Equals 2/3, see Eq. (1) in Gorsky2005. |

## Statics

LAT_OF_SQUARE_CELL | Latitude, in the equatorial region, for which the distance from the cell center to its four vertices is almost equal on the sky (i.e. the shape of the cell on the sky is close to a square). The larger the depth, the better the approximation (based on differential calculus). |

## Traits

Customf64 | Simple trait used to implements |

## Functions

best_starting_depth | Returns the the smallest depth (in |

depth | Returns, for the given |

depth_unsafe | Same as depth except that this version does not check the argument, and thus does not panics if the argument is illegal. |

has_best_starting_depth | Returns |

is_depth | Returns |

is_in_equatorial_region | Returns |

is_in_projected_equatorial_region | Returns |

is_nside | Returns |

largest_center_to_vertex_distance | All types that implement |

largest_center_to_vertex_distance_with_radius | Returns an upper limit on the distance between a cell center and it furthest vertex, for
all the cells in the region covered by a cone of given center and radius. |

largest_center_to_vertex_distances_with_radius | Same as largest_center_to_vertex_distance_with_radius but making the computation for several depths at the same time. |

n_hash | Returns the number of distinct hash value (the number of cells or pixel the unit sphere is
devided in) at the given |

n_hash_unsafe | Same as n_hash except that this version does not panic if the given |

neighbour | Compute the base cell value which is the neighbour of the given base cell, in the given direction. |

nside | Returns, for the given depth, the number of cells along both axis of a base-resolution cell. |

nside_square | Returns, for the given difference of depth, the number of cells small cells the large cell contains. If the small cell level is 0, the result is the sqaured nside. |

nside_square_unsafe | Same as nside_square except that this version does not check the argument, and thus does not panics if the argument is illegal. |

nside_unsafe | Same as nside except that this version does not check the argument, and thus does not panics if the argument is illegal. |

proj | Performs the HEALPix projection: |

unproj | Unproject the given HEALPix projected points. |