pmSourceFitModel.h

Go to the documentation of this file.
00001 /* @file  pmSourceFitModel.h
00002  *
00003  * @author EAM, IfA; GLG, MHPCC
00004  *
00005  * @version $Revision: 1.5 $ $Name:  $
00006  * @date $Date: 2007/01/24 02:54:15 $
00007  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
00008  */
00009 
00010 # ifndef PM_SOURCE_FIT_MODEL_H
00011 # define PM_SOURCE_FIT_MODEL_H
00012 
00013 /// @addtogroup Objects Object Detection / Analysis Functions
00014 /// @{
00015 
00016 typedef enum {
00017     PM_SOURCE_FIT_NORM,
00018     PM_SOURCE_FIT_PSF,
00019     PM_SOURCE_FIT_EXT,
00020     PM_SOURCE_FIT_PSF_AND_SKY,
00021     PM_SOURCE_FIT_EXT_AND_SKY
00022 } pmSourceFitMode;
00023 
00024 bool pmSourceFitModelInit(
00025     float nIter,   ///< max number of allowed iterations
00026     float tol,      ///< convergence criterion
00027     float weight,      ///< use this weight for constant-weight fits
00028     bool poissonErrors   // use poisson errors for fits?
00029 );
00030 
00031 /** pmSourceFitModel()
00032  *
00033  * Fit the requested model to the specified source. The starting guess for the model is given
00034  * by the input source.model parameter values. The pixels of interest are specified by the
00035  * source.pixels and source.mask entries. This function calls psMinimizeLMChi2() on the image
00036  * data. The function returns TRUE on success or FALSE on failure.
00037  *
00038  */
00039 bool pmSourceFitModel(
00040     pmSource *source,   ///< The input pmSource
00041     pmModel *model,   ///< model to be fitted
00042     pmSourceFitMode mode  ///< define parameters to be fitted
00043 );
00044 
00045 
00046 // initialize data for a group of object models
00047 bool pmSourceFitSetInit (pmModelType type);
00048 
00049 // clear data for a group of object models
00050 void pmSourceFitSetClear (void);
00051 
00052 // function used to set limits for a group of models
00053 bool pmSourceFitSet_CheckLimits (psMinConstraintMode mode, int nParam, float *params, float *betas);
00054 
00055 // function used to fit a group of object models
00056 psF32 pmSourceFitSet_Function(psVector *deriv,
00057                               const psVector *params,
00058                               const psVector *x);
00059 
00060 /** pmSourceFitSet()
00061  *
00062  * Fit the requested model to the specified source. The starting guess for the model is given
00063  * by the input source.model parameter values. The pixels of interest are specified by the
00064  * source.pixels and source.mask entries. This function calls psMinimizeLMChi2() on the image
00065  * data. The function returns TRUE on success or FALSE on failure.
00066  *
00067  */
00068 bool pmSourceFitSet(
00069     pmSource *source,   ///< The input pmSource
00070     psArray *modelSet,   ///< model to be fitted
00071     pmSourceFitMode mode  ///< define parameters to be fitted
00072 );
00073 
00074 /// @}
00075 # endif /* PM_SOURCE_FIT_MODEL_H */

Generated on Fri Feb 2 22:35:28 2007 for Pan-STARRS Module Library by  doxygen 1.5.1