/** @file  pmMoments.c
 *
 *  Functions defining the pmMoments structure
 *
 *  @author GLG, MHPCC
 *  @author EAM, IfA
 *
 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
 *  @date $Date: 2008-10-03 20:59:16 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
 *
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <pslib.h>
#include "pmMoments.h"

/******************************************************************************
pmMomentsAlloc(): Allocate the pmMoments structure and initialize the members
to zero.
*****************************************************************************/
pmMoments *pmMomentsAlloc()
{
    psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
    pmMoments *tmp = (pmMoments *) psAlloc(sizeof(pmMoments));
    tmp->Mx = 0.0;
    tmp->My = 0.0;

    tmp->Mxx = 0.0;
    tmp->Mxy = 0.0;
    tmp->Myy = 0.0;

    tmp->Mxxx = 0.0;
    tmp->Mxxy = 0.0;
    tmp->Mxyy = 0.0;
    tmp->Myyy = 0.0;

    tmp->Mxxxx = 0.0;
    tmp->Mxxxy = 0.0;
    tmp->Mxxyy = 0.0;
    tmp->Mxyyy = 0.0;
    tmp->Myyyy = 0.0;

    tmp->Sum = 0.0;
    tmp->Peak = 0.0;
    tmp->Sky = 0.0;
    tmp->nPixels = 0;

    psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__);
    return(tmp);
}
