/** @file  psEllipse.h
 *
 * functions to manipulate sparse matrices equations
 *
 */

#ifndef PS_ELLIPSE_H
#define PS_ELLIPSE_H

// strucures to define elliptical shape parameters
typedef struct
{
    double major;                       // Major axis
    double minor;                       // Minor axis
    double theta;                       // Position angle
}
psEllipseAxes;

typedef struct
{
    double x2;                          // Moment of xx
    double y2;                          // Moment of yy
    double xy;                          // Moment of xy
}
psEllipseMoments;

typedef struct
{
    double sx;                          // Shape parameter in x
    double sy;                          // Shape parameter in y
    double sxy;                         // Shape parameter in xy
}
psEllipseShape;

// conversions between elliptical shape representations
psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments);
psEllipseShape psEllipseAxesToShape(psEllipseAxes axes);
psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape);

#endif
