def space2freq(x):
    """Converts space coordinates into frequency, x->f, y->g
    :param x: X grid
    :type x: astropy.Quantity array of type length
    :param y: Y grid
    :type y: astropy.Quantity array of type length
    :return: (array, array)

    """
    pixel_scale = x[0, 0] - x[1, 1]
    npix = x.shape[0]
    denominator = pixel_scale ** 2 * npix
    f = x / denominator
    return f
