Postprocessing Utilities ligo.skymap.postprocess.util

Postprocessing utilities for HEALPix sky maps.

ligo.skymap.postprocess.util.find_greedy_credible_levels(p, ranking=None)[source] [edit on github]

Find the greedy credible levels of a (possibly multi-dimensional) array.

Parameters
pnp.ndarray

The input array, typically a HEALPix image.

rankingnp.ndarray, optional

The array to rank in order to determine the greedy order. The default is p itself.

Returns
clsnp.ndarray

An array with the same shape as p, with values ranging from 0 to p.sum(), representing the greedy credible level to which each entry in the array belongs.

ligo.skymap.postprocess.util.smooth_ud_grade(m, nside, nest=False)[source] [edit on github]

Resample a sky map to a new resolution using bilinear interpolation.

Parameters
mnp.ndarray

The input HEALPix array.

nestbool, default=False

Indicates whether the input sky map is in nested rather than ring-indexed HEALPix coordinates (default: ring).

Returns
new_mnp.ndarray

The resampled HEALPix array. The sum of m is approximately preserved.