Changeset 5059
- Timestamp:
- Sep 15, 2005, 3:56:17 PM (21 years ago)
- Location:
- trunk/doc
- Files:
-
- 4 edited
-
ipptools/outline.tex (modified) (1 diff)
-
pslib/ChangeLogSDRS.tex (modified) (2 diffs)
-
pslib/psLibADD.tex (modified) (2 diffs)
-
pslib/psLibSDRS.tex (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/ipptools/outline.tex
r4986 r5059 351 351 - update MasterDetrendRun 352 352 353 Missing Modules 354 355 load from DVO 356 load PS astrom table 357 load guide-star table 358 imastro 359 mosastro 360 read WCS / write WCS 361 detrend-image selection 362 measure fringe pattern 363 353 364 \end{verbatim} 354 365 \end{document} -
trunk/doc/pslib/ChangeLogSDRS.tex
r5037 r5059 1 %%% $Id: ChangeLogSDRS.tex,v 1.17 1 2005-09-13 21:28:03eugene Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.172 2005-09-16 01:56:17 eugene Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 793 793 \end{itemize} 794 794 795 \subsection{Changes from Revision 16 (13 Sept 2005) to present} 796 797 \begin{itemize} 798 \item moved param constraints to \code{psMinConstrain} 799 \item changed type requirement on psMinimize functions to just F64 800 \item changed psMinimize input arguments to accept weight not sigma 801 \item changed psPolynomial masks from char to psU8. 802 \item changed \code{psImage.col0,row0} changed from const. 803 804 \end{itemize} 805 -
trunk/doc/pslib/psLibADD.tex
r4537 r5059 1 %%% $Id: psLibADD.tex,v 1.8 5 2005-07-12 04:18:56eugene Exp $1 %%% $Id: psLibADD.tex,v 1.86 2005-09-16 01:56:17 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 324 324 325 325 \begin{itemize} 326 \item Perform the Robust Histogram Statistics algorithm above 327 \item Smooth the resulting histogram with a Gaussian with $\sigma_s$ = 328 1 bin. 326 \item Perform the Robust Histogram Statistics algorithm above, 327 yielding an estimated standard deviation, $\sigma$. 328 329 \item Generate a new histogram for the data sample setting a bin size, 330 $d\sigma$, based on the estimated standard deviation and the number 331 of data points in the inner 50 percentile ($N_{\rm 50}$) as follows: 332 333 \begin{itemize} 334 \item let $dN = (\sigma / d\sigma) = 0.017 N_{50}$ 335 \item limit $dN$ to the range 1 to 5. 336 \item set the bin size $d\sigma = \sigma / dN$ 337 \end{itemize} 338 339 \item Smooth the resulting histogram with a Gaussian with $\sigma_x$ = 340 1 bin in this new histogram. 329 341 \item Find the bin with the peak value in the range $\pm 2 \sigma$ of 330 342 the robust histogram median. 331 \item Fit a Gaussian to the bins in the range $\pm 2 \sigma$ of 332 the robust histogram median. 343 344 \item Fit a Gaussian to the bins in the range $\pm 20 \sigma$ of the 345 robust histogram median. Limit the fit range to the data range, if 346 the latter is less then $\pm 20 \sigma$. If the data range is small 347 compared to the estimated $\sigma$, fit at least 4 bins of the 348 hisgram centered on the robust histogram median. 349 333 350 \item The robust mean $\mbox{mean}_r$ is derived directly from the 334 351 fitted Gaussian mean. 335 352 \item The robust standard deviation, $\sigma_r$, is determined by 336 353 subtracting the smoothing scale in quadrature: $\sigma_r^2 = 337 \sigma ^2 - \sigma_s^2$354 \sigma_{\rm fit}^2 - \sigma_s^2$ 338 355 \end{itemize} 339 356 357 To explain the choice of the histogram bin size: a histogram of a 358 Gaussian distribution with bin size $d\sigma$ will have approximately 359 $(2.35 \sigma/d\sigma)$ bins covering the range LQ to UQ. Thus, the 360 average number of points per bin ($N_{\rm bin}$) in that interval will 361 be $N_{50} / (2.35 \sigma/d\sigma)$. The value of $d\sigma$ should be 362 no larger than $\sigma$, regardless of the number of points, to avoid 363 too much undersampling. The value of $d\sigma$ should also be no 364 smaller than $5\sigma$, again regardless of the number of points, to 365 avoid excessive oversample. Intermediate to those two values, the bin 366 size is choosen to keep about 25 points per bin. Thus, the bin size 367 ($d\sigma$) is set to about: 368 \[ 369 d\sigma = 2.35 \sigma (N_{\rm bin}/N_{50}) = (25 \times 2.35) (\sigma/N_{50}) 370 \] 371 With the limitation that $\sigma/d\sigma$ should be limited on one end 372 to the value 1, and the other to the value 5. The easiest way to set 373 this limit is to define dN to be: 374 \[ 375 dN = (\sigma / d\sigma) = (N_{50} / N_{\rm bin}) / 2.35 = 0.017 * N_{50} 376 \] 340 377 \subsubsection{Histograms} 341 378 -
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.
