Changeset 14652 for trunk/psModules/src/objects/pmModel.h
- Timestamp:
- Aug 23, 2007, 2:11:02 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmModel.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmModel.h
r13898 r14652 1 /* @file pm Objects.h1 /* @file pmModel.h 2 2 * @brief Functions to define and manipulate object models 3 3 * … … 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 6-20 02:22:26$7 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-08-24 00:11:02 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 /// @{ 18 18 19 / / type of model carried by the pmModel structure20 typedef int pmModelType; 19 /* pointers for the functions types below are supplied to each pmModel, and can be used by 20 the programmer without needing to know the model class */ 21 21 22 22 typedef enum { … … 41 41 } pmModelOpMode; 42 42 43 typedef struct pmModel pmModel; 44 typedef struct pmSource pmSource; 45 46 // This function is the model chi-square minimization function for this model. 47 typedef psMinimizeLMChi2Func pmModelFunc; 48 49 // This function sets the parameter limits for this model. 50 typedef psMinimizeLMLimitFunc pmModelLimits; 51 52 // This function returns the integrated flux for the given model parameters. 53 typedef psF64 (*pmModelFlux)(const psVector *params); 54 55 // This function returns the radius at which the given model and parameters 56 // achieves the given flux. 57 typedef psF64 (*pmModelRadius)(const psVector *params, double flux); 58 59 // This function provides the model guess parameters based on the details of 60 // the given source. 61 typedef bool (*pmModelGuessFunc)(pmModel *model, pmSource *source); 62 63 // This function constructs the PSF model for the given source based on the 64 // supplied psf and the EXT model for the object. 65 typedef bool (*pmModelFromPSFFunc)(pmModel *modelPSF, pmModel *modelEXT, pmPSF *psf); 66 67 // This function sets the model parameters based on the PSF for a given coordinate and central 68 // intensity 69 typedef bool (*pmModelParamsFromPSF)(pmModel *model, pmPSF *psf, float Xo, float Yo, float Io); 70 71 // This function returns the success / failure status of the given model fit 72 typedef bool (*pmModelFitStatusFunc)(pmModel *model); 73 43 74 /** pmModel data structure 44 75 * … … 50 81 * 51 82 */ 52 typedef struct 53 { 83 struct pmModel { 54 84 pmModelType type; ///< Model to be used. 55 85 psVector *params; ///< Paramater values. … … 62 92 float radiusFit; ///< fit radius actually used 63 93 pmResiduals *residuals; ///< normalized PSF residuals 64 }65 pmModel;66 94 67 /* XXX we are currently saving the residuals with the pmModel. It might be better to save this 68 * in the pmSource. we may want an API to Add/Sub a pmModel (analytical model only) or a 69 * pmSource (analytical + residuals). 70 */ 95 // functions for this model which depend on the model class 96 pmModelFunc modelFunc; 97 pmModelFlux modelFlux; 98 pmModelRadius modelRadius; 99 pmModelLimits modelLimits; 100 pmModelGuessFunc modelGuess; 101 pmModelFromPSFFunc modelFromPSF; 102 pmModelParamsFromPSF modelParamsFromPSF; 103 pmModelFitStatusFunc modelFitStatus; 104 }; 71 105 72 106 /** Symbolic names for the elements of [d]params … … 130 164 ); 131 165 166 bool pmModelAddWithOffset(psImage *image, 167 psImage *mask, 168 pmModel *model, 169 pmModelOpMode mode, 170 psMaskType maskVal, 171 int dx, 172 int dy); 173 174 bool pmModelSubWithOffset(psImage *image, 175 psImage *mask, 176 pmModel *model, 177 pmModelOpMode mode, 178 psMaskType maskVal, 179 int dx, 180 int dy); 181 132 182 /** pmModelFitStatus() 133 183 *
Note:
See TracChangeset
for help on using the changeset viewer.
