def index_to_norm(i, s):
    """Compute the normalized and centered coordinate of an index.

    Parameters
    ----------
    i : float or int
        integer index
    s : int
        shape of one axis. Eg x = index_to_norm(x_index, w)

    Returns
    -------
    float
        normalized and centerd coordinate of the given index when the feature
        map has the given axis-size.
    """
    return (float(i) + .5)/float(s)