def ellipse(h=250, v=250, x0=400, y0=400, size=(1024, 1360), theta=0):
    """
    returns array with 'size' with an ellipse centered at x0,y0 with diameters h(horizontal) and v(vertical) tilted at theta degrees. The h-horizontal and v-vertical is accurate only if theta is zero degrees.

    Parameters
    ----------
    h : float
        diameter of horizontal(zero degrees) axis of the ellipse
    v : float
        diameter of vertical(zero degrees) axis of the ellipse
    x0 : float
        x-coordinate of the center of the ellipse
    y0 : float
        y-coordinate of the center of the ellipse
    size : tuple
        size of the output image Default: 1024,1360
    theta : float
        angle of rotation in degrees. Default: 0

    Returns
    -------
    mask : numpy array
        numpy array with 'size'

    Examples
    --------
    the example of usage. To draw an ellise center at (1115,659) with horizontal diameter of 52 pixels and vertical diameter of 56 pixels.

    >>> e = draw_an_ellipsoid(h = 52, v = 56, x0 = 1115, y0 = 659
    """
    from astropy.modeling.functional_models import Ellipse2D
    from astropy.coordinates import Angle
    from numpy import mgrid
    Ellipse = Ellipse2D
    theta = Angle(theta, 'deg')
    e = Ellipse2D(amplitude=1, x_0=x0, y_0=y0, a=h / 2, b=v / 2, theta=
        theta.radian)
    y, x = mgrid[0:size[0], 0:size[1]]
    return e(x, y)
