Changeset 4977 for trunk/psphot/src/pmObjects_EAM.h
- Timestamp:
- Sep 7, 2005, 6:32:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmObjects_EAM.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmObjects_EAM.h
r4954 r4977 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-09-0 7 03:33:01$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-09-08 04:32:40 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 22 22 #include<math.h> 23 23 #include "pslib.h" 24 25 // XXX EAM : this function should be added to psLib 26 int psImageCountPixelMask (psImage *mask, psU8 value); 27 28 // XXX EAM : bug : missing from psLib/*.h 29 bool psMinimizeGaussNewtonDelta (psVector *delta, 30 const psVector *params, 31 const psVector *paramMask, 32 const psArray *x, 33 const psVector *y, 34 const psVector *yErr, 35 psMinimizeLMChi2Func func); 36 37 // XXX EAM : switch to psPoly when ready 38 psF64 Polynomial2DEval(const psPolynomial2D* myPoly, psF64 x, psF64 y); 39 40 // XXX EAM : psEllipse needs to be be included in psLib 41 # include "psEllipse.h" 24 #include "psLibUtils.h" 25 // #include "pmModelGroup.h" 26 27 // defined mask values for mask image pixels. 28 // this is probably a bad solution: we will want to set mask values 29 // outside of the PSPHOT code. Perhaps we can set up a registered 30 // set of mask values with specific meanings that other functions 31 // can add to or define? 32 enum { 33 PSPHOT_MASK_CLEAR = 0x00, 34 PSPHOT_MASK_INVALID = 0x01, 35 PSPHOT_MASK_SATURATED = 0x02, 36 PSPHOT_MASK_MARKED = 0x08, 37 } psphotMaskValues; 42 38 43 39 /** pmPeakType … … 91 87 } pmMoments; 92 88 93 typedef int pmModelType;94 95 89 /** pmPSFClump data structure 96 90 * … … 105 99 float dY; 106 100 } pmPSFClump; 101 102 typedef int pmModelType; 107 103 108 104 /** pmModel data structure … … 169 165 pmSource; 170 166 171 /** pmPSF data structure172 *173 *174 *175 */176 typedef struct177 {178 pmModelType type; ///< PSF Model in use179 psArray *params; ///< Model parameters (psPolynomial2D)180 float chisq; ///< PSF goodness statistic181 int nPSFstars; ///< number of stars used to measure PSF182 }183 pmPSF;184 185 167 pmPeak *pmPeakAlloc( 186 168 int x, ///< Row-coordinate in image space … … 316 298 ); 317 299 318 /**319 *320 * The object model functions are defined to allow for the flexible addition321 * of new object models. Every object model, with parameters represented by322 * pmModel, has an associated set of functions which provide necessary support323 * operations. A set of abstract functions allow the programmer to select the324 * approriate function or property for a specific named object model.325 *326 */327 328 /**329 *330 * This function is the model chi-square minimization function for this model.331 *332 */333 typedef psMinimizeLMChi2Func pmModelFunc;334 335 336 /**337 *338 * This function returns the integrated flux for the given model parameters.339 */340 typedef psF64 (*pmModelFlux)(const psVector *params);341 342 343 /**344 *345 * This function returns the radius at which the given model and parameters346 * achieves the given flux.347 *348 */349 typedef psF64 (*pmModelRadius)(const psVector *params, double flux);350 351 /**352 *353 * This function sets the model parameter limits vectors for the given model354 *355 */356 typedef bool (*pmModelLimits)(psVector **beta_lim, psVector **params_min, psVector **params_max);357 358 /**359 *360 * This function provides the model guess parameters based on the details of361 * the given source.362 *363 */364 typedef bool (*pmModelGuessFunc)(pmModel *model, pmSource *source);365 366 367 /**368 *369 * This function constructs the PSF model for the given source based on the370 * supplied psf and the FLT model for the object.371 *372 */373 typedef bool (*pmModelFromPSFFunc)(pmModel *modelPSF, pmModel *modelFLT, pmPSF *psf);374 375 376 /**377 *378 * This function returns the success / failure status of the given model fit379 *380 */381 typedef bool (*pmModelFitStatusFunc)(pmModel *model);382 383 /**384 *385 * Each of the function types above has a corresponding function which returns386 * the function given the model type:387 *388 */389 pmModelFunc pmModelFunc_GetFunction (pmModelType type);390 pmModelFlux pmModelFlux_GetFunction (pmModelType type);391 pmModelRadius pmModelRadius_GetFunction (pmModelType type);392 pmModelLimits pmModelLimits_GetFunction (pmModelType type);393 pmModelGuessFunc pmModelGuessFunc_GetFunction (pmModelType type);394 pmModelFromPSFFunc pmModelFromPSFFunc_GetFunction (pmModelType type);395 pmModelFitStatusFunc pmModelFitStatusFunc_GetFunction (pmModelType type);396 397 // pmModelGroup utility functions398 int pmModelParameterCount (pmModelType type);399 char *pmModelGetType (pmModelType type);400 pmModelType pmModelSetType (char *name);401 402 // structure to carry model group functions403 typedef struct {404 char *name;405 int nParams;406 pmModelFunc modelFunc;407 pmModelFlux modelFlux;408 pmModelRadius modelRadius;409 pmModelLimits modelLimits;410 pmModelGuessFunc modelGuessFunc;411 pmModelFromPSFFunc modelFromPSFFunc;412 pmModelFitStatusFunc modelFitStatusFunc;413 } pmModelGroup;414 415 300 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
