def grid_from_coordinate_transform(numPix, Mpix2coord, ra_at_xy_0, dec_at_xy_0):
    """
    return a grid in x and y coordinates that satisfy the coordinate system


    :param numPix:
    :param Mpix2coord:
    :param ra_at_xy_0:
    :param dec_at_xy_0:
    :return:
    """
    a = np.arange(numPix)
    matrix = np.dstack(np.meshgrid(a, a)).reshape(-1, 2)
    x_grid = matrix[:, 0]
    y_grid = matrix[:, 1]
    ra_grid = x_grid * Mpix2coord[0, 0] + y_grid * Mpix2coord[0, 1] + ra_at_xy_0
    dec_grid = x_grid * Mpix2coord[1, 0] + y_grid * Mpix2coord[1, 1] + dec_at_xy_0
    return ra_grid, dec_grid
return a grid in x and y coordinates that satisfy the coordinate system


    :param numPix:
    :param Mpix2coord:
    :param ra_at_xy_0:
    :param dec_at_xy_0:
    :return: