Multi-Order HEALPix Maps (ligo.skymap.moc)

Support for HEALPix UNIQ pixel indexing [1] and multi-order coverage (MOC) maps [2].

References

1

Reinecke & Hivon, 2015. “Efficient data structures for masks on 2D grids.” AA 580, A132. doi:10.1051/0004-6361/201526549

2

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
ordernumpy.ndarray

HEALPix resolution order, the logarithm base 2 of nside

ipixnumpy.ndarray

NESTED pixel index

Returns
uniqnumpy.ndarray

NUNIQ pixel index

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
uniqnumpy.ndarray

NUNIQ pixel index

Returns
ordernumpy.ndarray

HEALPix resolution order (logarithm base 2 of nside)

ipixnumpy.ndarray

NESTED pixel index

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
uniqnumpy.ndarray

NUNIQ pixel index

Returns
ordernumpy.ndarray

HEALPix resolution order, the logarithm base 2 of nside

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
uniqnumpy.ndarray

NUNIQ pixel index

Returns
areanumpy.ndarray

The pixel’s area in steradians

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_datanumpy.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.

Returns
nested_datanumpy.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.