Changeset 7388
- Timestamp:
- Jun 6, 2006, 6:06:37 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r7298 r7388 1 %%% $Id: psLibSDRS.tex,v 1.39 7 2006-06-02 21:17:04price Exp $1 %%% $Id: psLibSDRS.tex,v 1.398 2006-06-07 04:06:37 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 936 936 // structure to carry a dynamic string 937 937 typedef struct { 938 intNLINE; // allocated length939 intNline; // current lenght938 long NLINE; // allocated length 939 long Nline; // current lenght 940 940 char *line; // character string data 941 941 } psLine; … … 944 944 The following function allocates a line object of length Nline. 945 945 \begin{prototype} 946 psLine *psLineAlloc (intNline);946 psLine *psLineAlloc(long Nline); 947 947 \end{prototype} 948 948 … … 951 951 If the function is passed \code{NULL}, the function returns \code{false}. 952 952 \begin{prototype} 953 bool psLineInit (psLine *line);953 bool psLineInit(psLine *line); 954 954 \end{prototype} 955 955 … … 958 958 length. 959 959 \begin{prototype} 960 bool psLineAdd (psLine *line,char *format, ...);960 bool psLineAdd(psLine *line, const char *format, ...); 961 961 \end{prototype} 962 962 … … 2922 2922 2923 2923 \begin{prototype} 2924 psBool psMetadataItemParseBool(const psMetadataItem *item); 2924 2925 psF32 psMetadataItemParseF32(psMetadataItem *item); 2925 2926 psF64 psMetadataItemParseF64(psMetadataItem *item); 2927 psS8 psMetadataItemParseS8(const psMetadataItem *item); 2928 psS16 psMetadataItemParseS16(const psMetadataItem *item); 2926 2929 psS32 psMetadataItemParseS32(psMetadataItem *item); 2930 psU8 psMetadataItemParseU8(const psMetadataItem *item); 2931 psU16 psMetadataItemParseU16(const psMetadataItem *item); 2932 psU32 psMetadataItemParseU32(const psMetadataItem *item); 2927 2933 psString psMetadataItemParseString(psMetadataItem *item); 2928 2934 \end{prototype} 2929 2930 2935 2931 2936 Items may be retrieved from the metadata by their entry position. The … … 3002 3007 \code{NULL}. 3003 3008 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 ); 3009 The 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} 3012 bool 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} 3018 bool psMetadataItemCompare(const psMetadataItem *compare, 3019 const psMetadataItem *template); 3011 3020 \end{prototype} 3012 3021 … … 3602 3611 steps of \code{delta}. The upper-end value is {\em exclusive}; the 3603 3612 sequence is equivalent to \code{for (x = lower; x < upper; x += 3604 delta)}. 3613 delta)}. 3605 3614 3606 3615 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 3815 3824 \code{regions} 3816 3825 \begin{prototype} 3817 bool psRegionIsBad(psRegion region); 3818 bool psRegionIsNaN (psRegion region); 3826 bool psRegionIsNaN(psRegion region); 3819 3827 \end{prototype} 3820 3828 … … 4509 4517 } 4510 4518 \end{verbatim} 4519 4520 \subsection{Vector Operations} 4521 4522 \begin{prototype} 4523 psVector *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 4530 shall be specified by a standard deviation, \code{sigma}, and extend 4531 \code{Nsigma} standard deviations. 4511 4532 4512 4533 … … 5242 5263 \code{psF32}, \code{psF64}. 5243 5264 5265 \subsubsection{Additional polynomial functions} 5266 5267 \tbd{EAM to explain in more detail} 5268 5269 \begin{prototype} 5270 psPolynomial4D *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 5284 of a \code{poly}nomial to the input data (\code{f,fErr,x,y,z,t}), 5285 based on significance of deviations 5286 5287 \begin{prototype} 5288 psPolynomial2D *psImageBicubeFit (psImage *image, int x, int y); 5289 \end{prototype} 5290 5291 \code{psImageBicubeFit} shall fit a 2D second order polynomial to the 5292 9 pixels centered on (\code{x},\code{y}). 5293 5294 \begin{prototype} 5295 psPlane psImageBicubeMin (psPolynomial2D *poly); 5296 \end{prototype} 5297 5298 \code{psImageBicubeMin} shall detemine the minimum of the special 2D 5299 second order polynomial. 5300 5244 5301 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5245 5302 … … 5312 5369 identical to a 180\degree\ rotation. 5313 5370 \begin{prototype} 5314 psImage *psImageFlip(psImage *image, // Image to flip 5315 bool xFlip, 5316 bool yFlip); 5371 psImage *psImageFlip(psImage *output, const psImage *image, 5372 bool xFlip, bool yFlip); 5317 5373 \end{prototype} 5318 5374 … … 5573 5629 \code{psF64}. 5574 5630 5631 \tbd{Description required for psImageUnbin} 5632 \begin{prototype} 5633 psImage *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 5575 5637 5576 5638 \subsubsection{Image Statistical Functions} … … 5642 5704 setup macro which pre-calculates certain values which would be reused 5643 5705 in a loop. 5706 5707 \begin{prototype} 5708 psStats *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 5718 the input \code{image} from a random subsample of pixels, with the 5719 median in the \code{robustMedian} of the returned \code{psStats}. If 5720 \code{mask} is non-\code{NULL}, then pixels with a corresponding mask 5721 value with the \code{maskValue} set shall be excluded from the 5722 calculation. A maximum of \code{nMax} pixels shall be selected 5723 randomly from the image, using the provided random number generator, 5724 \code{rng}. The function shall also set the values for which the 5725 cumulative fractions are \code{fmin} and \code{fmax} in the 5726 \code{robustLQ} and \code{robustUQ} fields of the returned 5727 \code{psStats}, respectively. 5728 5644 5729 5645 5730 \subsubsection{Image Pixel Manipulations} … … 5739 5824 \begin{datatype} 5740 5825 typedef struct { 5741 psString name;5742 5826 psVector *red; 5743 5827 psVector *green; … … 6414 6498 6415 6499 \begin{prototype} 6416 psEllipseAxes psEllipseMomentsToAxes (psEllipseMoments moments);6417 psEllipseShape psEllipseAxesToShape (psEllipseAxes axes);6418 psEllipseAxes psEllipseShapeToAxes (psEllipseShape shape);6500 psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments); 6501 psEllipseShape psEllipseAxesToShape(psEllipseAxes axes); 6502 psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape); 6419 6503 \end{prototype} 6420 6504
Note:
See TracChangeset
for help on using the changeset viewer.
