IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2005, 3:56:17 PM (21 years ago)
Author:
eugene
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r5056 r5059  
    1 %%% $Id: psLibSDRS.tex,v 1.339 2005-09-15 20:53:06 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.340 2005-09-16 01:56:17 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    34493449    const int numCols;                  ///< Number of columns in image
    34503450    const int numRows;                  ///< Number of rows in image.
    3451     const int col0;                     ///< Column position relative to parent.
    3452     const int row0;                     ///< Row position relative to parent.
     3451    int col0;                           ///< Column position relative to parent.
     3452    int row0;                           ///< Row position relative to parent.
    34533453    union {
    34543454        psS8  **S8;                     ///< Pointers to char data
     
    44884488    psF64 *coeff;                       ///< Coefficients
    44894489    psF64 *coeffErr;                    ///< Error in coefficients
    4490     char *mask;                         ///< Coefficient mask
     4490    psMaskType *mask;                   ///< Coefficient mask
    44914491} psPolynomial1D;
    44924492\end{datatype}
     
    45004500    psF64 **coeff;                      ///< Coefficients
    45014501    psF64 **coeffErr;                   ///< Error in coefficients
    4502     char **mask;                        ///< Coefficients mask
     4502    psMaskType **mask;                  ///< Coefficients mask
    45034503} psPolynomial2D;
    45044504\end{datatype}
     
    46694669the minimization analysis.  The maximum number of iterations is
    46704670specified by \code{maxIter}, while the maximum tolerance for
    4671 convergence is \code{tol}.  Four parameter vectors describe the
    4672 behavior of individual parameters.  The \code{paramMask} vector
     4671convergence is \code{tol}.  The output information carried by the
     4672structure consists of the value of the function at the minimum
     4673(\code{value}), the number of iterations performed (\code{iter}) and
     4674last change in tolerance before returning (\code{lastDelta}).
     4675
     4676\begin{datatype}
     4677typedef struct {
     4678    const int maxIter;                  ///< Maximum number of iterations
     4679    const float tol;                    ///< Tolerance to reach
     4680    float value;                        ///< Value after minimization
     4681    int iter;                           ///< Actual number of iterations performed
     4682    float lastDelta;                    ///< Last change before quitting
     4683} psMinimization;
     4684\end{datatype}
     4685
     4686We define the \code{psMinConstrain} structure to define values which
     4687constrain the allowed parameter values.  The \code{paramMask} vector
    46734688defines the free (0) or frozen (not 0) parameters.  The
    46744689\code{paramMin} defines the minimum allowed value for each parameter,
     
    46804695swing is saturated to the limit (with the correct sign).  Any of these
    46814696parameter vectors may be set to \code{NULL}, in which case the concept
    4682 is ignored in the analysis.  The output information carried by the
    4683 structure consists of the value of the function at the minimum
    4684 (\code{value}), the number of iterations performed (\code{iter}) and
    4685 last change in tolerance before returning (\code{lastDelta}).
     4697is ignored in the analysis.
    46864698
    46874699\begin{datatype}
    46884700typedef struct {
    4689     const int maxIter;                  ///< Maximum number of iterations
    4690     const float tol;                    ///< Tolerance to reach
    4691     float value;                        ///< Value after minimization
    4692     int iter;                           ///< Actual number of iterations performed
    4693     float lastDelta;                    ///< Last change before quitting
    46944701    psVector *paramMask;                ///< valid / invalid parameters
    46954702    psVector *paramMax;                 ///< max allowed parameters
     
    46994706\end{datatype}
    47004707
    4701 The corresponding allocator is:
     4708The corresponding allocators are:
    47024709\begin{prototype}
    47034710psMinimization *psMinimizationAlloc(int maxIter, float tol);
     4711psMinConstrain *psMinConstrainAlloc();
    47044712\end{prototype}
    47054713and the parameter vectors are initially set to \code{NULL}. 
     
    47174725
    47184726Then \code{psMinimizeLMChi2} shall fit the specified function,
    4719 \code{func}, to a set of measurements, \code{x,y,yErr}, using the
     4727\code{func}, to a set of measurements, \code{x,y,yWt}, using the
    47204728Levenberg-Marquardt method:
    47214729
     
    47244732                      psImage *covar,
    47254733                      psVector *params,
     4734                      psMinConstrain *constrain,
    47264735                      const psArray  *x,
    47274736                      const psVector *y,
    4728                       const psVector *yErr,
     4737                      const psVector *yWt,
    47294738                      psMinimizeLMChi2Func func);
    47304739\end{prototype}
     
    47554764The measurement ordinates, \code{x}, shall consist of multiple
    47564765vectors, each of which may be passed to the model \code{func}.  If the
    4757 measurement coordinates, \code{y}, and errors, \code{yErr}, are not of
     4766measurement coordinates, \code{y}, and weights, \code{yWt}, are not of
    47584767the same length as the ordinates array, \code{x}, then the function
    47594768shall generate a warning, and truncate the longest of the
    47604769array/vectors to match the length of the shortest.  The vectors
    4761 contained within the \code{x} array, and the \code{y} and \code{yErr}
    4762 vectors must be of type \code{psF32}.  The \code{yErr} vector may be
     4770contained within the \code{x} array, and the \code{y} and \code{yWt}
     4771vectors must be of type \code{psF64}.  The \code{yWt} vector may be
    47634772\code{NULL}, in which case the errors shall be assumed to be
    47644773identical.
    47654774
    4766 \code{paramMask} must be of type \code{psMaskType}, while \code{params}
    4767 must be of type \code{psF32}.  The \code{func} function must be valid
    4768 only for types \code{psF32}, \code{psF64}.
     4775\code{paramMask} must be of type \code{psMaskType}, while
     4776\code{params} must be of type \code{psF64}.  The \code{func} function
     4777must be valid only for type \code{psF64}.
    47694778
    47704779\begin{prototype}
     
    47854794of the distances.  This vector must be pre-allocated to the
    47864795dimenstions of \code{params}.
    4787 
    4788 %% \subsubsubsection{Pre-defined Functions for LM}
    4789 %%
    4790 %% We define some commonly used functions for use with the LM
    4791 %% minimization, used for the purpose of performing $\chi^2$ fitting:
    4792 %%
    4793 %% \begin{prototype}
    4794 %% psMinimizeLMChi2Func psMinimizeLMChi2Gauss1D;
    4795 %% psMinimizeLMChi2Func psMinimizeLMChi2Gauss2D;
    4796 %% \end{prototype}
    4797 %%
    4798 %% \code{psMinimizeChi2LMGauss1D} shall take as \code{params}, the
    4799 %% normalization, center, and standard deviation of a Gaussian to be fit,
    4800 %% and as \code{x}, a vector containing a single value.  It shall return
    4801 %% the value of the Gaussian at the value, and the derivatives
    4802 %% (\code{deriv}) with respect to each of the parameters.
    4803 %%
    4804 %% \code{psMinimizeChi2LMGauss2D} shall take, as \code{params}, the
    4805 %% normalization, center (two values), standard deviation (two values)
    4806 %% and position angle of a 2-dimensional Gaussian, and as \code{x}, a
    4807 %% vector containing a position, $(x,y)$.  It shall return the value of
    4808 %% the 2-dimensional Gaussian at the specified point, along with the
    4809 %% derivatives with respect to each of the parameters.
    48104796
    48114797\subsubsection{Powell}
     
    48274813bool psMinimizePowell(psMinimization *min,
    48284814                      psVector *params,
    4829                       const psVector *paramMask,
     4815                      const psVector *paramMask,
    48304816                      const psArray *coords,
    48314817                      psMinimizePowellFunc func);
     
    48484834bool psMinimizeChi2Powell(psMinimization *min,
    48494835                          psVector *params,
    4850                           const psVector *paramMask,
     4836                          psMinConstrain *constrain,
    48514837                          const psArray *coords,
    48524838                          const psVector *value,
Note: See TracChangeset for help on using the changeset viewer.