Compute a point on an ellipse parametrically. Inputs:

    * mjr: major axis (sigma not FWHM) of the ellipse
    * mnr: minor axis (sigma not FWHM) of the ellipse
    * pa: position angle (from +x to +y) of the ellipse, radians
    * th: the parameter, 0 <= th < 2pi: the eccentric anomaly

    Returns: (x, y)

    th may be a vector, in which case x and y will be as well.

def ellpoint (mjr, mnr, pa, th):
    """Compute a point on an ellipse parametrically. Inputs:

    * mjr: major axis (sigma not FWHM) of the ellipse
    * mnr: minor axis (sigma not FWHM) of the ellipse
    * pa: position angle (from +x to +y) of the ellipse, radians
    * th: the parameter, 0 <= th < 2pi: the eccentric anomaly

    Returns: (x, y)

    th may be a vector, in which case x and y will be as well.
    """
    _ellcheck (mjr, mnr, pa)
    from numpy import cos, sin

    ct, st = cos (th), sin (th)
    cp, sp = cos (pa), sin (pa)
    x = mjr * cp * ct - mnr * sp * st
    y = mjr * sp * ct + mnr * cp * st
    return x, y