IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2004, 12:45:37 PM (22 years ago)
Author:
eugene
Message:

updated SDRS

File:
1 edited

Legend:

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

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