IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 8, 2006, 5:14:23 PM (20 years ago)
Author:
magnier
Message:

major rework of objects code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/objects/pmModelGroup.c

    r6448 r6556  
    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.2.4.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-03-09 03:14:23 $
     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 ???
    331double hypot(double x, double y);
    432double sqrt (double x);
    533
    6 #include "psEllipse.h"
    734#include "models/pmModel_GAUSS.c"
    835#include "models/pmModel_PGAUSS.c"
     
    159186    return (models[type].name);
    160187}
     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*****************************************************************************/
     199pmModel *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.