def ang2pix(nside, theta, phi, nest=False, lonlat=False):
    """Drop-in replacement for healpy `~healpy.pixelfunc.ang2pix`."""
    lon, lat = _healpy_to_lonlat(theta, phi, lonlat=lonlat)
    return lonlat_to_healpix(lon, lat, nside, order='nested' if nest else 'ring')
def ang2pix ( nside , theta , phi , nest = False , lonlat = False ) : lon , lat = _healpy_to_lonlat ( theta , phi , lonlat = lonlat ) return lonlat_to_healpix ( lon , lat , nside , order = 'nested' if nest else 'ring' )
Drop-in replacement for healpy `~healpy.pixelfunc.ang2pix`.