/** @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(void)
{
    psTrace("psModules.objects", 10, "---- %s() begin ----\n", __func__);
    pmMoments *tmp = (pmMoments *) psAlloc(sizeof(pmMoments));

    tmp->Mrf = 0.0;
    tmp->Mrh = 0.0;

    tmp->KronCore = 0.0;
    tmp->KronCoreErr = 0.0;

    tmp->KronFlux = 0.0;
    tmp->KronFluxErr = 0.0;

    tmp->KronFinner = 0.0;
    tmp->KronFouter = 0.0;

    tmp->KronFluxPSF = 0.0;
    tmp->KronFluxPSFErr = 0.0;
    tmp->KronRadiusPSF = 0.0;

    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;
    tmp->SN = 0;

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