- Timestamp:
- Jul 9, 2010, 10:56:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/psModules/src/objects/pmModel.h
r26916 r28643 14 14 # define PM_MODEL_H 15 15 16 #include <pslib.h>17 #include "pmPSF.h"18 19 16 /// @addtogroup Objects Object Detection / Analysis Functions 20 17 /// @{ … … 22 19 /* pointers for the functions types below are supplied to each pmModel, and can be used by 23 20 the programmer without needing to know the model class */ 24 25 typedef enum {26 PM_MODEL_STATUS_NONE = 0x00, ///< model fit not yet attempted, no other info27 PM_MODEL_STATUS_FITTED = 0x01, ///< model fit completed28 PM_MODEL_STATUS_NONCONVERGE = 0x02, ///< model fit did not converge29 PM_MODEL_STATUS_OFFIMAGE = 0x04, ///< model fit drove out of range30 PM_MODEL_STATUS_BADARGS = 0x08, ///< model fit called with invalid args31 PM_MODEL_STATUS_LIMITS = 0x10 ///< model parameters hit limits32 } pmModelStatus;33 34 typedef enum {35 PM_MODEL_OP_NONE = 0x00,36 PM_MODEL_OP_FUNC = 0x01,37 PM_MODEL_OP_RES0 = 0x02,38 PM_MODEL_OP_RES1 = 0x04,39 PM_MODEL_OP_FULL = 0x07,40 PM_MODEL_OP_SKY = 0x08,41 PM_MODEL_OP_CENTER = 0x10,42 PM_MODEL_OP_NORM = 0x20,43 PM_MODEL_OP_NOISE = 0x40,44 } pmModelOpMode;45 46 /// Parameter limit types47 typedef enum {48 PM_MODEL_LIMITS_NONE, ///< Apply no limits: suitable for debugging49 PM_MODEL_LIMITS_IGNORE, ///< Ignore all limits: fit can go to town50 PM_MODEL_LIMITS_LAX, ///< Lax limits: attempting to reproduce even bad data51 PM_MODEL_LIMITS_MODERATE, ///< Moderate limits: cope with mildly bad data52 PM_MODEL_LIMITS_STRICT, ///< Strict limits: insist on good quality data53 } pmModelLimitsType;54 55 typedef struct pmModel pmModel;56 typedef struct pmSource pmSource;57 58 // This function is the model chi-square minimization function for this model.59 typedef psMinimizeLMChi2Func pmModelFunc;60 61 // This function sets the parameter limits for this model.62 typedef psMinimizeLMLimitFunc pmModelLimits;63 64 // This function returns the integrated flux for the given model parameters.65 typedef psF64 (*pmModelFlux)(const psVector *params);66 67 // This function returns the radius at which the given model and parameters68 // achieves the given flux.69 typedef psF64 (*pmModelRadius)(const psVector *params, double flux);70 71 // This function provides the model guess parameters based on the details of72 // the given source.73 typedef bool (*pmModelGuessFunc)(pmModel *model, pmSource *source);74 75 // This function constructs the PSF model for the given source based on the76 // supplied psf and the EXT model for the object.77 typedef bool (*pmModelFromPSFFunc)(pmModel *modelPSF, pmModel *modelEXT, const pmPSF *psf);78 79 // This function sets the model parameters based on the PSF for a given coordinate and central80 // intensity81 typedef bool (*pmModelParamsFromPSF)(pmModel *model, const pmPSF *psf, float Xo, float Yo, float Io);82 83 // This function returns the success / failure status of the given model fit84 typedef bool (*pmModelFitStatusFunc)(pmModel *model);85 86 // This function sets the parameter limits for the given model87 typedef bool (*pmModelSetLimitsFunc)(pmModelLimitsType type);88 21 89 22 /** pmModel data structure … … 122 55 pmModelSetLimitsFunc modelSetLimits; 123 56 }; 124 125 /** Symbolic names for the elements of [d]params126 * Note: these are #defines not enums as a given element of [d]params127 * may/will correspond to different parameters in different contexts128 */129 #define PM_PAR_SKY 0 ///< Sky130 #define PM_PAR_I0 1 ///< Central intensity131 #define PM_PAR_XPOS 2 ///< X centre of object132 #define PM_PAR_YPOS 3 ///< Y centre of object133 #define PM_PAR_SXX 4 ///< shape X^2 moment134 #define PM_PAR_SYY 5 ///< shape Y^2 moment135 #define PM_PAR_SXY 6 ///< shape XY moment136 #define PM_PAR_7 7 ///< ??? Unknown parameter137 #define PM_PAR_8 8 ///< ??? Unknown parameter138 57 139 58 /** pmModelAlloc()
Note:
See TracChangeset
for help on using the changeset viewer.
