Changeset 2542 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Nov 30, 2004, 12:45:37 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r2502 r2542 1 %%% $Id: psLibSDRS.tex,v 1.15 4 2004-11-27 01:48:23eugene Exp $1 %%% $Id: psLibSDRS.tex,v 1.155 2004-11-30 22:45:37 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 11 11 \project{Pan-STARRS Image Processing Pipeline} 12 12 \organization{Institute for Astronomy} 13 \version{ 09}13 \version{10} 14 14 \docnumber{PSDC-430-007} 15 15 … … 40 40 08 & 2004 Oct 12 & draft for start of cycle 4 \\ \hline 41 41 09 & 2004 Nov 15 & final for cycle 4 \\ 42 10 & 2004 Nov 30 & update for cycle 4 \\ 42 43 \RevisionsEnd 43 44 … … 1662 1663 1663 1664 \begin{verbatim} 1664 psArray *ps ArrayFromList(psList *list);1665 psList *ps ListFromArray(psArray *array);1665 psArray *psListToArray(psList *list); 1666 psList *psArrayToList(psArray *array); 1666 1667 \end{verbatim} 1667 1668 These two functions are available to convert between the … … 1764 1765 1765 1766 \begin{verbatim} 1766 psArray *ps ArrayFromHash(psHash *hash);1767 \end{verbatim} 1768 This function is available place the data in a \code{psHash} into a1769 \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 anyinformation about the has key values, and the order is not1767 psArray *psHashToArray(psHash *hash); 1768 \end{verbatim} 1769 This function places the data in a \code{psHash} into a \code{psArray} 1770 container. This function does not free the elements or destroy the 1771 input collection. Rather, it increments the reference counter for 1772 each of the elements. The resulting array does not have any 1773 information about the has key values, and the order is not 1773 1774 significant. 1774 1775 … … 4122 4123 \S\ref{sec:configgrammar}. 4123 4124 4125 \subsection{XML Functions} 4126 4127 Within Pan-STARRS, we will use XML documents as a transport mechanism 4128 to carry data between programs and between IPP and other subsystems. 4129 Configuration information may be stored as well as XML documents, in 4130 addition to the text format discussed in the discussion on Metadata. 4131 XML is an extremely variable document format, and it is not currently 4132 the intention of PSLib to provide a complete PSLib version of XML 4133 operations. Rather, a limited number of operations are defined to 4134 convert specific data structures to an appropriate XML document. To 4135 maximize the simplicity of the XML APIs, we will use the convention 4136 that a single XML document to be parsed by PSLib shall contain only a 4137 single data structure. Each of the XML APIs therefore take as input a 4138 reference to a complete XML document and return a PSLib data 4139 structure, or take a PSLib data structure and return a complete XML 4140 document. 4141 4142 We start by defining a PSLib wrapper type which is a pointer to an XML 4143 document in memory. We wrap the \code{libxml2} version of an XML 4144 document pointer for now: 4145 \begin{verbatim} 4146 typedef xmlDocPtr psXMLDoc; 4147 void psXMLDocFree(psXMLDoc *doc); 4148 \end{verbatim}. 4149 4150 The next pair of functions convert a \code{psMetadata} data structure 4151 to a complete \code{psXMLDoc} (in memory) and vice versa: 4152 \begin{verbatim} 4153 psXMLDoc *psMetadataToXMLDoc(const psMetadata *metadata); 4154 psMetadata *psXMLDocToMetadata(const psXMLDoc *doc); 4155 \end{verbatim}. 4156 4157 The next pair of functions loads the data in a named file into a 4158 complete \code{psXMLDoc} (in memory) and write out the \code{psXMLDoc} 4159 to a named file: 4160 \begin{verbatim} 4161 psXMLDoc *psXMLParseFile(const char *filename); 4162 int psXMLDocToFile(const psXMLDoc *doc, const char *filename); 4163 \end{verbatim}. 4164 4165 The next pair of functions accepts a block of memory and parses it 4166 into a complete \code{psXMLDoc} (also in memory), and vice versa: 4167 \begin{verbatim} 4168 psXMLDoc *psXMLParseMemory(const char *buffer, const int size); 4169 int psXMLDocToMemory(const psXMLDoc *doc, char *buffer); 4170 \end{verbatim}. 4171 4172 The next pair of functions read from and write to a file descriptor. 4173 The first converts the imcoming data to a complete \code{psXMLDoc} 4174 (also in memory), the second writes the \code{psXMLDoc} to the file 4175 descriptor: 4176 \begin{verbatim} 4177 psXMLDoc *psXMLParseFD(int fd); 4178 int psXMLDocToFD(const psXMLDoc *doc, int fd); 4179 \end{verbatim}. 4180 4124 4181 \subsection{FITS I/O Functions} 4125 4182
Note:
See TracChangeset
for help on using the changeset viewer.
