Package cds.healpix
package cds.healpix
Implementation of the HEALPix framework.
Reference papers are:
Reference papers are:
- [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.; Hivon, E., 2015; 2015A&A...580A.132R.
- Author:
- F.-X. Pineau
-
ClassDescriptionDefine an auxiliary axis, i.e.Very generic Cell class.Defines an object accepting cells.Utility class simply defining enums.Enum defining the compass cardinal points.Enum defining the compass main wind points.Enum defining the compass ordinal points.Equivalent of
Iterable
but forFlatHashIterator
.Define an iterator over the primitive type 'long'.This class is used when the number of Hash returned y a function is not necessarily known in advance but has an upper bound.Computing a hash value may implies objects creations.Compute an HEALPix hash value additionaly taking a 3rd dimension (the auxiliary axis).Utility class containing HEALPix constants and operations which are independent of the depth.Simple and Basic CLI (Command Line Interface) for quick testing.Implementation of the HEALPix tessellation using the NESTED scheme: the NESTED scheme consists in the concatenation of 12 z-order curves, one by HEALPix base cell.
The hash value in the NESTED scheme is build as follow: 0...0bbbb112233...
With
0...0: unused bits bbbb: the 4 bits coding the base cell, in [0, 11] 11: the 2 bits of the z-order curve coding depth 1 22: the 2 bits of the z-order curve coding depth 2 33: the 2 bits of the z-order curve coding depth 3 ... The constructor isprotected
.A BMOC is a MOC storing for each element a binary value telling if the cell is PARTIALY or FULLY covered by a region.
Internally, a long is made of bits:
BBBBxx...xxS00...00F if depth < depthMax
BBBBxx...xxxx...xxSF if depth = dephtMax
With:
B: the 4 bits coding the base hash [0- 11] xx: the 2 bits of level x S: the sentinel bit coding the depth 00: if (depth != depthMax) those bits are unused bits F; the flag bit (0: partial, 1: full) WARNING: not tested yet at depth 29, may not work because of Java signed long (all 64 bits of a long are used: 62 + 1 sentinel + 1 flag)Provides informations on the current element of the BMOC while iterating over it.Tells if an element of the MOC is covered or not by a region and, if covered, it tells is the element is partially or fully covered.A faster, thread-safe, but ugly (sorry: less readable) version ofHealpixNested
.The idea of this class is to avoid making multiple time the same operations (like selecting the optimal starting depth) in case of fixed radius cross-match.The idea of this interface is to avoid making multiple time the same operations (like selecting the optimal starting depth) in case of fixed radius cross-match.The idea is to use an implicit datastructure, encoding the natural tree traversal on bits with: - 0 bit: cell not in the MOC, go to the next sibling cell or go up if all siblings already explored - 1 bit: cell contains information, go deeper - 0000 bits: parent cell is in the MOC, no need to go deeper (ony for cells of depth < depthMax) (DISCLAIMER: for a more recent and slightly more compact version, see the CDS HEALPix Rust)The interface defines an item which is part of a Hierarchy.Interface use for interpolation, i.e.Interface defining a simple flat list of hash values (we do not use a Java List to avoid autoboxing.Class storing the hash values of the neighbour cells of a cell of given hash, together with the direction of each neighbour with respect to the central cell.In this interface methods, we do not used anEnumMap
ofCompassPoint.MainWind
but aNeighbourList
because: 1 - we want to avoid autoboxing (a map storing Long and not long).Define a projection of spherical coordinates (in the unit sphere) to the Euclidean plane, together with the reverse operation.Defines an Hash Range at the deeper depth.Range iterator to cell iterator decorator.WARNING: this is so far dim = 2 specific!Interface defining methods used to compute the position (on the unit sphere) of HEALPix cells center and vertices, and paths along HEALPix cells sides and edge.