IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 2:11:02 PM (19 years ago)
Author:
magnier
Message:
  • added function pointers to pmModel to provide class-dependent functions
  • dropped pmModel*_GetFunction functions (use pmModel->func functions instead)
  • added modelParamsFromPSF functions to model classes
  • changed pmModelGroup to pmModelClass
  • added pmSourceFitSet.[ch]
  • updated pmSourceFitSet to allow variable model classes
  • added functions to add/sub and eval models & sources with an offset between image and chip
  • added function to set a pmModel flux
  • added function to instatiate a pmModel from a pmPSF at a coordinate
  • moved pmPSF I/O to chip->analysis from readout->analysis
  • changed pmPSF I/O function names from *ForPSFmodel to pmPSFmodel*
  • changed pmModel.params_NEW back to pmModel.params
  • changed pmFind*Peaks to pmPeaksIn* (* = Image,Vector)
  • dropped pmCullPeaks (deprecated)
  • changed pmModelSetType to pmModelClassGetType
  • changed pmModelGetType to pmModelClassGetName
  • fixed PGAUSS implementation of modelRadius function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmModelGroup.h

    r11253 r14652  
    11/* @file  pmModelGroup.h
    22 *
    3  * The object model function types are defined to allow for the flexible addition
    4  * of new object models. Every object model, with parameters represented by
    5  * pmModel, has an associated set of functions which provide necessary support
    6  * operations. A set of abstract functions allow the programmer to select the
    7  * approriate function or property for a specific named object model.
     3 * The object model function types are desined to allow for the flexible addition of new object
     4 * models. Every object model, with parameters represented by pmModel, has an associated set of
     5 * functions which provide necessary support operations. A set of abstract functions allow the
     6 * programmer to select the approriate function or property for a specific named object model.
     7 *
     8 * Every model instance belongs to a class of models, defined by the value of
     9 * the pmModelType type entry. Various functions need access to information about
     10 * each of the models. Some of this information varies from model to model, and
     11 * may depend on the current parameter values or other data quantities. In order
     12 * to keep the code from requiring the information about each model to be coded
     13 * into the low-level fitting routines, we define a collection of functions which
     14 * allow us to abstract this type of model-dependent information. These generic
     15 * functions take the model type and return the corresponding function pointer
     16 * for the specified model. Each model is defined by creating this collection of
     17 * specific functions, and placing them in a single file for each model. We
     18 * define the following structure to carry the collection of information about
     19 * the models.
    820 *
    921 * @author EAM, IfA
    1022 *
    11  * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    12  * @date $Date: 2007-01-24 02:54:15 $
     23 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     24 * @date $Date: 2007-08-24 00:11:02 $
    1325 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1426 */
     
    2335typedef psMinimizeLMChi2Func pmModelFunc;
    2436
    25 //  This function is the model chi-square minimization function for this model.
     37//  This function sets the parameter limits for this model.
    2638typedef psMinimizeLMLimitFunc pmModelLimits;
    2739
     
    2941typedef psF64 (*pmModelFlux)(const psVector *params);
    3042
    31 
    3243// This function returns the radius at which the given model and parameters
    3344// achieves the given flux.
    3445typedef psF64 (*pmModelRadius)(const psVector *params, double flux);
    3546
    36 /*  This function sets the model parameter limits vectors for the given model
    37  */
    38 // typedef bool (*pmModelLimits)(psVector **beta_lim, psVector **params_min, psVector **params_max);
    39 
    40 /*  This function provides the model guess parameters based on the details of
    41  *   the given source.
    42  */
     47//  This function provides the model guess parameters based on the details of
     48//  the given source.
    4349typedef bool (*pmModelGuessFunc)(pmModel *model, pmSource *source);
    4450
    45 
    46 /*  This function constructs the PSF model for the given source based on the
    47  *  supplied psf and the EXT model for the object.
    48  */
     51//  This function constructs the PSF model for the given source based on the
     52//  supplied psf and the EXT model for the object.
    4953typedef bool (*pmModelFromPSFFunc)(pmModel *modelPSF, pmModel *modelEXT, pmPSF *psf);
    5054
    51 /*  This function returns the success / failure status of the given model fit
    52  */
     55//  This function sets the model parameters based on the PSF for a given coordinate and central
     56//  intensity
     57typedef bool (*pmModelParamsFromPSF)(pmModel *model, pmPSF *psf, float Xo, float Yo, float Io);
     58
     59//  This function returns the success / failure status of the given model fit
    5360typedef bool (*pmModelFitStatusFunc)(pmModel *model);
    5461
    55 /* Every model instance belongs to a class of models, defined by the value of
    56  * the pmModelType type entry. Various functions need access to information about
    57  * each of the models. Some of this information varies from model to model, and
    58  * may depend on the current parameter values or other data quantities. In order
    59  * to keep the code from requiring the information about each model to be coded
    60  * into the low-level fitting routines, we define a collection of functions which
    61  * allow us to abstract this type of model-dependent information. These generic
    62  * functions take the model type and return the corresponding function pointer
    63  * for the specified model. Each model is defined by creating this collection of
    64  * specific functions, and placing them in a single file for each model. We
    65  * define the following structure to carry the collection of information about
    66  * the models.
    67  */
    6862typedef struct
    6963{
     
    7670    pmModelGuessFunc     modelGuessFunc;
    7771    pmModelFromPSFFunc   modelFromPSFFunc;
     72    pmModelParamsFromPSF modelParamsFromPSF;
    7873    pmModelFitStatusFunc modelFitStatusFunc;
    7974}
Note: See TracChangeset for help on using the changeset viewer.