IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5059


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

minor changes

Location:
trunk/doc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ipptools/outline.tex

    r4986 r5059  
    351351    - update MasterDetrendRun
    352352
     353Missing 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
    353364\end{verbatim}
    354365\end{document}
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r5037 r5059  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.171 2005-09-13 21:28:03 eugene Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.172 2005-09-16 01:56:17 eugene Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    793793\end{itemize}
    794794
     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.85 2005-07-12 04:18:56 eugene Exp $
     1%%% $Id: psLibADD.tex,v 1.86 2005-09-16 01:56:17 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    324324
    325325\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.
    329341\item Find the bin with the peak value in the range $\pm 2 \sigma$ of
    330342  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
    333350\item The robust mean $\mbox{mean}_r$ is derived directly from the
    334351  fitted Gaussian mean. 
    335352\item The robust standard deviation, $\sigma_r$, is determined by
    336353  subtracting the smoothing scale in quadrature: $\sigma_r^2 =
    337   \sigma^2 - \sigma_s^2$
     354  \sigma_{\rm fit}^2 - \sigma_s^2$
    338355\end{itemize}
    339356
     357To explain the choice of the histogram bin size: a histogram of a
     358Gaussian distribution with bin size $d\sigma$ will have approximately
     359$(2.35 \sigma/d\sigma)$ bins covering the range LQ to UQ.  Thus, the
     360average number of points per bin ($N_{\rm bin}$) in that interval will
     361be $N_{50} / (2.35 \sigma/d\sigma)$.  The value of $d\sigma$ should be
     362no larger than $\sigma$, regardless of the number of points, to avoid
     363too much undersampling.  The value of $d\sigma$ should also be no
     364smaller than $5\sigma$, again regardless of the number of points, to
     365avoid excessive oversample.  Intermediate to those two values, the bin
     366size is choosen to keep about 25 points per bin.  Thus, the bin size
     367($d\sigma$) is set to about:
     368\[
     369d\sigma = 2.35 \sigma (N_{\rm bin}/N_{50}) = (25 \times 2.35) (\sigma/N_{50})
     370\]
     371With the limitation that $\sigma/d\sigma$ should be limited on one end
     372to the value 1, and the other to the value 5.  The easiest way to set
     373this limit is to define dN to be:
     374\[
     375dN = (\sigma / d\sigma) = (N_{50} / N_{\rm bin}) / 2.35 = 0.017 * N_{50}
     376\]
    340377\subsubsection{Histograms}
    341378
  • 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.