def laysin(cols, rows, c):
    """ Given the center and the amount of rows and columns,
    return in which bin the axes is in.
    """
    dx, dy = 1.0/cols, 1.0/rows
    x, y = int(c[0]/dx), int(c[1]/dy)
    return x + y*cols