def upix_to_pix(upix):
    """Get the nside from a unique pixel number."""
    nside = np.power(2, np.floor(np.log2(upix / 4)) / 2).astype(int)
    pix = upix - 4 * np.power(nside, 2)
    return pix, nside
Get the nside from a unique pixel number.