Changeset 2502 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Nov 26, 2004, 3:48:23 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r2383 r2502 1 %%% $Id: psLibSDRS.tex,v 1.15 3 2004-11-18 23:54:32 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.154 2004-11-27 01:48:23 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 19 19 \maketitle 20 20 \sloppy 21 22 % make a margin comment: 23 % \marginpar{note!} 21 24 22 25 % -- Revision History -- … … 35 38 06 & 2004 Aug 19 & revision for cycle 3 \\ \hline 36 39 07 & 2004 Sep 07 & final for cycle 3 \\ \hline 37 08 & 2004 Oct 12 & draft for start of cycle 4 \\ 40 08 & 2004 Oct 12 & draft for start of cycle 4 \\ \hline 41 09 & 2004 Nov 15 & final for cycle 4 \\ 38 42 \RevisionsEnd 39 43 … … 307 311 follows: 308 312 % 313 \filbreak 309 314 \begin{verbatim} 310 315 typedef struct { … … 700 705 reference counter and returns.} An example destructor is shown below: 701 706 707 \filbreak 702 708 \begin{verbatim} 703 709 void psMyTypeFree(psMyType *myType) … … 1466 1472 1467 1473 \begin{verbatim} 1474 psArray *psArrayAdd(psArray *array, int delta, void *value); 1475 \end{verbatim} 1476 1477 This function adds a value to the end of an array. If the current 1478 length of the array (\code{psArray.n}) is at the limit of the 1479 allocated space, additional space is allocated. The value of 1480 \code{delta} defines how many elements to add on each pass (if this 1481 value is less than 1, 10 shall be used). 1482 1483 \begin{verbatim} 1468 1484 psArray *psArraySort(psArray *array, int (*compare)(const void **a, const void **b) ); 1469 1485 \end{verbatim} … … 1646 1662 1647 1663 \begin{verbatim} 1648 psArray *ps ListToArray(psList *list);1649 psList *ps ArrayToList(psArray *array);1664 psArray *psArrayFromList(psList *list); 1665 psList *psListFromArray(psArray *array); 1650 1666 \end{verbatim} 1651 1667 These two functions are available to convert between the … … 1746 1762 returns the complete list of defined keys associated with the 1747 1763 \code{psHash} table as a linked list. 1764 1765 \begin{verbatim} 1766 psArray *psArrayFromHash(psHash *hash); 1767 \end{verbatim} 1768 This function is available place the data in a \code{psHash} into a 1769 \code{psArray} container. This function does not free the elements or 1770 destroy the input collection. Rather, it increments the reference 1771 counter for each of the elements. The resulting array does not have 1772 any information about the has key values, and the order is not 1773 significant. 1748 1774 1749 1775 \subsection{Lookup Tables} … … 2120 2146 psHistogram *psVectorHistogram(psHistogram *out, 2121 2147 const psVector *values, 2122 const psVector *errors,2148 const psVector *errors, 2123 2149 const psVector *mask, 2124 2150 unsigned int maskVal); … … 2367 2393 bool psMinimizeLMChi2(psMinimization *min, psImage *covar, psVector *params, 2368 2394 const psVector *paramMask, const psArray *x, const psVector *y, 2369 const psVector *yErr, psMinimizeLMChi2Func func);2395 const psVector *yErr, psMinimizeLMChi2Func func); 2370 2396 \end{verbatim} 2371 2397 … … 3738 3764 3739 3765 We define an item of metadata with the following structure: 3766 \filbreak 3740 3767 \begin{verbatim} 3741 3768 typedef struct { … … 3767 3794 \code{psMetadataType}: 3768 3795 % 3796 \filbreak 3769 3797 \begin{verbatim} 3770 3798 typedef enum { ///< type of item.data is: … … 3889 3917 \end{verbatim} 3890 3918 3919 Several utility functions are provided for simple cases. These 3920 functions perform the effort of casting the data to the appropriate 3921 type. The numerical functions shall return 0.0 if their key is not 3922 found. 3923 \begin{verbatim} 3924 void *psMetadataLookupPtr(const psMetadata *md, const char *key); 3925 psS32 psMetadataLookupS32(const psMetadata *md, const char *key); 3926 psF64 psMetadataLookupF64(const psMetadata *md, const char *key); 3927 \end{verbatim} 3928 3891 3929 Items may be retrieved from the metadata by their entry position. The 3892 3930 value of which specifies the desired entry in the fashion of … … 4015 4053 4016 4054 Here are some examples of lines of a valid configuration file: 4055 \filbreak 4017 4056 \begin{verbatim} 4018 4057 Double F64 1.23456789 # This is a comment … … 4064 4103 Figure~\ref{fig:metadata}. 4065 4104 4105 We further extend \code{psMetadataParseConfig} to allow the definition 4106 of a \code{psMetadata} entry using a sequence of successive lines to 4107 define the values of the \code{psMetadataItem} entries. The initial 4108 line defines the new \code{psMetadata} entry and its name. The 4109 following lines have the same format as the other metadata config file 4110 entries. The sequence is terminated with a line with a single word 4111 \code{END}. For example, a metadata entry may be defined as: 4112 \begin{verbatim} 4113 CELL METADATA 4114 EXTNAME STR CCD00 4115 BIASSEC STR BSEC-00 4116 CHIP STR CHIP.00 4117 NCELL S32 24 4118 END 4119 \end{verbatim} 4120 4066 4121 A BNF-like grammar of the configuration file is contained in 4067 4122 \S\ref{sec:configgrammar}. … … 4151 4206 4152 4207 \begin{verbatim} 4153 ps Hash*psFitsReadHeaderSet (psFits *fits);4208 psMetadata *psFitsReadHeaderSet (psFits *fits); 4154 4209 \end{verbatim} 4155 4210 Load a complete set of headers from the \code{psFits} file pointer.
Note:
See TracChangeset
for help on using the changeset viewer.
