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