Coverage for python/lsst/sims/utils/healpyUtils.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Correct for healpy being silly and running dec from 0-180.
Parameters ---------- nside : int Must be a value of 2^N. hpids : np.array Array (or single value) of healpixel IDs.
Returns ------- raRet : float (or np.array) RA positions of the input healpixel IDs. In radians. decRet : float (or np.array) Dec positions of the input healpixel IDs. In radians. """
""" Correct for healpy being silly and running dec from 0-180.
Parameters ---------- nside : int Must be a value of 2^N. hpids : np.array Array (or single value) of healpixel IDs.
Returns ------- raRet : float (or np.array) RA positions of the input healpixel IDs. In degrees. decRet : float (or np.array) Dec positions of the input healpixel IDs. In degrees. """
""" Assign ra,dec points to the correct healpixel.
Parameters ---------- nside : int Must be a value of 2^N. ra : np.array RA values to assign to healpixels. Radians. dec : np.array Dec values to assign to healpixels. Radians.
Returns ------- hpids : np.array Healpixel IDs for the input positions. """
""" Assign ra,dec points to the correct healpixel.
Parameters ---------- nside : int Must be a value of 2^N. ra : np.array RA values to assign to healpixels. Degrees. dec : np.array Dec values to assign to healpixels. Degrees.
Returns ------- hpids : np.array Healpixel IDs for the input positions. """
""" Take arrays of ra's, dec's, and value and bin into healpixels. Like numpy.hexbin but for bins on a sphere.
Parameters ---------- ra : np.array RA positions of the data points. Radians. dec : np.array Dec positions of the data points. Radians values : np.array The values at each ra,dec position. nside : int Healpixel nside resolution. Must be a value of 2^N. reduceFunc : function (numpy.mean) A function that will return a single value given a subset of `values`. dtype : dtype ('float') Data type of the resulting mask
Returns ------- mapVals : np.array A numpy array that is a valid Healpixel map. """
# Wow, I thought histogram would be faster than the loop, but this has been faster!
# Change any NaNs to healpy mask value
""" Take arrays of ra's, dec's, and value and bin into healpixels. Like numpy.hexbin but for bins on a sphere.
Parameters ---------- ra : np.array RA positions of the data points. Degrees. dec : np.array Dec positions of the data points. Degrees. values : np.array The values at each ra,dec position. nside : int Healpixel nside resolution. Must be a value of 2^N. reduceFunc : function (numpy.mean) A function that will return a single value given a subset of `values`. dtype : dtype ('float') Data type of the resulting mask
Returns ------- mapVals : np.array A numpy array that is a valid Healpixel map. """ reduceFunc=reduceFunc, dtype=dtype) |