Changeset 5059 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Sep 15, 2005, 3:56:17 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r5056 r5059 1 %%% $Id: psLibSDRS.tex,v 1.3 39 2005-09-15 20:53:06 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.340 2005-09-16 01:56:17 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 3449 3449 const int numCols; ///< Number of columns in image 3450 3450 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. 3453 3453 union { 3454 3454 psS8 **S8; ///< Pointers to char data … … 4488 4488 psF64 *coeff; ///< Coefficients 4489 4489 psF64 *coeffErr; ///< Error in coefficients 4490 char *mask;///< Coefficient mask4490 psMaskType *mask; ///< Coefficient mask 4491 4491 } psPolynomial1D; 4492 4492 \end{datatype} … … 4500 4500 psF64 **coeff; ///< Coefficients 4501 4501 psF64 **coeffErr; ///< Error in coefficients 4502 char **mask;///< Coefficients mask4502 psMaskType **mask; ///< Coefficients mask 4503 4503 } psPolynomial2D; 4504 4504 \end{datatype} … … 4669 4669 the minimization analysis. The maximum number of iterations is 4670 4670 specified 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 4671 convergence is \code{tol}. The output information carried by the 4672 structure consists of the value of the function at the minimum 4673 (\code{value}), the number of iterations performed (\code{iter}) and 4674 last change in tolerance before returning (\code{lastDelta}). 4675 4676 \begin{datatype} 4677 typedef 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 4686 We define the \code{psMinConstrain} structure to define values which 4687 constrain the allowed parameter values. The \code{paramMask} vector 4673 4688 defines the free (0) or frozen (not 0) parameters. The 4674 4689 \code{paramMin} defines the minimum allowed value for each parameter, … … 4680 4695 swing is saturated to the limit (with the correct sign). Any of these 4681 4696 parameter 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}). 4697 is ignored in the analysis. 4686 4698 4687 4699 \begin{datatype} 4688 4700 typedef struct { 4689 const int maxIter; ///< Maximum number of iterations4690 const float tol; ///< Tolerance to reach4691 float value; ///< Value after minimization4692 int iter; ///< Actual number of iterations performed4693 float lastDelta; ///< Last change before quitting4694 4701 psVector *paramMask; ///< valid / invalid parameters 4695 4702 psVector *paramMax; ///< max allowed parameters … … 4699 4706 \end{datatype} 4700 4707 4701 The corresponding allocator is:4708 The corresponding allocators are: 4702 4709 \begin{prototype} 4703 4710 psMinimization *psMinimizationAlloc(int maxIter, float tol); 4711 psMinConstrain *psMinConstrainAlloc(); 4704 4712 \end{prototype} 4705 4713 and the parameter vectors are initially set to \code{NULL}. … … 4717 4725 4718 4726 Then \code{psMinimizeLMChi2} shall fit the specified function, 4719 \code{func}, to a set of measurements, \code{x,y,y Err}, using the4727 \code{func}, to a set of measurements, \code{x,y,yWt}, using the 4720 4728 Levenberg-Marquardt method: 4721 4729 … … 4724 4732 psImage *covar, 4725 4733 psVector *params, 4734 psMinConstrain *constrain, 4726 4735 const psArray *x, 4727 4736 const psVector *y, 4728 const psVector *y Err,4737 const psVector *yWt, 4729 4738 psMinimizeLMChi2Func func); 4730 4739 \end{prototype} … … 4755 4764 The measurement ordinates, \code{x}, shall consist of multiple 4756 4765 vectors, each of which may be passed to the model \code{func}. If the 4757 measurement coordinates, \code{y}, and errors, \code{yErr}, are not of4766 measurement coordinates, \code{y}, and weights, \code{yWt}, are not of 4758 4767 the same length as the ordinates array, \code{x}, then the function 4759 4768 shall generate a warning, and truncate the longest of the 4760 4769 array/vectors to match the length of the shortest. The vectors 4761 contained within the \code{x} array, and the \code{y} and \code{y Err}4762 vectors must be of type \code{psF 32}. The \code{yErr} vector may be4770 contained within the \code{x} array, and the \code{y} and \code{yWt} 4771 vectors must be of type \code{psF64}. The \code{yWt} vector may be 4763 4772 \code{NULL}, in which case the errors shall be assumed to be 4764 4773 identical. 4765 4774 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 4777 must be valid only for type \code{psF64}. 4769 4778 4770 4779 \begin{prototype} … … 4785 4794 of the distances. This vector must be pre-allocated to the 4786 4795 dimenstions of \code{params}. 4787 4788 %% \subsubsubsection{Pre-defined Functions for LM}4789 %%4790 %% We define some commonly used functions for use with the LM4791 %% 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}, the4799 %% normalization, center, and standard deviation of a Gaussian to be fit,4800 %% and as \code{x}, a vector containing a single value. It shall return4801 %% the value of the Gaussian at the value, and the derivatives4802 %% (\code{deriv}) with respect to each of the parameters.4803 %%4804 %% \code{psMinimizeChi2LMGauss2D} shall take, as \code{params}, the4805 %% normalization, center (two values), standard deviation (two values)4806 %% and position angle of a 2-dimensional Gaussian, and as \code{x}, a4807 %% vector containing a position, $(x,y)$. It shall return the value of4808 %% the 2-dimensional Gaussian at the specified point, along with the4809 %% derivatives with respect to each of the parameters.4810 4796 4811 4797 \subsubsection{Powell} … … 4827 4813 bool psMinimizePowell(psMinimization *min, 4828 4814 psVector *params, 4829 const psVector *paramMask,4815 const psVector *paramMask, 4830 4816 const psArray *coords, 4831 4817 psMinimizePowellFunc func); … … 4848 4834 bool psMinimizeChi2Powell(psMinimization *min, 4849 4835 psVector *params, 4850 const psVector *paramMask,4836 psMinConstrain *constrain, 4851 4837 const psArray *coords, 4852 4838 const psVector *value,
Note:
See TracChangeset
for help on using the changeset viewer.
