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

# include "psphot.h"

// Add locally-defined models here.  As these mature, they can be moved to 
// psModule/src/objects/models

# include "models/pmModel_TAUSS.c"
# include "models/pmModel_STRAIL.c"

static pmModelGroup userModels[] = {
    {"PS_MODEL_TAUSS", 9, pmModelFunc_TAUSS,  pmModelFlux_TAUSS,  pmModelRadius_TAUSS,  pmModelLimits_TAUSS,  pmModelGuess_TAUSS, pmModelFromPSF_TAUSS, pmModelFitStatus_TAUSS},
    {"PS_MODEL_STRAIL", 9, pmModelFunc_STRAIL,  pmModelFlux_STRAIL,  pmModelRadius_STRAIL,  pmModelLimits_STRAIL,  pmModelGuess_STRAIL, pmModelFromPSF_STRAIL, pmModelFitStatus_STRAIL},
};

void psphotModelGroupInit (void) 
{ 

    // if pmModelGroupInit returns false, we have already init-ed
    if (!pmModelGroupInit ()) return;

    int Nmodels = sizeof (userModels) / sizeof (pmModelGroup);
    for (int i = 0; i < Nmodels; i++) {
	pmModelGroupAdd (&userModels[i]);
    }
    return;
}
