# include "psphotInternal.h"

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

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

static pmModelGroup userModels[] = {
    {"PS_MODEL_TEST1", 7, pmModelFunc_TEST1,  pmModelFlux_TEST1,  pmModelRadius_TEST1,  pmModelLimits_TEST1,  pmModelGuess_TEST1, pmModelFromPSF_TEST1, pmModelFitStatus_TEST1},
    {"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;
}
