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/pmSourceFitModel.c

    r6537 r6556  
    1 /** @file  pmObjects.c
     1/** @file  pmSourceFitModel.c
    22 *
    3  *  This file will ...
     3 *  fit single source models to image pixels
    44 *
     5 *  @author EAM, IfA
    56 *  @author GLG, MHPCC
    6  *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.1.2.1 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-03-07 06:33:35 $
     8 *  @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-03-09 03:14:23 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717#include <string.h>
    1818#include "pslib.h"
    19 #include "pmObjects.h"
     19#include "pmHDU.h"
     20#include "pmFPA.h"
     21#include "pmPeaks.h"
     22#include "pmMoments.h"
     23#include "pmGrowthCurve.h"
     24#include "pmModel.h"
     25#include "pmPSF.h"
     26#include "pmSource.h"
    2027#include "pmModelGroup.h"
     28#include "pmSourceFitModel.h"
    2129
    2230// save a static values so they may be set externally
     
    169177    }
    170178
    171     source->mode |= PM_SOURCE_FITTED;
     179    source->mode |= PM_SOURCE_MODE_FITTED;
    172180
    173181    psFree(x);
     
    186194    return(rc);
    187195}
    188 
    189 pmModel *pmSourceSelectModel (pmSource *source)
    190 {
    191     switch (source->type) {
    192     case PM_SOURCE_STAR:
    193         return source->modelPSF;
    194 
    195     case PM_SOURCE_EXTENDED:
    196         return source->modelEXT;
    197 
    198     default:
    199         return NULL;
    200     }
    201     return NULL;
    202 }
    203 
    204 /******************************************************************************
    205     pmSourceModelGuess(source, model): This function allocates a new
    206     pmModel structure based on the given modelType specified in the argument list. 
    207     The corresponding pmModelGuess function is returned, and used to
    208     supply the values of the params array in the pmModel structure. 
    209      
    210     XXX: Many parameters are based on the src->moments structure, which is in
    211     image, not subImage coords.  Therefore, the calls to the model evaluation
    212     functions will be in image, not subImage coords.  Remember this.
    213 *****************************************************************************/
    214 pmModel *pmSourceModelGuess(pmSource *source,
    215                             pmModelType modelType)
    216 {
    217     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
    218     PS_ASSERT_PTR_NON_NULL(source->moments, false);
    219     PS_ASSERT_PTR_NON_NULL(source->peak, false);
    220 
    221     pmModel *model = pmModelAlloc(modelType);
    222 
    223     pmModelGuessFunc modelGuessFunc = pmModelGuessFunc_GetFunction(modelType);
    224     modelGuessFunc(model, source);
    225     psTrace(__func__, 3, "---- %s() end ----\n", __func__);
    226     return(model);
    227 }
    228 
Note: See TracChangeset for help on using the changeset viewer.