def get_boxregion_string(x, y, a, b, angle, text=None):
    """Returns a ds9 string associated to a box with position (x,y) and angle
    Parameters
    ----------
    x : float
        Position of the box in x-coordinates
    y : float
        Position of the box in y-coordinates
    a : float
        Size of the box in the x-coordinates at PA=0 (pixel units)
    b : float
        Size of the box in the y-coordinates at PA=0 (pixel units)
    angle : float
        angle of the box for ds9
    text : str
        A comment for the region

    """
    s = 'box({:.8f},{:.8f},{},{},{:.8f}) # text={{{}}}\n'.format(x, y, a, b, angle, text)
    return s