IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 17, 2007, 11:01:59 AM (19 years ago)
Author:
magnier
Message:

substantial cleanups of APIs:

changed pmModelGroup to pmModelClass

dropped the _GetFunctions, and moved the modelClass-specific functions
to functions pointers in the pmModel structure. These are assigned
when the model is allocated, based on the model type. Now, instead of
calling, for example,

modelFunc = pmModelFunc_GetFunctions(model->type)
modelFunc();

you just do:

model->modelFunc()

moved some of the support functions into pmModelUtils and
pmSourceUtils.

changed pmIsFooBar to pmFooBarTest for better api listing.

added functions to evaluate and add/subtract models applying an offset
between the image coordinate frame and the chip frame (required frame
for model parameters)

added function(s) to instatiate a pmModel from a pmPSF based on a
given coordinate and peak flux.

added a function to set the model normalization based on a source flux
value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070817/psModules/src/objects/pmSourcePhotometry.c

    r13898 r14544  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-06-20 02:22:26 $
     5 *  @version $Revision: 1.28.6.1 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-08-17 21:01:59 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929#include "pmPSF.h"
    3030#include "pmSource.h"
    31 #include "pmModelGroup.h"
     31#include "pmModelClass.h"
    3232#include "pmSourcePhotometry.h"
    3333
     
    250250
    251251    // measure fitMag
    252     pmModelFlux modelFluxFunc = pmModelFlux_GetFunction (model->type);
    253     fitSum = modelFluxFunc (model->params);
     252    fitSum = model->modelFlux (model->params);
    254253    if (fitSum <= 0)
    255254        return false;
     
    324323
    325324    // the model function returns the source flux at a position
    326     pmModelFunc modelFunc = pmModelFunc_GetFunction (model->type);
    327325    psVector *coord = psVectorAlloc(2, PS_TYPE_F32);
    328326
     
    354352
    355353            // for the full model, add all points
    356             value = modelFunc (NULL, params, coord) - sky;
     354            value = model->modelFunc (NULL, params, coord) - sky;
    357355            modelSum += value;
    358356
Note: See TracChangeset for help on using the changeset viewer.