Multi-Order HEALPix Maps (ligo.skymap.moc
)¶
Support for HEALPix UNIQ pixel indexing [1] and multi-order coverage (MOC) maps [2].
References¶
Reinecke & Hivon, 2015. “Efficient data structures for masks on 2D grids.” AA 580, A132. doi:10.1051/0004-6361/201526549
Boch et al., 2014. “MOC - HEALPix Multi-Order Coverage map.” IVOA Recommendation <http://ivoa.net/documents/MOC/>.
- ligo.skymap.moc.nest2uniq(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])¶
Convert a pixel index from NESTED to NUNIQ ordering.
- Parameters:
- order
numpy.ndarray
HEALPix resolution order, the logarithm base 2 of
nside
- ipix
numpy.ndarray
NESTED pixel index
- order
- Returns:
- uniq
numpy.ndarray
NUNIQ pixel index
- uniq
- ligo.skymap.moc.uniq2nest(x, [out1, out2, ]/, [out=(None, None), ]*, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])¶
Convert a pixel index from NUNIQ to NESTED ordering.
- Parameters:
- uniq
numpy.ndarray
NUNIQ pixel index
- uniq
- Returns:
- order
numpy.ndarray
HEALPix resolution order (logarithm base 2 of
nside
)- ipix
numpy.ndarray
NESTED pixel index
- order
- ligo.skymap.moc.uniq2order(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])¶
Determine the HEALPix resolution order of a HEALPix NESTED index.
- Parameters:
- uniq
numpy.ndarray
NUNIQ pixel index
- uniq
- Returns:
- order
numpy.ndarray
HEALPix resolution order, the logarithm base 2 of
nside
- order
- ligo.skymap.moc.uniq2pixarea(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])¶
Determine the area of a HEALPix NESTED index.
- Parameters:
- uniq
numpy.ndarray
NUNIQ pixel index
- uniq
- Returns:
- area
numpy.ndarray
The pixel’s area in steradians
- area
- ligo.skymap.moc.rasterize(moc_data, order=None)[source] [edit on github]¶
Convert a multi-order HEALPix dataset to fixed-order NESTED ordering.
- Parameters:
- moc_data
numpy.ndarray
A multi-order HEALPix dataset stored as a Numpy record array whose first column is called UNIQ and contains the NUNIQ pixel index. Every point on the unit sphere must be contained in exactly one pixel in the dataset.
- orderint, optional
The desired output resolution order, or
None
for the maximum resolution present in the dataset.
- moc_data
- Returns:
- nested_data
numpy.ndarray
A fixed-order, NESTED-ordering HEALPix dataset with all of the columns that were in moc_data, with the exception of the UNIQ column.
- nested_data