IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 23, 2004, 5:42:51 PM (22 years ago)
Author:
Paul Price
Message:

Untabified.

File:
1 edited

Legend:

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

    r299 r300  
    1 %%% $Id: psLibSDRS.tex,v 1.10 2004-03-24 03:41:57 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.11 2004-03-24 03:42:51 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33%\documentclass[panstarrs]{panstarrs}
     
    140140\begin{verbatim}
    141141typedef struct {
    142     const void *magic0;                 //!< initialised to p_psMEMMAGIC
    143     const unsigned long id;             //!< a unique ID for this allocation
    144     const char *file;                   //!< set from __FILE__ in e.g. p_psAlloc
    145     const int lineno;                   //!< set from __LINE__ in e.g. p_psAlloc
    146     int refCounter;                     //!< how many times pointer is referenced
    147     const void *magic;                  //!< initialised to p_psMEMMAGIC
     142    const void *magic0;                 //!< initialised to p_psMEMMAGIC
     143    const unsigned long id;             //!< a unique ID for this allocation
     144    const char *file;                   //!< set from __FILE__ in e.g. p_psAlloc
     145    const int lineno;                   //!< set from __LINE__ in e.g. p_psAlloc
     146    int refCounter;                     //!< how many times pointer is referenced
     147    const void *magic;                  //!< initialised to p_psMEMMAGIC
    148148} psMemBlock;
    149149\end{verbatim}
     
    160160\begin{verbatim}
    161161/// Memory allocation. Underlying private function called by macro psAlloc.
    162 void *p_psAlloc(size_t size,            //!< Size required
    163                 const char *file,       //!< File of call
    164                 int lineno              //!< Line number of call
    165                 );
     162void *p_psAlloc(size_t size,            //!< Size required
     163                const char *file,       //!< File of call
     164                int lineno              //!< Line number of call
     165                );
    166166
    167167/// Memory re-allocation.  Underlying private function called by macro psRealloc.
    168 void *p_psRealloc(void *ptr,            //!< Pointer to re-allocate
    169                   size_t size,          //!< Size required
    170                   const char *file,     //!< File of call
    171                   int lineno            //!< Line number of call
    172                   );
     168void *p_psRealloc(void *ptr,            //!< Pointer to re-allocate
     169                  size_t size,          //!< Size required
     170                  const char *file,     //!< File of call
     171                  int lineno            //!< Line number of call
     172                  );
    173173
    174174/// Free memory.  Underlying private function called by macro psFree.
    175 void p_psFree(void *ptr,                //!< Pointer to free
    176               const char *file,         //!< File of call
    177               int lineno                //!< Line number of call
    178               );
     175void p_psFree(void *ptr,                //!< Pointer to free
     176              const char *file,         //!< File of call
     177              int lineno                //!< Line number of call
     178              );
    179179
    180180/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
     
    263263/// Set callback for problems
    264264psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func //!< Function to run
    265                                        );
     265                                       );
    266266
    267267/// Set callback for out-of-memory
    268268psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func //!< Function to run
    269                                            );
     269                                           );
    270270
    271271/// Set call back for when a particular memory block is allocated
    272272psMemCallback psMemAllocateSetCB(psMemCallback func //!< Function to run
    273                                 );
     273                                );
    274274
    275275/// Set call back for when a particular memory block is freed
    276276psMemCallback psMemFreeSetCB(psMemCallback func
    277                              );
     277                             );
    278278
    279279/// get next memory ID
     
    281281
    282282/// set p_psMemAllocateID to id
    283 long psMemSetAllocateID(long id         //!< ID to set
    284                         );
     283long psMemSetAllocateID(long id         //!< ID to set
     284                        );
    285285
    286286/// set p_psMemFreeID to id
    287 long psMemSetFreeID(long id             //!< ID to set
    288                     );
     287long psMemSetFreeID(long id             //!< ID to set
     288                    );
    289289
    290290/// Check for memory leaks
    291 int psMemCheckLeaks(int id0,            //!< don't list blocks with id < id0
    292                     psMemBlock ***arr,  //!< pointer to array of pointers to leaked blocks, or NULL
    293                     FILE *fd            //!< print list of leaks to fd (or NULL)
    294                     );
     291int psMemCheckLeaks(int id0,            //!< don't list blocks with id < id0
     292                    psMemBlock ***arr,  //!< pointer to array of pointers to leaked blocks, or NULL
     293                    FILE *fd            //!< print list of leaks to fd (or NULL)
     294                    );
    295295/// Check for memory corruption
    296296int psMemCheckCorruption(int abort_on_error //!< Abort on detecting corruption?
    297                         );
     297                        );
    298298\end{verbatim}
    299299
     
    400400\begin{verbatim}
    401401/// Return reference counter
    402 int psMemGetRefCounter(void *vptr       //!< Pointer to get refCounter for
    403                        );
     402int psMemGetRefCounter(void *vptr       //!< Pointer to get refCounter for
     403                       );
    404404
    405405/// Increment reference counter and return the pointer
    406 void *psMemIncrRefCounter(void *vptr    //!< Pointer to increment refCounter, and return
    407                           );
     406void *psMemIncrRefCounter(void *vptr    //!< Pointer to increment refCounter, and return
     407                          );
    408408
    409409/// Decrement reference counter and return the pointer
    410 void *psMemDecrRefCounter(void *vptr    //!< Pointer to decrement refCounter, and return
    411                           );
     410void *psMemDecrRefCounter(void *vptr    //!< Pointer to decrement refCounter, and return
     411                          );
    412412\end{verbatim}
    413413
     
    487487
    488488/// Send a trace message
    489 void p_psTrace(const char *facil,       ///< facilty of interest
    490                int level,               ///< desired trace level
    491                ...                      ///< trace message arguments
     489void p_psTrace(const char *facil,       ///< facilty of interest
     490               int level,               ///< desired trace level
     491               ...                      ///< trace message arguments
    492492    );
    493493
    494494/// Set trace level
    495 int psSetTraceLevel(const char *facil,  ///< facilty of interest
    496                     int level           ///< desired trace level
     495int psSetTraceLevel(const char *facil,  ///< facilty of interest
     496                    int level           ///< desired trace level
    497497    );
    498498
    499499/// Get the trace level
    500 int psGetTraceLevel(const char *name    ///< facilty of interest
     500int psGetTraceLevel(const char *name    ///< facilty of interest
    501501    );
    502502
     
    652652
    653653/// Sets the log destination
    654 int psSetLogDestination(int dest);     
     654int psSetLogDestination(int dest);     
    655655
    656656/// Sets the log level
    657 int psSetLogLevel(int level);           
     657int psSetLogLevel(int level);           
    658658
    659659/// sets the log format
    660 void psSetLogFormat(const char *fmt);   
     660void psSetLogFormat(const char *fmt);   
    661661\end{verbatim}
    662662
     
    728728/** Doubly-linked list element */
    729729typedef struct psDlistElem {
    730    struct psDlistElem *prev;            //!< previous link in list
    731    struct psDlistElem *next;            //!< next link in list
    732    void *data;                          //!< real data item
     730   struct psDlistElem *prev;            //!< previous link in list
     731   struct psDlistElem *next;            //!< next link in list
     732   void *data;                          //!< real data item
    733733} psDlistElem;
    734734
    735735/** Doubly-linked list */
    736736typedef struct {
    737    int n;                               //!< number of elements on list
    738    psDlistElem *head;                   //!< first element on list (may be NULL)
    739    psDlistElem *tail;                   //!< last element on list (may be NULL)
    740    psDlistElem *iter;                   //!< iteration cursor
     737   int n;                               //!< number of elements on list
     738   psDlistElem *head;                   //!< first element on list (may be NULL)
     739   psDlistElem *tail;                   //!< last element on list (may be NULL)
     740   psDlistElem *iter;                   //!< iteration cursor
    741741} psDlist;
    742742
    743743/** Special values of index into list */
    744744enum {
    745    PS_DLIST_HEAD = 0,                   //!< at head
    746    PS_DLIST_TAIL = -1,                  //!< at tail
    747    PS_DLIST_UNKNOWN = -2,               //!< unknown position
    748    PS_DLIST_PREV = -3,                  //!< previous element
    749    PS_DLIST_NEXT = -4                   //!< next element
     745   PS_DLIST_HEAD = 0,                   //!< at head
     746   PS_DLIST_TAIL = -1,                  //!< at tail
     747   PS_DLIST_UNKNOWN = -2,               //!< unknown position
     748   PS_DLIST_PREV = -3,                  //!< previous element
     749   PS_DLIST_NEXT = -4                   //!< next element
    750750};
    751751\end{verbatim}
     
    755755\begin{verbatim}
    756756/** Constructor */
    757 psDlist *psDlistAlloc(void *data        //!< initial data item; may be NULL
    758                       );
     757psDlist *psDlistAlloc(void *data        //!< initial data item; may be NULL
     758                      );
    759759
    760760/** Destructor */
    761 void psDlistFree(psDlist *list,         //!< list to destroy
    762                 void (*elemFree)(void *) //!< destructor for data on list
    763                 );
     761void psDlistFree(psDlist *list,         //!< list to destroy
     762                void (*elemFree)(void *) //!< destructor for data on list
     763                );
    764764
    765765/**** List maintainence functions ****/
    766766
    767767/** Add to list */
    768 psDlist *psDlistAdd(psDlist *list,      //!< list to add to (may be NULL)
    769                     void *data,         //!< data item to add
    770                     int where           //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
    771                     );
     768psDlist *psDlistAdd(psDlist *list,      //!< list to add to (may be NULL)
     769                    void *data,         //!< data item to add
     770                    int where           //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     771                    );
    772772
    773773/** Append to a list */
    774 psDlist *psDlistAppend(psDlist *list,   //!< list to append to (may be NULL)
    775                        void *data       //!< data item to add
    776                        );
     774psDlist *psDlistAppend(psDlist *list,   //!< list to append to (may be NULL)
     775                       void *data       //!< data item to add
     776                       );
    777777
    778778/** Remove from a list */
    779 void *psDlistRemove(psDlist *list,      //!< list to remove element from
    780                     void *data,         //!< data item to remove
    781                     int which           //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    782                                         //!< PS_DLIST_PREV
    783                     );
     779void *psDlistRemove(psDlist *list,      //!< list to remove element from
     780                    void *data,         //!< data item to remove
     781                    int which           //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     782                                        //!< PS_DLIST_PREV
     783                    );
    784784/** Retrieve from a list */
    785 void *psDlistGet(const psDlist *list,   //!< list to retrieve element from
    786                  int which              //!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
    787                 );
     785void *psDlistGet(const psDlist *list,   //!< list to retrieve element from
     786                 int which              //!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
     787                );
    788788
    789789/** Convert doubly-linked list to an array */
    790790psVoidPtrArray *psDlistToArray(psDlist *dlist //!< List to convert
    791                                );
     791                               );
    792792
    793793/** Convert array to a doubly-linked list */
    794794psDlist *psArrayToDlist(psVoidPtrArray *arr //!< Array to convert
    795                         );
     795                        );
    796796\end{verbatim}
    797797
     
    810810\begin{verbatim}
    811811/** Set the iterator */
    812 void psDlistSetIterator(psDlist *list,  //!< list to retrieve element from
    813                         int where,      //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
    814                         int which       //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    815                                         //!< PS_DLIST_PREV
    816                         );
     812void psDlistSetIterator(psDlist *list,  //!< list to retrieve element from
     813                        int where,      //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     814                        int which       //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     815                                        //!< PS_DLIST_PREV
     816                        );
    817817
    818818/** Get next element */
    819 void *psDlistGetNext(psDlist *list,     //!< list to retrieve element from
    820                      int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    821                                         //!< PS_DLIST_PREV
    822                      );
     819void *psDlistGetNext(psDlist *list,     //!< list to retrieve element from
     820                     int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     821                                        //!< PS_DLIST_PREV
     822                     );
    823823
    824824/** Get previous element */
    825 void *psDlistGetPrev(psDlist *list,     //!< list to retrieve element from
    826                      int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    827                                         //!< PS_DLIST_PREV
    828                      );
     825void *psDlistGetPrev(psDlist *list,     //!< list to retrieve element from
     826                     int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     827                                        //!< PS_DLIST_PREV
     828                     );
    829829\end{verbatim}
    830830in which the \code{where} argument must be \code{PS_DLIST_HEAD} or \code{PS_DLIST_TAIL},
     
    10181018
    10191019\begin{verbatim}
    1020 typedef struct HashTable psHash;        ///< Opaque type for a hash table
     1020typedef struct HashTable psHash;        ///< Opaque type for a hash table
    10211021
    10221022/// Allocate hash buckets in table.
    1023 psHash *psHashAlloc(int nbucket         ///< initial number of buckets
     1023psHash *psHashAlloc(int nbucket         ///< initial number of buckets
    10241024    );
    10251025
    10261026/// Free hash buckets from table.
    1027 void psHashFree(psHash *table,          ///< hash table to be freed
    1028                 void (*itemFree)(void *item) ///< how to free hashed data; or NULL
     1027void psHashFree(psHash *table,          ///< hash table to be freed
     1028                void (*itemFree)(void *item) ///< how to free hashed data; or NULL
    10291029    );
    10301030
    10311031/// Insert entry into table.
    1032 void *psHashInsert(psHash *table,       ///< table to insert in
    1033                    const char *key,     ///< key to use
    1034                    void *data,          ///< data to insert
    1035                    void (*itemFree)(void *item) ///< how to free hashed data; or NULL
     1032void *psHashInsert(psHash *table,       ///< table to insert in
     1033                   const char *key,     ///< key to use
     1034                   void *data,          ///< data to insert
     1035                   void (*itemFree)(void *item) ///< how to free hashed data; or NULL
    10361036    );
    10371037
    10381038/// Lookup key in table.
    1039 void *psHashLookup(psHash *table,       ///< table to lookup key in
    1040                    const char *key      ///< key to lookup
     1039void *psHashLookup(psHash *table,       ///< table to lookup key in
     1040                   const char *key      ///< key to lookup
    10411041    );
    10421042
    10431043/// Remove key from table.
    1044 void *psHashRemove(psHash *table,       ///< table to lookup key in
    1045                    const char *key      ///< key to lookup
     1044void *psHashRemove(psHash *table,       ///< table to lookup key in
     1045                   const char *key      ///< key to lookup
    10461046    );
    10471047\end{verbatim}
     
    10751075   
    10761076/// Prints an error message and aborts
    1077 void psAbort(const char *name,          ///< Category of code that caused the abort
    1078              const char *fmt,           ///< Format
    1079              ...                        ///< Extra arguments to use format
    1080              );
     1077void psAbort(const char *name,          ///< Category of code that caused the abort
     1078             const char *fmt,           ///< Format
     1079             ...                        ///< Extra arguments to use format
     1080             );
    10811081
    10821082/// Prints an error message and doesn't abort
    1083 void psError(const char *name,          ///< Category of code that caused the abort
    1084              const char *fmt,           ///< Format
    1085              ...                        ///< Extra arguments to use format
     1083void psError(const char *name,          ///< Category of code that caused the abort
     1084             const char *fmt,           ///< Format
     1085             ...                        ///< Extra arguments to use format
    10861086    );
    10871087
    10881088/// Allocates and returns a copy of a string
    1089 char *psStringCopy(const char *str      ///< string to copy
     1089char *psStringCopy(const char *str      ///< string to copy
    10901090    );
    10911091
    10921092/// Allocates nChar and returns a copy of the string or segment
    1093 char *psStringNCopy(const char *str,    ///< string to copy
    1094                     int nChar           //!< Number of characters (including \0 )
     1093char *psStringNCopy(const char *str,    ///< string to copy
     1094                    int nChar           //!< Number of characters (including \0 )
    10951095    );
    10961096\end{verbatim}
     
    12471247/** private structure used to pass constant values into the math operators. */
    12481248typedef struct {
    1249     psType type;                        ///< data type information
    1250     union {                            
    1251         int i;                          ///< integer value entry
    1252         float f;                        ///< float value entry
    1253         double d;                       ///< double value entry
    1254         complex float c;                ///< complex value entry
     1249    psType type;                        ///< data type information
     1250    union {                            
     1251        int i;                          ///< integer value entry
     1252        float f;                        ///< float value entry
     1253        double d;                       ///< double value entry
     1254        complex float c;                ///< complex value entry
    12551255    } val;
    12561256} p_psScalar;
     
    17081708/// basic image data structure.
    17091709typedef struct psImage {
    1710     psType type;                        ///< image data type and dimension
    1711     int nx, ny;                         ///< size of image
    1712     int x0, y0;                         ///< data region relative to parent
     1710    psType type;                        ///< image data type and dimension
     1711    int nx, ny;                         ///< size of image
     1712    int x0, y0;                         ///< data region relative to parent
    17131713    union {
    1714         psF32 **rows;                   ///< == rows_f32
    1715         psS8  **rows_s8;                ///< pointers to psS8 data
    1716         psS16 **rows_s16;               ///< pointers to psS16 data
    1717         psS32 **rows_s32;               ///< pointers to psS32 data
    1718         psU8  **rows_u8;                ///< pointers to psU8 data
    1719         psU16 **rows_u16;               ///< pointers to psU16 data
    1720         psU32 **rows_u32;               ///< pointers to psU32 data
    1721         psF32 **rows_f32;               ///< pointers to psF32 data
    1722         psF64 **rows_f64;               ///< pointers to psF64 data
    1723         psComplex **rows_complex;       //!< pointers to psComplex data
     1714        psF32 **rows;                   ///< == rows_f32
     1715        psS8  **rows_s8;                ///< pointers to psS8 data
     1716        psS16 **rows_s16;               ///< pointers to psS16 data
     1717        psS32 **rows_s32;               ///< pointers to psS32 data
     1718        psU8  **rows_u8;                ///< pointers to psU8 data
     1719        psU16 **rows_u16;               ///< pointers to psU16 data
     1720        psU32 **rows_u32;               ///< pointers to psU32 data
     1721        psF32 **rows_f32;               ///< pointers to psF32 data
     1722        psF64 **rows_f64;               ///< pointers to psF64 data
     1723        psComplex **rows_complex;       //!< pointers to psComplex data
    17241724    } rows;
    1725     psImage *parent;                    ///< parent, if a subimage
    1726     int Nchildren;                      ///< number of subimages
    1727     psImage *children;                  ///< children of this region; array of Nchildren pointers
     1725    psImage *parent;                    ///< parent, if a subimage
     1726    int Nchildren;                      ///< number of subimages
     1727    psImage *children;                  ///< children of this region; array of Nchildren pointers
    17281728} psImage;
    17291729\end{verbatim}
     
    17621762/// Create a subimage of the specified area.
    17631763psImage *
    1764 psImageSubset(psImage *out,             //!< Subimage to return, or NULL
    1765               const psImage *image,     ///< parent image
    1766               int nx,                   ///< subimage width (<= image.nx - x0) 
    1767               int ny,                   ///< subimage width (<= image.ny - y0) 
    1768               int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
    1769               int y0                    ///< subimage y-offset (0 <= y0 < ny)   
     1764psImageSubset(psImage *out,             //!< Subimage to return, or NULL
     1765              const psImage *image,     ///< parent image
     1766              int nx,                   ///< subimage width (<= image.nx - x0) 
     1767              int ny,                   ///< subimage width (<= image.ny - y0) 
     1768              int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
     1769              int y0                    ///< subimage y-offset (0 <= y0 < ny)   
    17701770    );
    17711771\end{verbatim}
     
    17981798\begin{verbatim}
    17991799psImage *
    1800 psImageCopy(psImage *output,            ///< target structure for output image data
    1801             const psImage *input        ///< copy this image
     1800psImageCopy(psImage *output,            ///< target structure for output image data
     1801            const psImage *input        ///< copy this image
    18021802    );
    18031803\end{verbatim}
     
    18131813\begin{verbatim}
    18141814psFloatArray *
    1815 psImageSlice(psFloatArray *out,         //!< Vector to output, or NULL
    1816              const psImage *input,      ///< extract slice from this image
    1817              int x,                     ///< starting x coord of region to slice
    1818              int y,                     ///< starting y coord of region to slice
    1819              int nx,                    ///< width of region in x
    1820              int ny,                    ///< width of region in y
    1821              int direction,             ///< direction of vector along slice
    1822              const psStats *stats       ///< defines statistics used to find output values
     1815psImageSlice(psFloatArray *out,         //!< Vector to output, or NULL
     1816             const psImage *input,      ///< extract slice from this image
     1817             int x,                     ///< starting x coord of region to slice
     1818             int y,                     ///< starting y coord of region to slice
     1819             int nx,                    ///< width of region in x
     1820             int ny,                    ///< width of region in y
     1821             int direction,             ///< direction of vector along slice
     1822             const psStats *stats       ///< defines statistics used to find output values
    18231823    );
    18241824\end{verbatim}
     
    18351835\begin{verbatim}
    18361836psFloatArray *
    1837 psImageCut(psFloatArray *out,           //!< Vector to output, or NULL
    1838            const psImage *input,        ///< extract cut from this image
    1839            float xs,                    ///< starting x coord of cut
    1840            float ys,                    ///< starting y coord of cut
    1841            float xe,                    ///< ending x coord of cut
    1842            float ye,                    ///< ending y coord of cut
    1843            float dw,                    ///< width of cut
    1844            const psStats *stats         ///< defines statistics used to find output values
     1837psImageCut(psFloatArray *out,           //!< Vector to output, or NULL
     1838           const psImage *input,        ///< extract cut from this image
     1839           float xs,                    ///< starting x coord of cut
     1840           float ys,                    ///< starting y coord of cut
     1841           float xe,                    ///< ending x coord of cut
     1842           float ye,                    ///< ending y coord of cut
     1843           float dw,                    ///< width of cut
     1844           const psStats *stats         ///< defines statistics used to find output values
    18451845    );
    18461846 \end{verbatim}
     
    18561856\begin{verbatim}
    18571857psFloatArray *
    1858 psImageRadialCut(psFloatArray *out,     //!< Vector to output, or NULL
    1859                  const psImage *input,  ///< extract profile from this image
    1860                  float x,               ///< center x coord of annulii
    1861                  float y,               ///< center y coord of annulii
    1862                  float radius,          ///< outer radius of annulii
    1863                  float dr,              ///< radial step size of annulii
    1864                  const psStats *stats   ///< defines statistics used to find output values
     1858psImageRadialCut(psFloatArray *out,     //!< Vector to output, or NULL
     1859                 const psImage *input,  ///< extract profile from this image
     1860                 float x,               ///< center x coord of annulii
     1861                 float y,               ///< center y coord of annulii
     1862                 float radius,          ///< outer radius of annulii
     1863                 float dr,              ///< radial step size of annulii
     1864                 const psStats *stats   ///< defines statistics used to find output values
    18651865    );
    18661866\end{verbatim}
     
    18751875\begin{verbatim}
    18761876psImage *
    1877 psImageRebin(psImage *out,              //!< Image to output, or NULL
    1878              const psImage *input,      ///< rebin this image
    1879              float scale,               ///< rebinning scale: doutput = scale*dinput
    1880              const psStats *stats       ///< defines statistics used to find output values
     1877psImageRebin(psImage *out,              //!< Image to output, or NULL
     1878             const psImage *input,      ///< rebin this image
     1879             float scale,               ///< rebinning scale: doutput = scale*dinput
     1880             const psStats *stats       ///< defines statistics used to find output values
    18811881    );
    18821882\end{verbatim}
     
    18901890\begin{verbatim}
    18911891psImage *
    1892 psImageRotate(psImage *out,             //!< Image to output, or NULL
    1893               const psImage *input,     ///< rotate this image
    1894               float angle               ///< rotate by this amount anti-clockwise (degrees)
     1892psImageRotate(psImage *out,             //!< Image to output, or NULL
     1893              const psImage *input,     ///< rotate this image
     1894              float angle               ///< rotate by this amount anti-clockwise (degrees)
    18951895    );
    18961896\end{verbatim}
     
    19041904\begin{verbatim}
    19051905psImage *
    1906 psImageShift(psImage *out,              //!< Image to output, or NULL
    1907              const psImage *input,      ///< shift this image
    1908              float dx,                  ///< shift by this amount in x
    1909              float dy,                  ///< shift by this amount in y
    1910              float exposed              ///< set exposed pixels to this value
     1906psImageShift(psImage *out,              //!< Image to output, or NULL
     1907             const psImage *input,      ///< shift this image
     1908             float dx,                  ///< shift by this amount in x
     1909             float dy,                  ///< shift by this amount in y
     1910             float exposed              ///< set exposed pixels to this value
    19111911    );
    19121912\end{verbatim}
     
    19171917\begin{verbatim}
    19181918psImage *
    1919 psImageRoll(psImage *out,               //!< Image to output, or NULL
    1920             const psImage *input,       ///< roll this image
    1921             int dx,                     ///< roll this amount in x
    1922             int dy                      ///< roll this amount in y
     1919psImageRoll(psImage *out,               //!< Image to output, or NULL
     1920            const psImage *input,       ///< roll this image
     1921            int dx,                     ///< roll this amount in x
     1922            int dy                      ///< roll this amount in y
    19231923    );
    19241924\end{verbatim}
     
    19281928\begin{verbatim}
    19291929psStats *
    1930 psImageGetStats(const psImage *input,   ///< image (or subimage) to calculate stats
    1931                 psStats *stats          ///< defines statistics to be calculated & target
     1930psImageGetStats(const psImage *input,   ///< image (or subimage) to calculate stats
     1931                psStats *stats          ///< defines statistics to be calculated & target
    19321932    );
    19331933\end{verbatim}
     
    19371937\begin{verbatim}
    19381938psHistogram *
    1939 psImageHistogram(psHistogram *hist,     ///< input histogram description & target
    1940                  const psImage *input   ///< determine histogram of this image
     1939psImageHistogram(psHistogram *hist,     ///< input histogram description & target
     1940                 const psImage *input   ///< determine histogram of this image
    19411941    );
    19421942\end{verbatim}
     
    19481948psPolynomial2D *
    19491949psImageFitPolynomial(const psImage *input, ///< image to fit
    1950                      psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
     1950                     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
    19511951    );
    19521952\end{verbatim}
     
    19591959int
    19601960psImageEvalPolynomial(const psImage *input, ///< image to fit
    1961                       const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
     1961                      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
    19621962    );
    19631963\end{verbatim}
     
    19791979\begin{verbatim}
    19801980psImage *
    1981 psImageReadSection(psImage *output,     ///< place data in this structure for output
    1982                    int x,               ///< starting x coord of region
    1983                    int y,               ///< starting y coord of region
    1984                    int nx,              ///< x size of region (-1 for full range)
    1985                    int ny,              ///< y size of region (-1 for full range)
    1986                    int z,               ///< plane of interest
    1987                    const char *extname, ///< MEF extension name ("PHU" for primary header)
    1988                    int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    1989                    const char *filename ///< file to read data from
     1981psImageReadSection(psImage *output,     ///< place data in this structure for output
     1982                   int x,               ///< starting x coord of region
     1983                   int y,               ///< starting y coord of region
     1984                   int nx,              ///< x size of region (-1 for full range)
     1985                   int ny,              ///< y size of region (-1 for full range)
     1986                   int z,               ///< plane of interest
     1987                   const char *extname, ///< MEF extension name ("PHU" for primary header)
     1988                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     1989                   const char *filename ///< file to read data from
    19901990    );
    19911991\end{verbatim}
     
    19961996\begin{verbatim}
    19971997psImage *
    1998 psImageFReadSection(psImage *output,    ///< place data in this structure for output
    1999                     int x,              ///< starting x coord of region            
    2000                     int y,              ///< starting y coord of region            
    2001                     int dx,             ///< x size of region (-1 for full range)          
    2002                     int dy,             ///< y size of region (-1 for full range)          
    2003                     int z,              ///< plane of interest                     
    2004                     const char *extname, ///< MEF extension name ("PHU" for primary header)
    2005                     int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    2006                     FILE *f     ///< file descriptor to read data from             
     1998psImageFReadSection(psImage *output,    ///< place data in this structure for output
     1999                    int x,              ///< starting x coord of region            
     2000                    int y,              ///< starting y coord of region            
     2001                    int dx,             ///< x size of region (-1 for full range)          
     2002                    int dy,             ///< y size of region (-1 for full range)          
     2003                    int z,              ///< plane of interest                     
     2004                    const char *extname, ///< MEF extension name ("PHU" for primary header)
     2005                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     2006                    FILE *f     ///< file descriptor to read data from             
    20072007    );
    20082008\end{verbatim}
     
    20192019psImage *
    20202020psImageWriteSection(psImage *input,    ///< image to write out
    2021                     int x,              ///< starting x coord of region            
    2022                     int y,              ///< starting y coord of region            
    2023                     int z,              ///< plane of interest                     
    2024                     const char *extname, ///< MEF extension name ("PHU" for primary header)
    2025                     int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    2026                     const char *filename ///< file to write data to                
     2021                    int x,              ///< starting x coord of region            
     2022                    int y,              ///< starting y coord of region            
     2023                    int z,              ///< plane of interest                     
     2024                    const char *extname, ///< MEF extension name ("PHU" for primary header)
     2025                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     2026                    const char *filename ///< file to write data to                
    20272027    );
    20282028\end{verbatim}
     
    20312031\begin{verbatim}
    20322032psImage *
    2033 psImageFWriteSection(psImage *input,    ///< image to write out
    2034                      int x,             ///< starting x coord of region            
    2035                      int y,             ///< starting y coord of region            
    2036                      int z,             ///< plane of interest                     
    2037                      const char *extname, ///< MEF extension name                          
    2038                      int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    2039                      FILE *f            ///< file descriptor to write data to              
     2033psImageFWriteSection(psImage *input,    ///< image to write out
     2034                     int x,             ///< starting x coord of region            
     2035                     int y,             ///< starting y coord of region            
     2036                     int z,             ///< plane of interest                     
     2037                     const char *extname, ///< MEF extension name                          
     2038                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     2039                     FILE *f            ///< file descriptor to write data to              
    20402040    );
    20412041\end{verbatim}
     
    20482048\begin{verbatim}
    20492049psMetadata *
    2050 psImageReadHeader(psMetadata *output,   ///< read data to this structure
    2051                   const char *extname,  ///< MEF extension name ("PHU" for primary header)
    2052                   int extnum,           ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    2053                   const char *filename  ///< file to read from
     2050psImageReadHeader(psMetadata *output,   ///< read data to this structure
     2051                  const char *extname,  ///< MEF extension name ("PHU" for primary header)
     2052                  int extnum,           ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     2053                  const char *filename  ///< file to read from
    20542054    );
    20552055\end{verbatim}
     
    20602060psMetadata *
    20612061psImageFReadHeader(psMetadata *output, ///< read data to this structure
    2062                    const char *extname, ///< MEF extension name ("PHU" for primary header)
    2063                    int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    2064                    FILE *f              ///< file descriptor to read from
     2062                   const char *extname, ///< MEF extension name ("PHU" for primary header)
     2063                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     2064                   FILE *f              ///< file descriptor to read from
    20652065    );
    20662066\end{verbatim}
     
    20702070\begin{verbatim}
    20712071psImage *
    2072 psImageFFT(psImage *output,             //!< Output image
    2073            const psImage *input,        ///< image to FFT
    2074            int direction                ///< FFT direction
     2072psImageFFT(psImage *output,             //!< Output image
     2073           const psImage *input,        ///< image to FFT
     2074           int direction                ///< FFT direction
    20752075    );
    20762076\end{verbatim}
     
    20812081\begin{verbatim}
    20822082int
    2083 psImageClip(psImage *input,             ///< clip this image
    2084             float min,                  ///< clip pixels with values < min
    2085             float vmin,                 ///< set min-clipped pixels to vmin
    2086             float max,                  ///< clip pixels with values > max
    2087             float vmax                  ///< set max-clipped pixels to vmax
     2083psImageClip(psImage *input,             ///< clip this image
     2084            float min,                  ///< clip pixels with values < min
     2085            float vmin,                 ///< set min-clipped pixels to vmin
     2086            float max,                  ///< clip pixels with values > max
     2087            float vmax                  ///< set max-clipped pixels to vmax
    20882088    );
    20892089\end{verbatim}
     
    20942094\begin{verbatim}
    20952095int
    2096 psImageClipNaN(psImage *input,          ///< clip this image & target
    2097                float value              ///< set nan pixels to this value
     2096psImageClipNaN(psImage *input,          ///< clip this image & target
     2097               float value              ///< set nan pixels to this value
    20982098    );
    20992099\end{verbatim}
     
    21082108\begin{verbatim}
    21092109int
    2110 psImageOverlaySection(psImage *image,   ///< input image & target
    2111                       const psImage *overlay, ///< image to overlay
    2112                       int x0,           ///< x offset of overlay subimage
    2113                       int y0,           ///< y offset of overlay subimage
    2114                       const char *operator ///< overlay operation
     2110psImageOverlaySection(psImage *image,   ///< input image & target
     2111                      const psImage *overlay, ///< image to overlay
     2112                      int x0,           ///< x offset of overlay subimage
     2113                      int y0,           ///< y offset of overlay subimage
     2114                      const char *operator ///< overlay operation
    21152115    );
    21162116\end{verbatim}
     
    22672267typedef struct {
    22682268    int nCells;                         ///< Number of Cells assigned
    2269     psCell *cells;                      ///< Cells in the Chip
    2270 
    2271     psMetaDataSet *md;                  ///< Chip-level metadata
     2269    psCell *cells;                      ///< Cells in the Chip
     2270
     2271    psMetaDataSet *md;                  ///< Chip-level metadata
    22722272    psCoordXform *chipToFPA;            ///< Transformations from chip coordinates to FPA coordinates
    2273     psCoordXform *FPAtoChip;            //!< Transformations from FPA coordinates to chip
    2274 
    2275     struct psFPA *parentFPA;            ///< FPA which contains this chip
     2273    psCoordXform *FPAtoChip;            //!< Transformations from FPA coordinates to chip
     2274
     2275    struct psFPA *parentFPA;            ///< FPA which contains this chip
    22762276} psChip;
    22772277\end{verbatim}
     
    23032303    int nChips;                         ///< Number of Cells assigned
    23042304    int nAlloc;                         ///< Number of Cells available
    2305     psChip *chips;                      ///< Chips in the Focal Plane Array
    2306 
    2307     psMetaDataSet *md;                  ///< FPA-level metadata
    2308     psDistortion *TPtoFP;               ///< Transformation term from
    2309     psDistortion *FPtoTP;               ///< Transformation term from
    2310     psFixedPattern *pattern;            //!< Fixed pattern residual offsets
     2305    psChip *chips;                      ///< Chips in the Focal Plane Array
     2306
     2307    psMetaDataSet *md;                  ///< FPA-level metadata
     2308    psDistortion *TPtoFP;               ///< Transformation term from
     2309    psDistortion *FPtoTP;               ///< Transformation term from
     2310    psFixedPattern *pattern;            //!< Fixed pattern residual offsets
    23112311    psExposure *exp;                    ///< information about this exposure
    23122312    psPhotSystem colorPlus, colorMinus; ///< Colour reference
     
    24372437/** returns Chip in FPA which contains the given FPA coordinate */
    24382438psChip *
    2439 psChipInFPA (psChip *out,               //!< Chip to return, or NULL
    2440              const psFPA *fpa,          ///< FPA description
    2441              const psCoord *coord       ///< coordinate in FPA
    2442              );
     2439psChipInFPA (psChip *out,               //!< Chip to return, or NULL
     2440             const psFPA *fpa,          ///< FPA description
     2441             const psCoord *coord       ///< coordinate in FPA
     2442             );
    24432443\end{verbatim}
    24442444
     
    24462446/** returns Cell in Chip which contains the given chip coordinate */
    24472447psCell *
    2448 psCellInChip(psCell *out,               //!< Cell to return, or NULL
    2449              const psChip *chip,        ///< chip description
    2450              const psCoord *coord       ///< coordinate in chip
    2451              );
     2448psCellInChip(psCell *out,               //!< Cell to return, or NULL
     2449             const psChip *chip,        ///< chip description
     2450             const psCoord *coord       ///< coordinate in chip
     2451             );
    24522452\end{verbatim}
    24532453
     
    24592459/** Return the cell in FPA which contains the given FPA coordinates */
    24602460psCell *
    2461 psCellInFPA(psCell *out,                //!< Cell to return, or NULL
    2462             const psFPA *fpa,           //!< FPA description
    2463             const psCoord *coord        //!< Coordinate in FPA
    2464             );
     2461psCellInFPA(psCell *out,                //!< Cell to return, or NULL
     2462            const psFPA *fpa,           //!< FPA description
     2463            const psCoord *coord        //!< Coordinate in FPA
     2464            );
    24652465\end{verbatim}
    24662466
     
    25072507/** Convert cell and cell coordinate to (RA,Dec) */
    25082508psCoord *
    2509 psCoordCellToSky(psCoord *out,          //!< Coordinates to return, or NULL
    2510                  const psCell *cell,    //!< Cell to get coordinates for
    2511                  const psCoord *coord   //!< cell coordinates to transform
    2512                 );
     2509psCoordCellToSky(psCoord *out,          //!< Coordinates to return, or NULL
     2510                 const psCell *cell,    //!< Cell to get coordinates for
     2511                 const psCoord *coord   //!< cell coordinates to transform
     2512                );
    25132513\end{verbatim}
    25142514
     
    25162516/** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */
    25172517psCoord *
    2518 psCoordCellToSkyQuick(psCoord *out,     //!< Coordinates to return, or NULL
    2519                       const psCell *cell, //!< Cell description
    2520                       const psCoord *coord //!< cell coordinates to transform
    2521                       );
     2518psCoordCellToSkyQuick(psCoord *out,     //!< Coordinates to return, or NULL
     2519                      const psCell *cell, //!< Cell description
     2520                      const psCoord *coord //!< cell coordinates to transform
     2521                      );
    25222522\end{verbatim}
    25232523
     
    25252525/** Convert (RA,Dec) to tangent plane coords */
    25262526psCoord *
    2527 psCoordSkyToTP(psCoord *out,            //!< Coordinates to return, or NULL
    2528                const psExposure *exp,   //!< Exposure description
    2529                const psCoord *coord     //!< input Sky coordinate
    2530                );
     2527psCoordSkyToTP(psCoord *out,            //!< Coordinates to return, or NULL
     2528               const psExposure *exp,   //!< Exposure description
     2529               const psCoord *coord     //!< input Sky coordinate
     2530               );
    25312531\end{verbatim}
    25322532
     
    25342534/** Convert tangent plane coords to focal plane coordinates */
    25352535psCoord *
    2536 psCoordTPtoFPA(psCoord *out,            //!< Coordinates to return, or NULL
    2537                const psFPA *fpa,        //!< FPA description
    2538                const psCoord *coord     //!< input TP coordinate
    2539                );
     2536psCoordTPtoFPA(psCoord *out,            //!< Coordinates to return, or NULL
     2537               const psFPA *fpa,        //!< FPA description
     2538               const psCoord *coord     //!< input TP coordinate
     2539               );
    25402540\end{verbatim}
    25412541
     
    25432543/** converts the specified FPA coord to the coord on the given Chip */
    25442544psCoord *
    2545 psCoordFPAtoChip (psCoord *out,         //!< Coordinates to return, or NULL
    2546                   const psChip *chip,   ///< Chip of interest
    2547                   const psCoord *coord  ///< input FPA coordinate
    2548                   );
     2545psCoordFPAtoChip (psCoord *out,         //!< Coordinates to return, or NULL
     2546                  const psChip *chip,   ///< Chip of interest
     2547                  const psCoord *coord  ///< input FPA coordinate
     2548                  );
    25492549\end{verbatim}
    25502550
     
    25522552/** converts the specified Chip coord to the coord on the given Cell */
    25532553psCoord *
    2554 psCoordChiptoCell (psCoord *out,        //!< Coordinates to return, or NULL
    2555                    const psCell *cell,  ///< Cell of interest
    2556                    const psCoord *coord ///< input Chip coordinate
    2557                    );
     2554psCoordChiptoCell (psCoord *out,        //!< Coordinates to return, or NULL
     2555                   const psCell *cell,  ///< Cell of interest
     2556                   const psCoord *coord ///< input Chip coordinate
     2557                   );
    25582558\end{verbatim}
    25592559
     
    25612561/** converts the specified Cell coord to the coord on the parent Chip */
    25622562psCoord *
    2563 psCoordCelltoChip (psCoord *out,        //!< Coordinates to return, or NULL
    2564                    const psCell *cell,  ///< Cell description
    2565                    const psCoord *coord ///< input Cell coordinate
    2566                    );
     2563psCoordCelltoChip (psCoord *out,        //!< Coordinates to return, or NULL
     2564                   const psCell *cell,  ///< Cell description
     2565                   const psCoord *coord ///< input Cell coordinate
     2566                   );
    25672567\end{verbatim}
    25682568
     
    25702570/** converts the specified Chip coord to the coord on the parent FPA */
    25712571psCoord *
    2572 psCoordChiptoFPA (psCoord *out,         //!< Coordinates to return, or NULL
    2573                   const psChip *chip,   ///< Chip description
    2574                   const psCoord *coord  ///< input Chip coordinate
    2575                   );
     2572psCoordChiptoFPA (psCoord *out,         //!< Coordinates to return, or NULL
     2573                  const psChip *chip,   ///< Chip description
     2574                  const psCoord *coord  ///< input Chip coordinate
     2575                  );
    25762576\end{verbatim}
    25772577
     
    25792579/** Convert focal plane coords to tangent plane coordinates */
    25802580psCoord *
    2581 psCoordFPAToTP(psCoord *out,            //!< Coordinates to return, or NULL
    2582                const psFPA *fpa,        //!< FPA description
    2583                const psCoord *coord     //!< input FPA coordinate
    2584                );
     2581psCoordFPAToTP(psCoord *out,            //!< Coordinates to return, or NULL
     2582               const psFPA *fpa,        //!< FPA description
     2583               const psCoord *coord     //!< input FPA coordinate
     2584               );
    25852585\end{verbatim}
    25862586
     
    25882588/** Convert tangent plane coords to (RA,Dec) */
    25892589psCoord *
    2590 psCoordTPtoSky(psCoord *out,            //!< Coordinates to return, or NULL
    2591                const psExposure *exp,   //!< Exposure description
    2592                const psCoord *coord     //!< input TP coordinate
    2593                );
     2590psCoordTPtoSky(psCoord *out,            //!< Coordinates to return, or NULL
     2591               const psExposure *exp,   //!< Exposure description
     2592               const psCoord *coord     //!< input TP coordinate
     2593               );
    25942594\end{verbatim}
    25952595
     
    25972597/** Convert Cell coords to FPA coordinates */
    25982598psCoord *
    2599 psCoordCellToFPA(psCoord *out,          //!< Coordinates to return, or NULL
    2600                  const psCell *cell,    //!< Cell description
    2601                  const psCoord *coord   //!< Input cell coordinates
    2602                 );
     2599psCoordCellToFPA(psCoord *out,          //!< Coordinates to return, or NULL
     2600                 const psCell *cell,    //!< Cell description
     2601                 const psCoord *coord   //!< Input cell coordinates
     2602                );
    26032603\end{verbatim}
    26042604
     
    26652665/** A struct to define a single item of metadata */
    26662666typedef struct {
    2667     const int id;                       //!< unique ID for this item
    2668     char *restrict name;                //!< Name of item
    2669     psMetaDataType type;                //!< type of this item
    2670     psMetaDataFlags flags;              //!< flags associated with this item
     2667    const int id;                       //!< unique ID for this item
     2668    char *restrict name;                //!< Name of item
     2669    psMetaDataType type;                //!< type of this item
     2670    psMetaDataFlags flags;              //!< flags associated with this item
    26712671    const union {
    2672         float f;                        //!< floating value
    2673         int i;                          //!< integer value
    2674         void *v;                        //!< other type
    2675     } val;                              //!< value of metadata
    2676     char *comment;                      //!< optional comment ("", not NULL)
    2677     psDlist *restrict items;            //!< list of psMetaDataItems with the same name
     2672        float f;                        //!< floating value
     2673        int i;                          //!< integer value
     2674        void *v;                        //!< other type
     2675    } val;                              //!< value of metadata
     2676    char *comment;                      //!< optional comment ("", not NULL)
     2677    psDlist *restrict items;            //!< list of psMetaDataItems with the same name
    26782678} psMetaDataItem;
    26792679\end{verbatim}
     
    26922692\begin{verbatim}
    26932693/** Possible types of metadata. */
    2694 typedef enum {                          //!< type of val is:
    2695     PS_META_ITEM_SET = 0,               //!< NULL; metadata is in psMetaDataType.items
    2696     PS_META_FLOAT,                      //!< float (.f)
    2697     PS_META_INT,                        //!< int (.i)
    2698     PS_META_STR,                        //!< string (.v)
    2699     PS_META_IMG,                        //!< image (.v)
    2700     PS_META_JPEG,                       //!< JPEG (.v)
    2701     PS_META_PNG,                        //!< PNG (.v)
    2702     PS_META_ASTROM,                     //!< astrometric coefficients (.v)
    2703     PS_META_UNKNOWN,                    //!< other (.v)
    2704     PS_META_NTYPE                       //!< Number of types; must be last
     2694typedef enum {                          //!< type of val is:
     2695    PS_META_ITEM_SET = 0,               //!< NULL; metadata is in psMetaDataType.items
     2696    PS_META_FLOAT,                      //!< float (.f)
     2697    PS_META_INT,                        //!< int (.i)
     2698    PS_META_STR,                        //!< string (.v)
     2699    PS_META_IMG,                        //!< image (.v)
     2700    PS_META_JPEG,                       //!< JPEG (.v)
     2701    PS_META_PNG,                        //!< PNG (.v)
     2702    PS_META_ASTROM,                     //!< astrometric coefficients (.v)
     2703    PS_META_UNKNOWN,                    //!< other (.v)
     2704    PS_META_NTYPE                       //!< Number of types; must be last
    27052705} psMetaDataType;
    27062706\end{verbatim}
     
    27312731/** A set of metadata */
    27322732typedef struct {
    2733     psDlist *restrict list;             //!< list of psMetaDataItem
    2734     psHash *restrict table;             //!< hash table of the same metadata
     2733    psDlist *restrict list;             //!< list of psMetaDataItem
     2734    psHash *restrict table;             //!< hash table of the same metadata
    27352735} psMetaDataSet;
    27362736\end{verbatim}
     
    28152815/** Constructor */
    28162816psMetaDataItem *psMetaDataItemAlloc(int typeFlags, //!< type of this piece of metadata + flags
    2817                                     const void *val, //!< value of new item N.b. a pointer even if the item
    2818                                                      //!< is of type e.g. int
    2819                                     const char *comment, //!< comment associated with item
    2820                                     const char *name, //!< name of new item of metadata (may be in sprintf
    2821                                                       //!< format)
    2822                                     ... //!< possible arguments for name format
     2817                                    const void *val, //!< value of new item N.b. a pointer even if the item
     2818                                                     //!< is of type e.g. int
     2819                                    const char *comment, //!< comment associated with item
     2820                                    const char *name, //!< name of new item of metadata (may be in sprintf
     2821                                                      //!< format)
     2822                                    ... //!< possible arguments for name format
    28232823    );
    28242824
     
    28372837/// Add entry to the end of the metadata set
    28382838psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, //!< Metadata set to add to
    2839                                 psMetaDataItem *restrict item //!< Metatdata to add
     2839                                psMetaDataItem *restrict item //!< Metatdata to add
    28402840    );
    28412841
    28422842/// delete entry from the metadata set
    28432843psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, //!< Metadata set to delete from
    2844                                 const char *restrict key //!< Key to delete
     2844                                const char *restrict key //!< Key to delete
    28452845    );
    28462846
     
    28512851/// get the next entry in the sequence
    28522852psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, //!< Metadata set to get from
    2853                                   const char *restrict match //!< Match this
     2853                                  const char *restrict match //!< Match this
    28542854    );
    28552855
    28562856/// find the metadata with the specified key
    28572857psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, //!< Metadata set to look up
    2858                                 const char *restrict key //!< Key to find
     2858                                const char *restrict key //!< Key to find
    28592859    );
    28602860
    28612861/// print metadata item to the specified stream
    2862 void psMetaDataItemPrint(FILE *fd,              //!< file descriptor to write to
    2863                         const psMetaDataItem *restrict ms, //!< item of metadata to print
    2864                          const char *prefix        //!< print this at the beginning of each line
     2862void psMetaDataItemPrint(FILE *fd,              //!< file descriptor to write to
     2863                        const psMetaDataItem *restrict ms, //!< item of metadata to print
     2864                         const char *prefix        //!< print this at the beginning of each line
    28652865    );
    28662866\end{verbatim}
     
    29272927/** apply the coordinate transformation to the given coordinate */
    29282928psCoord *psCoordXformApply (psCoord *out, //!< Output coordinates, or NULL
    2929                             const psCoordXform *frame, ///< coordinate transformation
    2930                             const psCoord *coords ///< input coordiate
     2929                            const psCoordXform *frame, ///< coordinate transformation
     2930                            const psCoord *coords ///< input coordiate
    29312931    );
    29322932\end{verbatim}
     
    29352935/** apply the optical distortion to the given coordinate, magnitude, color */
    29362936psCoord *psDistortionApply (psCoord *out, //!< Output coordinates, or NULL
    2937                             const psdistortion *pattern, ///< optical distortion pattern
    2938                             const psCoord *coords, ///< input coordinate
    2939                             float mag,  ///< magnitude of object
    2940                             float color ///< color of object
     2937                            const psdistortion *pattern, ///< optical distortion pattern
     2938                            const psCoord *coords, ///< input coordinate
     2939                            float mag,  ///< magnitude of object
     2940                            float color ///< color of object
    29412941    );
    29422942\end{verbatim}
     
    29522952psCoord *
    29532953psGetOffset(const psCoord *restrict position1, //!< Position 1
    2954             const psCoord *restrict position2, //!< Position 2
    2955             const char *type            //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     2954            const psCoord *restrict position2, //!< Position 2
     2955            const char *type            //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
    29562956    );
    29572957\end{verbatim}
     
    29612961psCoord *
    29622962psApplyOffset(const psCoord *restrict position, //!< Position
    2963               const psCoord *restrict offset, //!< Offset
    2964               const char *type          //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     2963              const psCoord *restrict offset, //!< Offset
     2964              const char *type          //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
    29652965    );
    29662966\end{verbatim}
     
    29752975/** Get Sun Position */
    29762976psCoord *
    2977 psGetSunPos(float mjd                   //!< MJD to get position for
     2977psGetSunPos(float mjd                   //!< MJD to get position for
    29782978    );
    29792979\end{verbatim}
     
    29822982/** Get Moon position */
    29832983psCoord *
    2984 psGetMoonPos(float mjd,                 //!< MJD to get position for
    2985              double latitude,           //!< Latitude for apparent position
    2986              double longitude           //!< Longitude for apparent position
     2984psGetMoonPos(float mjd,                 //!< MJD to get position for
     2985             double latitude,           //!< Latitude for apparent position
     2986             double longitude           //!< Longitude for apparent position
    29872987    );
    29882988\end{verbatim}
     
    29912991/** Get Moon phase */
    29922992float
    2993 psGetMoonPhase(float mjd                //!< MJD to get phase for
     2993psGetMoonPhase(float mjd                //!< MJD to get phase for
    29942994    );
    29952995\end{verbatim}
     
    29992999psCoord *
    30003000psGetSolarSystemPos(const char *solarSystemObject, //!< Named S.S. object
    3001                     float mjd           //!< MJD to get position for
     3001                    float mjd           //!< MJD to get position for
    30023002    );
    30033003\end{verbatim}
Note: See TracChangeset for help on using the changeset viewer.