def pxci_to_bi(nstencil, N):
    """
    Generates a translation list converting x center indicesex starting
    at 0, which includes padding bins and into bin indices.

    Parameters
    ----------
    nstencil: integer
        Number of stencil points used
    N: integer
        Number of bins

    Returns
    -------
    list of bin indices.

    """
    nsidep = (nstencil-1)//2
    return list(range(nsidep)[::-1]) + list(range(N)) + list(
        range(N-1, N-nsidep-1, -1))