IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7388


Ignore:
Timestamp:
Jun 6, 2006, 6:06:37 PM (20 years ago)
Author:
Paul Price
Message:

Adding functions from psModule's additional functions to be pushed
into psLib. These functions have been implemented, and installed in
pslib.

File:
1 edited

Legend:

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

    r7298 r7388  
    1 %%% $Id: psLibSDRS.tex,v 1.397 2006-06-02 21:17:04 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.398 2006-06-07 04:06:37 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    936936// structure to carry a dynamic string
    937937typedef struct {
    938     int NLINE;                  // allocated length
    939     int Nline;                  // current lenght
     938    long NLINE;                 // allocated length
     939    long Nline;                 // current lenght
    940940    char *line;                 // character string data
    941941} psLine;
     
    944944The following function allocates a line object of length Nline.
    945945\begin{prototype}
    946 psLine *psLineAlloc (int Nline);
     946psLine *psLineAlloc(long Nline);
    947947\end{prototype}
    948948
     
    951951If the function is passed \code{NULL}, the function returns \code{false}.
    952952\begin{prototype}
    953 bool psLineInit (psLine *line);
     953bool psLineInit(psLine *line);
    954954\end{prototype}
    955955
     
    958958length.
    959959\begin{prototype}
    960 bool psLineAdd (psLine *line, char *format, ...);
     960bool psLineAdd(psLine *line, const char *format, ...);
    961961\end{prototype}
    962962
     
    29222922
    29232923\begin{prototype}
     2924psBool psMetadataItemParseBool(const psMetadataItem *item);
    29242925psF32 psMetadataItemParseF32(psMetadataItem *item);
    29252926psF64 psMetadataItemParseF64(psMetadataItem *item);
     2927psS8  psMetadataItemParseS8(const psMetadataItem *item);
     2928psS16 psMetadataItemParseS16(const psMetadataItem *item);
    29262929psS32 psMetadataItemParseS32(psMetadataItem *item);
     2930psU8  psMetadataItemParseU8(const psMetadataItem *item);
     2931psU16 psMetadataItemParseU16(const psMetadataItem *item);
     2932psU32 psMetadataItemParseU32(const psMetadataItem *item);
    29272933psString psMetadataItemParseString(psMetadataItem *item);
    29282934\end{prototype}
    2929 
    29302935
    29312936Items may be retrieved from the metadata by their entry position.  The
     
    30023007\code{NULL}.
    30033008
    3004 The following functio copies a single metadata item from one
    3005 psMetadata to another:
    3006 \begin{prototype}
    3007 bool psMetadataItemTransfer (psMetadata *out, // Destination: copy is placed here
    3008                              psMetadata *in,  // Source: item comes from here
    3009                              char *key        // key to identify the metadata item
    3010     );
     3009The following function copies a single metadata item, specified by the
     3010\code{key} from the \code{in} metadata to the \code{out} metadata:
     3011\begin{prototype}
     3012bool psMetadataItemTransfer(psMetadata *out, const psMetadata *in, const char *key);
     3013\end{prototype}
     3014
     3015\code{psMetadataItemCompare} shall compare two metadata items, returning
     3016\code{true} if the names, and values are the same.
     3017\begin{prototype}
     3018bool psMetadataItemCompare(const psMetadataItem *compare,
     3019                           const psMetadataItem *template);
    30113020\end{prototype}
    30123021
     
    36023611steps of \code{delta}.  The upper-end value is {\em exclusive}; the
    36033612sequence is equivalent to \code{for (x = lower; x < upper; x +=
    3604   delta)}. 
     3613  delta)}.
    36053614
    36063615%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    38153824\code{regions}
    38163825\begin{prototype}
    3817 bool psRegionIsBad(psRegion region);
    3818 bool psRegionIsNaN (psRegion region);
     3826bool psRegionIsNaN(psRegion region);
    38193827\end{prototype}
    38203828
     
    45094517}
    45104518\end{verbatim}
     4519
     4520\subsection{Vector Operations}
     4521
     4522\begin{prototype}
     4523psVector *psVectorSmooth(psVector *output, const psVector *input,
     4524                         double sigma, double Nsigma);
     4525\end{prototype}
     4526
     4527\code{psVectorSmooth} shall apply Gaussian smoothing to the
     4528\code{input} vector, with the result in the \code{output} vector
     4529(which shall be allocated and returned if \code{NULL}).  The Gaussian
     4530shall be specified by a standard deviation, \code{sigma}, and extend
     4531\code{Nsigma} standard deviations.
    45114532
    45124533
     
    52425263\code{psF32}, \code{psF64}.
    52435264
     5265\subsubsection{Additional polynomial functions}
     5266
     5267\tbd{EAM to explain in more detail}
     5268
     5269\begin{prototype}
     5270psPolynomial4D *psVectorChiClipFitPolynomial4D(
     5271    psPolynomial4D *poly,
     5272    psStats *stats,
     5273    const psVector *mask,
     5274    psMaskType maskValue,
     5275    const psVector *f,
     5276    const psVector *fErr,
     5277    const psVector *x,
     5278    const psVector *y,
     5279    const psVector *z,
     5280    const psVector *t);
     5281\end{prototype}
     5282
     5283\code{psVectorChiClipFitPolynomial4D} shall perform a vector clip-fit
     5284of a \code{poly}nomial to the input data (\code{f,fErr,x,y,z,t}),
     5285based on significance of deviations
     5286
     5287\begin{prototype}
     5288psPolynomial2D *psImageBicubeFit (psImage *image, int x, int y);
     5289\end{prototype}
     5290
     5291\code{psImageBicubeFit} shall fit a 2D second order polynomial to the
     52929 pixels centered on (\code{x},\code{y}).
     5293
     5294\begin{prototype}
     5295psPlane psImageBicubeMin (psPolynomial2D *poly);
     5296\end{prototype}
     5297
     5298\code{psImageBicubeMin} shall detemine the minimum of the special 2D
     5299second order polynomial.
     5300
    52445301%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    52455302
     
    53125369identical to a 180\degree\ rotation.
    53135370\begin{prototype}
    5314 psImage *psImageFlip(psImage *image,  // Image to flip
    5315                      bool xFlip,
    5316                      bool yFlip);
     5371psImage *psImageFlip(psImage *output, const psImage *image,
     5372                     bool xFlip, bool yFlip);
    53175373\end{prototype}
    53185374
     
    55735629\code{psF64}.
    55745630
     5631\tbd{Description required for psImageUnbin}
     5632\begin{prototype}
     5633psImage *psImageUnbin(psImage *out, psImage *in, int DX, int DY, int dx, int dy);
     5634\end{prototype}
     5635\tbd{Can ``out'' be NULL?  I'm not sure this is the best way to specify this function for a library.}
     5636
    55755637
    55765638\subsubsection{Image Statistical Functions}
     
    56425704setup macro which pre-calculates certain values which would be reused
    56435705in a loop.
     5706
     5707\begin{prototype}
     5708psStats *psImageBackground(const psImage *image, // Image for which to get the background
     5709                           const psImage *mask, // Mask image
     5710                           psMaskType maskValue, // Mask pixels which this mask value
     5711                           double fmin, // Fraction to return in the lower quartile field (0.25 for LQ)
     5712                           double fmax, // Fraction to return in the upper quartile field (0.75 for LQ)
     5713                           long nMax,   // Maximum number of pixels to subsample
     5714                           psRandom *rng // Random number generator (for pixel selection)
     5715    );
     5716\end{prototype}
     5717\code{psImageBackground} shall measure the median background level for
     5718the input \code{image} from a random subsample of pixels, with the
     5719median in the \code{robustMedian} of the returned \code{psStats}.  If
     5720\code{mask} is non-\code{NULL}, then pixels with a corresponding mask
     5721value with the \code{maskValue} set shall be excluded from the
     5722calculation.  A maximum of \code{nMax} pixels shall be selected
     5723randomly from the image, using the provided random number generator,
     5724\code{rng}.  The function shall also set the values for which the
     5725cumulative fractions are \code{fmin} and \code{fmax} in the
     5726\code{robustLQ} and \code{robustUQ} fields of the returned
     5727\code{psStats}, respectively.
     5728
    56445729
    56455730\subsubsection{Image Pixel Manipulations}
     
    57395824\begin{datatype}
    57405825typedef struct {
    5741     psString name;
    57425826    psVector *red;
    57435827    psVector *green;
     
    64146498
    64156499\begin{prototype}
    6416 psEllipseAxes psEllipseMomentsToAxes (psEllipseMoments moments);
    6417 psEllipseShape psEllipseAxesToShape (psEllipseAxes axes);
    6418 psEllipseAxes psEllipseShapeToAxes (psEllipseShape shape);
     6500psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments);
     6501psEllipseShape psEllipseAxesToShape(psEllipseAxes axes);
     6502psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape);
    64196503\end{prototype}
    64206504
Note: See TracChangeset for help on using the changeset viewer.