Changeset 6872 for trunk/psModules/src/objects/pmModelGroup.c
- Timestamp:
- Apr 17, 2006, 8:01:05 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmModelGroup.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmModelGroup.c
r5844 r6872 1 # include "pmModelGroup.h" 2 1 /** @file pmModelGroup.c 2 * 3 * Functions to define and manipulate object model attributes 4 * 5 * @author GLG, MHPCC 6 * @author EAM, IfA 7 * 8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-17 18:01:05 $ 10 * 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 12 * 13 */ 14 15 #include <stdio.h> 16 #include <math.h> 17 #include <string.h> 18 #include "pslib.h" 19 #include "psEllipse.h" 20 #include "pmHDU.h" 21 #include "pmFPA.h" 22 #include "pmPeaks.h" 23 #include "pmMoments.h" 24 #include "pmGrowthCurve.h" 25 #include "pmModel.h" 26 #include "pmPSF.h" 27 #include "pmSource.h" 28 #include "pmModelGroup.h" 29 30 // XXX shouldn't these be defined for us in pslib.h ??? 3 31 double hypot(double x, double y); 4 32 double sqrt (double x); 5 33 6 #include "psEllipse.h"7 34 #include "models/pmModel_GAUSS.c" 8 35 #include "models/pmModel_PGAUSS.c" … … 25 52 if (modelGroup == NULL) 26 53 return; 27 psFree (modelGroup);28 54 return; 29 55 } … … 60 86 } 61 87 Nmodels = Nnew; 88 return; 89 } 90 91 void pmModelGroupCleanup (void) 92 { 93 94 psFree (models); 62 95 return; 63 96 } … … 153 186 return (models[type].name); 154 187 } 188 189 /****************************************************************************** 190 pmSourceModelGuess(source, model): This function allocates a new 191 pmModel structure based on the given modelType specified in the argument list. 192 The corresponding pmModelGuess function is returned, and used to 193 supply the values of the params array in the pmModel structure. 194 195 XXX: Many parameters are based on the src->moments structure, which is in 196 image, not subImage coords. Therefore, the calls to the model evaluation 197 functions will be in image, not subImage coords. Remember this. 198 *****************************************************************************/ 199 pmModel *pmSourceModelGuess(pmSource *source, 200 pmModelType modelType) 201 { 202 psTrace(__func__, 3, "---- %s() begin ----\n", __func__); 203 PS_ASSERT_PTR_NON_NULL(source->moments, false); 204 PS_ASSERT_PTR_NON_NULL(source->peak, false); 205 206 pmModel *model = pmModelAlloc(modelType); 207 208 pmModelGuessFunc modelGuessFunc = pmModelGuessFunc_GetFunction(modelType); 209 modelGuessFunc(model, source); 210 psTrace(__func__, 3, "---- %s() end ----\n", __func__); 211 return(model); 212 } 213
Note:
See TracChangeset
for help on using the changeset viewer.
