def global_coords(x_in, y_in, coeffs):
    """
    Transform pixel coordinates into projected coords using affine transformation coefficients

    Assumes input pixel coordinates refer to the center of the pixel, and so 0.5 is
    added to the inputs.

    @param x_in: X pixel coordinates
    @param y_in: Y pixel coordinates
    @param coeffs: Affine transformation coefficients

    @return projected coordinates
    """
    x = x_in + 0.5
    y = y_in + 0.5
    return coeffs[0] + coeffs[1] * x + coeffs[2] * y, coeffs[3] + coeffs[4
        ] * x + coeffs[5] * y
