/* @file  pmMoments.h
 * @brief Definitions of the moments structure
 *
 * @author GLG, MHPCC
 *
 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
 * @date $Date: 2008-10-03 20:59:16 $
 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
 */

# ifndef PM_MOMENTS_H
# define PM_MOMENTS_H

/// @addtogroup Objects Object Detection / Analysis Functions
/// @{

/** pmMoments data structure
 *
 * One of the simplest measurements which can be made quickly for an object
 * are the object moments. We specify a structure to carry the moment information
 * for a specific source:
 *
 */
typedef struct
{
    float Mx;     ///< X-coord of centroid.
    float My;     ///< Y-coord of centroid.
    float Mxx;    ///< x-second moment = sigma_x^2 = = (FWHM_x/2.355)^2
    float Mxy;    ///< xy cross moment = sigma_xy
    float Myy;    ///< y-second moment = sigma_y^2 = = (FWHM_y/2.355)^2

    float Mxxx;    ///< third moment
    float Mxxy;    ///< third moment
    float Mxyy;    ///< third moment
    float Myyy;    ///< third moment

    float Mxxxx;   ///< fourth moment
    float Mxxxy;   ///< fourth moment
    float Mxxyy;   ///< fourth moment
    float Mxyyy;   ///< fourth moment
    float Myyyy;   ///< fourth moment

    float Sum;    ///< Pixel sum above sky (background).
    float Peak;   ///< Peak counts above sky.
    float Sky;    ///< Sky level (background).
    float dSky;   ///< local Sky variance
    float SN;     ///< approx signal-to-noise
    int nPixels;  ///< Number of pixels used.
}
pmMoments;

/** pmMomentsAlloc()
 *
 */
pmMoments *pmMomentsAlloc(void);

/// @}
# endif
