IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 2:40:16 PM (19 years ago)
Author:
eugene
Message:

* updates from branch eam_branch_20070817

  • changed pmIsFoo to pmFooTest
  • changed pmModelGroup to pmModelClass
  • added offsets to pmSourceOp
  • changed pmModel.params_NEW to pmModel.params
  • use new APIs to define a pmModel from a pmPSF at X,Y (pmModelFromPSFforXY)
  • use pmModel member functions instead of _GetFunction functions
  • added modelParamsFromPSF for STRAIL and TEST1
  • move output psf model from readout->analysis to chip->analysis
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotPSFConvModel.c

    r14348 r14655  
    5858    psVector *dparams = modelConv->dparams;
    5959
    60     // get the model function for this model
    61     pmModelFunc modelFunc = pmModelFunc_GetFunction (modelConv->type);
    62     if (!modelFunc)
    63         psAbort("invalid model function");
    64 
    65     // get the limits function for this model
    66     pmModelLimits checkLimits = pmModelLimits_GetFunction (modelConv->type);
    67     if (!checkLimits)
    68         psAbort("invalid model limits function");
    69 
    7060    // create the minimization constraints
    7161    psMinConstraint *constraint = psMinConstraintAlloc();
    7262    constraint->paramMask = psVectorAlloc (params->n, PS_TYPE_U8);
    73     constraint->checkLimits = checkLimits;
     63    constraint->checkLimits = modelConv->modelLimits;
    7464
    7565    // set parameter mask based on fitting mode
     
    8171    // force the floating parameters to fall within the contraint ranges
    8272    for (int i = 0; i < params->n; i++) {
    83         checkLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);
    84         checkLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);
     73        modelConv->modelLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);
     74        modelConv->modelLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);
    8575    }
    8676
     
    9080    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
    9181
    92     bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelFunc);
     82    bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelConv->modelFunc);
    9383    for (int i = 0; i < dparams->n; i++) {
    9484        if (psTraceGetLevel("psphot") >= 4) {
Note: See TracChangeset for help on using the changeset viewer.