def _get_cross_ds9_region(x, y, unc_x, unc_y, color, width, endbar=0.01):
    """
    Get ds9 region string for a cross that represents position uncertainties.

    Parameters
    ----------
    x : float
        Position in x direction.
    y : float
        Position in y direction.
    unc_x : float
        Uncertainty of the position in x direction.
    unc_y : float
        Uncertainty of the position in y direction.
    color : str ('green')
        Valid ds9 color.
    width : float
        Linewidth of the cross.
    endbar : float (default = 0.01)
        Length of the endbar in deg.
    """
    format_line = ' color = {0} width = {1}\n'.format(color, width)
    line_ = ''
    line = 'galactic;line({0:.5f},{1:.5f},{2:.5f},{3:.5f}) #'
    line_ += line.format(x - unc_x, y, x + unc_x, y) + format_line
    line_ += line.format(x, y - unc_y, x, y + unc_y) + format_line
    line_ += line.format(x - unc_x, y - endbar, x - unc_x, y + endbar) + format_line
    line_ += line.format(x + unc_x, y - endbar, x + unc_x, y + endbar) + format_line
    line_ += line.format(x - endbar, y + unc_y, x + endbar, y + unc_y) + format_line
    line_ += line.format(x - endbar, y - unc_y, x + endbar, y - unc_y) + format_line
    return line_