IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 15, 2005, 4:50:59 PM (21 years ago)
Author:
drobbin
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psMinimize.h

    r4243 r4282  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-14 02:54:12 $
     10 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-16 02:50:59 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3737#include "psConstants.h"
    3838
    39 /** A psMinimization data structure.
     39/** A data structure for minimization routines.
    4040 * 
    4141 *  Contains numerical analysis parameters/values
     
    8282/** Derive a one-dimensional spline fit.
    8383 *   
    84  *  Given a psSpline1D data structure and a set of x,y vectors, this routine generates
    85  *  the linear splines which satisfy those data points.
     84 *  Given a psSpline1D data structure and a set of x,y vectors, this routine
     85 *  generates the linear splines which satisfy those data points.
    8686 * 
    8787 *  @return psSpline1D*:  the calculated one-dimensional splines
     
    9494);
    9595
    96 /** Defines a Levenberg-Marquardt function of a collection of parameters evaluated at a given position.
    97  * 
    98  *  @return psF64:   a single floating-point value which is the value of the function given the parameters
    99  *      and coordinate vectors, along with the derivatives of the function with respect to each of the parameters.
     96/** Specifies the format of a user-defined function that the general Levenberg-
     97 *  Marquardt minimizer routine will accept.
     98 * 
     99 *  @return psF64:   the single float value of the function given the parameters,
     100 *       positions, and derivatives.
    100101 */
    101102typedef
     
    106107);
    107108
    108 /** Fits a specified function based on the Levenberg-Marquardt method.
    109  * 
    110  *  @return psBool:   True unless an error occurred.
     109/** Minimizes a specified function based on the Levenberg-Marquardt method.
     110 * 
     111 *  @return psBool:   True if successful.
    111112 */
    112113psBool psMinimizeLMChi2(
    113     psMinimization *min,               ///<
    114     psImage *covar,                    ///<
    115     psVector *params,                  ///<
    116     const psVector *paramMask,         ///<
    117     const psArray *x,                  ///<
    118     const psVector *y,                 ///<
    119     const psVector *yErr,              ///<
    120     psMinimizeLMChi2Func func          ///<
    121 );
    122 
    123 /**
    124  * 
    125  *
    126  *  @return psBool:   True if
     114    psMinimization *min,               ///< Minimization specification
     115    psImage *covar,                    ///< Covariance matrix
     116    psVector *params,                  ///< "Best Guess" for the parameters that minimize func
     117    const psVector *paramMask,         ///< Parameters to be held fixed by the minimizer
     118    const psArray *x,                  ///< Measurement ordinates of multiple vectors
     119    const psVector *y,                 ///< Measurement coordinates
     120    const psVector *yErr,              ///< Errors in the measurement coordinates
     121    psMinimizeLMChi2Func func          ///< Specified function
     122);
     123
     124/** Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params
     125 * 
     126 *  @return psBool:   True if successful.
    127127 */
    128128psBool p_psMinLM_GuessABP(
    129     psImage  *Alpha,                   ///<
    130     psVector *Beta,                    ///<
    131     psVector *Params,                  ///<
    132     psImage  *alpha,                   ///<
    133     psVector *beta,                    ///<
    134     psVector *params,                  ///<
    135     psF64 lambda                       ///<
    136 );
    137 
    138 /**
    139  * 
    140  *
    141  *  @return psF64:   
     129    psImage  *Alpha,                   ///< New Alpha guess
     130    psVector *Beta,                    ///< New Beta guess
     131    psVector *Params,                  ///< New Params guess
     132    psImage  *alpha,                   ///< Old Alpha guess
     133    psVector *beta,                    ///< Old Beta guess
     134    psVector *params,                  ///< Old Params guess
     135    psF64 lambda                       ///< Factor used in update                    //XXX Got Better Desc?
     136);
     137
     138/** Function used to set parameters for generating "best guess" in minimizing Chi-Squared value.
     139 * 
     140 *  @return psF64:    Chi-squared value for new guess
    142141 */
    143142psF64 p_psMinLM_SetABX (
    144     psImage  *alpha,                   ///<
    145     psVector *beta,                    ///<
    146     psVector *params,                  ///<
    147     const psArray  *x,                 ///<
    148     const psVector *y,                 ///<
    149     const psVector *dy,                ///<
    150     psMinimizeLMChi2Func func);        ///<
    151 
    152 /**
    153  * 
    154  * 
    155  *  @return psF32:   
     143    psImage  *alpha,                   ///< alpha guess
     144    psVector *beta,                    ///< beta guess
     145    psVector *params,                  ///< params guess
     146    const psArray  *x,                 ///< Measurement ordinates
     147    const psVector *y,                 ///< Measurement coordinates
     148    const psVector *dy,                ///< Weights calculated from y-errors
     149    psMinimizeLMChi2Func func);        ///< Specified function
     150
     151/** Specifies the format of a user-defined function that the general Powell
     152 *  minimizer routine will accept.
     153 * 
     154 *  @return psF32:   the single float value of the function given the parameters
     155 *      and coordinate vectors.
    156156*/
    157157typedef
    158158psF32 (*psMinimizePowellFunc)(
    159     const psVector *params,            ///<
    160     const psArray *coords              ///<
    161 );
    162 
    163 
    164 /**
    165  * 
     159    const psVector *params,            ///< Parameters used to evaluate the function
     160    const psArray *coords              ///< Coordinates at which to evaluate
     161);
     162
     163/** Minimizes a specified function based on the Powell method.
     164 * 
     165 *  @return psBool:   True if successful.
     166 */
     167psBool psMinimizePowell(
     168    psMinimization *min,               ///< Minimization specification
     169    psVector *params,                  ///< "Best guess" for parameters that minimize func
     170    const psVector *paramMask,         ///< Parameters to be held fixed by minimizer
     171    const psArray *coords,             ///< Measurement coordinates
     172    psMinimizePowellFunc func          ///< Specified function
     173);
     174
     175/** Calculates the one-dimensional Gaussian in a format acceptable to the Levenberg-
     176 *  Marquardt minimizer routine.
    166177 *
    167  *  @return psBool:   True if
    168  */
    169 psBool psMinimizePowell(
    170     psMinimization *min,               ///<
    171     psVector *params,                  ///<
    172     const psVector *paramMask,         ///<
    173     const psArray *coords,             ///<
    174     psMinimizePowellFunc func          ///<
    175 );
    176 
    177 /**
    178  * 
    179  *
    180  *  @return psVector*:   
     178 *  @return psVector*:    Calculated values
    181179 */
    182180psVector *psMinimizeLMChi2Gauss1D(
    183     psImage *deriv,                    ///<
    184     const psVector *params,            ///<
    185     const psArray *coords              ///<
    186 );
    187 
    188 /**
    189  * 
    190  *
    191  *  @return psVector*:   
     181    psImage *deriv,                    ///< Derivative Matrix
     182    const psVector *params,            ///< Parameters used in evaluation
     183    const psArray *coords              ///< Measurement coordinates
     184);
     185
     186/** Calculates the one-dimensional Gaussian in a format acceptable to the Powell
     187 *  chi-squared minimizer routine.
     188 *  
     189 *  @return psVector*:   Calculated values
    192190 */
    193191psVector *psMinimizePowellChi2Gauss1D(
    194     const psVector *params,            ///<
    195     const psArray *coords              ///<
    196 );
    197 
    198 /**
    199  * 
    200  * 
    201  * 
     192    const psVector *params,            ///< Parameters used in evaluation
     193    const psArray *coords              ///< Measurement coordinates
     194);
     195
     196/** Specifies the format of a user-defined function that the general Powell chi-
     197 *  squared minimizer routine will accept.
     198 * 
     199 *  @return psVector*:    Calculated values given the parameters and coordinates.
    202200*/
    203201typedef
    204202psVector *(*psMinimizeChi2PowellFunc)(
    205     const psVector *params,            ///<
    206     const psArray *coords              ///<
    207 );
    208 
    209 
    210 /**
    211  * 
     203    const psVector *params,            ///< Parameters used to evaluate the function
     204    const psArray *coords              ///< Coordinates at which to evaluate
     205);
     206
     207/** Minimizes a specified function based on the Powell chi-squared method.
    212208 *
    213  *  @return psBool:   True if
     209 *  @return psBool:   True is successful.
    214210 */
    215211psBool psMinimizeChi2Powell(
    216     psMinimization *min,               ///<
    217     psVector *params,                  ///<
    218     const psVector *paramMask,         ///<
    219     const psArray *coords,             ///<
    220     const psVector *value,             ///<
    221     const psVector *error,             ///<
    222     psMinimizeChi2PowellFunc func      ///<
    223 );
    224 
    225 /**
    226  * 
    227  *
    228  *  @return bool:   True if
     212    psMinimization *min,               ///< Minimization specification
     213    psVector *params,                  ///< "Best guess" for parameters that minimize func
     214    const psVector *paramMask,         ///< Parameters to be held fixed by minimizer
     215    const psArray *coords,             ///< Measurement coordinates
     216    const psVector *value,             ///< Measured values at the coordinates
     217    const psVector *error,             ///< Errors in the measure values (or NULL)
     218    psMinimizeChi2PowellFunc func      ///< Specified function
     219);
     220
     221/** Gauss-Jordan numerical solver.
     222 * 
     223 *  @return bool:   True if successful.
    229224 */
    230225bool psGaussJordan(
    231     psImage *a,                        ///<
    232     psVector *b                        ///<
     226    psImage *a,                        ///< Matrix to be solved
     227    psVector *b                        ///< Vector of values
    233228);
    234229
Note: See TracChangeset for help on using the changeset viewer.