healbin

rubin_sim.utils.healbin(ra, dec, values, nside=128, reduce_func=<function mean>, dtype=<class 'float'>, fill_val=-1.6375e+30)

Take arrays of ra’s, dec’s, and value and bin into healpixels. Like numpy.hexbin but for bins on a sphere.

Parameters:
ranp.array

RA positions of the data points. Degrees.

decnp.array

Dec positions of the data points. Degrees.

valuesnp.array

The values at each ra,dec position.

nsideint

Healpixel nside resolution. Must be a value of 2^N.

reduce_funcfunction (numpy.mean)

A function that will return a single value given a subset of values.

dtypedtype (‘float’)

Data type of the resulting mask

fill_valfloat (hp.UNSEEN)

Value to fill in with healpixels that have no value. Default is the healpy mask value.

Returns:
mapValsnp.array

A numpy array that is a valid Healpixel map.