def gridIndicesToMatIndices(i,j, maxI, maxJ):
    """
    converts grid coordinates to numpy array coordiantes
    grid has (0,0) at bottom left corner, numpy has (0,0)
    at top left corner.
    :param i: x - column index
    :param j: y - row index
    :param maxI: number of columns in grid
    :param maxJ: number of rows in grid
    :return: converted row and column coordiantes
    """
    return (i-1,maxJ-j-1)