IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9537


Ignore:
Timestamp:
Oct 13, 2006, 10:46:29 AM (20 years ago)
Author:
Paul Price
Message:

Synchronising with code. Adding new functions, renaming others.
General cleanup (missing semicolons was breaking comparison with code;
got rid of comments on functions; shortened some lines).

File:
1 edited

Legend:

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

    r9525 r9537  
    1 %%% $Id: psLibSDRS.tex,v 1.431 2006-10-13 00:30:38 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.432 2006-10-13 20:46:29 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    276276
    277277\begin{prototype}
    278 const char *psLibVersion(void);
     278psString psLibVersion(void);
    279279\end{prototype}
    280280
     
    735735psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func);
    736736psMemId psMemGetId(void);
     737psMemId psMemGetLastId(void);
    737738\end{prototype}
    738739%
    739740The callback functions are called with a pointer to the corresponding
    740741memory block.  The routines \code{psMemFreeCallbackIDSet} and
    741 \code{psMemAllocCallbackIDSet} accept the desired ID value and return the
    742 old value to the user.  The return values of the handlers installed by
    743 \code{psMemAllocCallbackSet} and \code{psMemFreeCallbackSet} are
    744 used to increment the values of \code{p_psMemAllocID} and
    745 \code{p_psMemFreeID} respectively.  For example, a return value of
    746 \code{0} implies that the value is unchanged; if the value is \code{2}
    747 the callback will be called again when the memory ID counter has
    748 increased by two.  This functionality may be useful to check, for
    749 example, every 100th block allocated.  The function \code{psMemGetId}
    750 returns the next identification number to be assigned to a memory
    751 block.  This function can be used to guide the choice of ID set with
    752 the functions above.
     742\code{psMemAllocCallbackIDSet} accept the desired ID value and return
     743the old value to the user.  The return values of the handlers
     744installed by \code{psMemAllocCallbackSet} and
     745\code{psMemFreeCallbackSet} are used to increment the values of
     746\code{p_psMemAllocID} and \code{p_psMemFreeID} respectively.  For
     747example, a return value of \code{0} implies that the value is
     748unchanged; if the value is \code{2} the callback will be called again
     749when the memory ID counter has increased by two.  This functionality
     750may be useful to check, for example, every 100th block allocated.  The
     751function \code{psMemGetId} returns the next identification number to
     752be assigned to a memory block, while \code{psMemGetLastId} returns the
     753last identification number to be assigned.  These functions can be
     754used to guide the choice of ID set with the functions above.
    753755
    754756\subsubsection{Memory Tracing and Corruption Checks}
     
    794796argument \code{abort_on_error} is true, \code{psMemCheckCorruption}
    795797must call \code{psAbort} as soon as memory corruption is detected.
     798
     799\begin{prototype}
     800size_t psMemStats(const bool print, size_t *allocated, size_t *persistent, size_t *freelist);
     801\end{prototype}
     802
     803\code{psMemStats} returns the total amount of memory consumed by
     804psLib.  If \code{print} is \code{true}, also prints a summary of the
     805memory usage.  If \code{allocated}, \code{persistent} or
     806\code{freelist} are non-\code{NULL}, the function returns in those
     807variables the amount of memory that's allocated and non-persistent,
     808allocated and persistent, or waiting to be recycled, respectively.
     809
    796810
    797811\subsubsection{Reference Counting}
     
    818832psPtr psMemIncrRefCounter(const psPtr ptr);
    819833psPtr psMemDecrRefCounter(psPtr ptr);
     834psPtr psMemSetRefCounter(psPtr ptr, psReferenceCount count);
    820835\end{prototype}
    821836%
     
    824839If \code{vptr} is \code{NULL}, this function must return a value of
    825840NULL.  The next two functions increment or decrement the reference
    826 counter, returning the pointer which was passed in. These functions
    827 must validate the memory pointer by determining the corresponding
     841counter, returning the pointer which was passed in.  The final
     842function explicitly sets the value of the reference counter (and
     843should therefore be used sparingly, if ever!).  These functions must
     844validate the memory pointer by determining the corresponding
    828845\code{psMemBlock.id} and checking for consistency in the internal
    829846memory block table (the table pointer for \code{psMemBlock.id} must be
     
    922939a string into \code{psAlloc}-ed memory:
    923940\begin{prototype}
     941psString psStringAlloc(long nChar);
    924942psString psStringCopy(const char *string);
    925943psString psStringNCopy(const char *string, unsigned int nChar);
    926944\end{prototype}
    927945
    928 \code{psStringCopy} shall perform a deep copy of the \code{string} into
    929 \code{psAlloc}-ed memory.  \code{psStringNCopy} shall do the same, up to a
    930 maximum of \code{nChar} characters.  Both copy functions shall ``pass through''
    931 \code{NULL} values without generating an error.
     946\code{psStringAlloc} shall allocate a \code{psString} of length
     947\code{nChar}.  \code{psStringCopy} shall perform a deep copy of the
     948\code{string} into a new \code{psString}.  \code{psStringNCopy} shall
     949do the same, up to a maximum of \code{nChar} characters.  Both copy
     950functions shall ``pass through'' \code{NULL} values without generating
     951an error.
    932952
    933953We also specify two useful functions:
    934954
    935955\begin{prototype}
    936 ssize_t psStringAppend(char **dest, const char *format, ...)
    937 ssize_t psStringPrepend(char **dest, const char *format, ...)
     956ssize_t psStringAppend(char **dest, const char *format, ...);
     957ssize_t psStringPrepend(char **dest, const char *format, ...);
     958ssize_t psStringAppendV(char **dest, const char *format, va_list va);
     959ssize_t psStringPrependV(char **dest, const char *format, va_list va);
    938960\end{prototype}
    939961
     
    943965terminator) shall be returned.  \code{psStringPrepend} shall do
    944966similarly, except it shall prepend to the \code{dest} string.
     967\code{psStringAppendV} and \code{psStringPrependV} are the var-args
     968versions of these functions.
    945969
    946970Other string manipulation functions are listed below.
     
    948972\begin{prototype}
    949973psList *psStringSplit(const char *string, const char *splitters, bool multipleAreSignificant);
     974psArray *psStringSplitArray(const char *string, const char *splitters, bool multipleAreSignificant);
    950975\end{prototype}
    951976
     
    955980length should not be included in the output list if
    956981\code{multipleAreSignificant} is \code{true}.
     982\code{psStringSplitArray} does the same, but returns the result as a
     983\code{psArray}.
    957984
    958985String whitespace from head and tail of string:
     
    10021029bool psLineAdd(psLine *line, const char *format, ...);
    10031030\end{prototype}
     1031
     1032\subsubsection{File Input}
     1033
     1034To simplify the process of reading a file, we define:
     1035\begin{prototype}
     1036psString psSlurpFD(int fd);
     1037psString psSlurpFile(FILE *stream);
     1038\end{prototype}
     1039
     1040\code{psSlurpFD} shall read the nominated file descriptor, \code{fd},
     1041and return the contents as a \code{psString}.  \code{psSlurpFile} does
     1042similarly, but based on a file \code{stream}.
    10041043
    10051044\subsubsection{Type information}
     
    11201159bool psMemCheckImage(psPtr ptr);
    11211160bool psMemCheckKernel(psPtr ptr);
     1161bool psMemCheckLine(psPtr ptr);
    11221162bool psMemCheckList(psPtr ptr);
    11231163bool psMemCheckLookupTable(psPtr ptr);
     
    11341174bool psMemCheckPolynomial4D(psPtr ptr);
    11351175bool psMemCheckProjection(psPtr ptr);
     1176bool psMemCheckRegion(psPtr ptr);
    11361177bool psMemCheckScalar(psPtr ptr);
    11371178bool psMemCheckSphere(psPtr ptr);
     
    11391180bool psMemCheckSpline1D(psPtr ptr);
    11401181bool psMemCheckStats(psPtr ptr);
     1182bool psMemCheckString(psPtr ptr);
    11411183bool psMemCheckTime(psPtr ptr);
    11421184bool psMemCheckVector(psPtr ptr);
     
    13511393of the code is compiled.  This can be implemented via macro front-ends
    13521394to private versions of the user APIs.  In addition, a function
    1353 \code{void psTraceReset(void)} will free memory used by \code{psTrace}
    1354 functions, effectively resetting all trace levels to 0.
     1395\code{psTraceReset} will free memory used by \code{psTrace}
     1396functions, effectively resetting all trace levels to 0:
     1397\begin{prototype}
     1398void psTraceReset(void);
     1399\end{prototype}
    13551400
    13561401The trace may optionally be written to a file or other output
     
    16591704\code{psErrorCodeLast} returns the last error code:
    16601705\begin{prototype}
    1661 psErrorCode psErrorCodeLast(void)
     1706psErrorCode psErrorCodeLast(void);
    16621707\end{prototype}
    16631708
     
    20272072
    20282073\begin{prototype}
    2029 bool psArrayRemove(psArray *array, const psPtr data);
    2030 \end{prototype}
    2031 
    2032 This function removes all entries of \code{value} in the \code{array},
    2033 reducing the total number of elements of \code{array} as needed.
     2074bool psArrayRemoveData(psArray *array, const psPtr data);
     2075\end{prototype}
     2076
     2077This function removes all entries of \code{data} in the \code{array},.
    20342078Returns \code{TRUE} if any elements were removed, otherwise
    20352079\code{FALSE}.
     2080
     2081\begin{prototype}
     2082bool psArrayRemoveIndex(psArray *array, long index);
     2083\end{prototype}
     2084
     2085This function removes the \code{array} element at the specified
     2086\code{index}, returning \code{true} upon success.
    20362087
    20372088\begin{prototype}
     
    22852336
    22862337\begin{prototype}
    2287 bool psListRemove(psList *list, long location)
     2338bool psListRemove(psList *list, long location);
    22882339bool psListRemoveData(psList *list, psPtr data);
    22892340\end{prototype}
     
    25332584psBitSet *psBitSetSet(psBitSet *bitSet, long bit);
    25342585psBitSet* psBitSetClear(psBitSet *bitSet, long bit);
    2535 psBitSet *psBitSetOp(psBitSet *outBitSet, const psBitSet *inBitSet1, const char *operator, const psBitSet *inBitSet2);
     2586psBitSet *psBitSetOp(psBitSet *outBitSet, const psBitSet *inBitSet1,
     2587                     const char *operator, const psBitSet *inBitSet2);
    25362588psBitSet *psBitSetNot(psBitSet *outBitSet, const psBitSet *inBitSet);
    25372589bool psBitSetTest(const psBitSet *bitSet, long bit);
     
    27562808psMetadataItem* psMetadataItemAllocF32(const char* name, const char* comment, psF32 value);
    27572809psMetadataItem* psMetadataItemAllocF64(const char* name, const char* comment, psF64 value);
     2810psMetadataItem* psMetadataItemAllocS8(const char* name, const char* comment, psS8 value);
     2811psMetadataItem* psMetadataItemAllocS16(const char* name, const char* comment, psS16 value);
    27582812psMetadataItem* psMetadataItemAllocS32(const char* name, const char* comment, psS32 value);
     2813psMetadataItem* psMetadataItemAllocS64(const char* name, const char* comment, psS64 value);
     2814psMetadataItem* psMetadataItemAllocU8(const char* name, const char* comment, psU8 value);
     2815psMetadataItem* psMetadataItemAllocU16(const char* name, const char* comment, psU16 value);
     2816psMetadataItem* psMetadataItemAllocU32(const char* name, const char* comment, psU32 value);
     2817psMetadataItem* psMetadataItemAllocU64(const char* name, const char* comment, psU64 value);
    27592818psMetadataItem* psMetadataItemAllocBool(const char* name, const char* comment, bool value);
    27602819psMetadataItem* psMetadataItemAllocPtr(const char* name, psDataType type, const char* comment, psPtr value);
     
    29132972are specified:
    29142973\begin{prototype}
     2974bool psMetadataAddPtr(psMetadata* md, long location, const char* name, psDataType type,
     2975                      const char* comment, psPtr value);
    29152976bool psMetadataAddStr(psMetadata* md, long location, const char* name, int format,
    29162977                      const char* comment, const char* value);
     
    29232984bool psMetadataAddBool(psMetadata* md, long location, const char* name, int format,
    29242985                       const char* comment, bool value);
    2925 bool psMetadataAddPtr(psMetadata* md, long location, const char* name, psDataType type,
    2926                       const char* comment, psPtr value);
     2986bool psMetadataAddList(psMetadata* md, long location, const char* name, int format,
     2987                       const char* comment, psList *value);
     2988bool psMetadataAddVector(psMetadata* md, long location, const char* name, int format,
     2989                       const char* comment, psVector *value);
     2990bool psMetadataAddArray(psMetadata* md, long location, const char* name, int format,
     2991                       const char* comment, psArray *value);
     2992bool psMetadataAddImage(psMetadata* md, long location, const char* name, int format,
     2993                       const char* comment, psImage *value);
     2994bool psMetadataAddTime(psMetadata* md, long location, const char* name, int format,
     2995                       const char* comment, psTime *value);
     2996bool psMetadataAddHash(psMetadata* md, long location, const char* name, int format,
     2997                       const char* comment, psHash *value);
     2998bool psMetadataAddLookupTable(psMetadata* md, long location, const char* name, int format,
     2999                       const char* comment, psLookupTable *value);
     3000bool psMetadataAddMetadata(psMetadata* md, long location, const char* name, int format,
     3001                       const char* comment, psMetadata *value);
     3002bool psMetadataAddUnknown(psMetadata* md, long location, const char* name, int format,
     3003                       const char* comment, psPtr value);
    29273004\end{prototype}
    29283005
     
    29553032is set to reflect the success or failure of the lookup.
    29563033\begin{prototype}
    2957 psString psMetadataLookupStr(bool *status, const psMetadata *md, const char *key);
     3034bool psMetadataLookupBool(bool *status, const psMetadata *md, const char *key);
     3035psS8  psMetadataLookupS8(bool *status, const psMetadata *md, const char *key);
     3036psS16 psMetadataLookupS16(bool *status, const psMetadata *md, const char *key);
    29583037psS32 psMetadataLookupS32(bool *status, const psMetadata *md, const char *key);
     3038psS64 psMetadataLookupS64(bool *status, const psMetadata *md, const char *key);
     3039psU8  psMetadataLookupU8(bool *status, const psMetadata *md, const char *key);
     3040psU16 psMetadataLookupU16(bool *status, const psMetadata *md, const char *key);
     3041psU32 psMetadataLookupU32(bool *status, const psMetadata *md, const char *key);
     3042psU64 psMetadataLookupU64(bool *status, const psMetadata *md, const char *key);
    29593043psF32 psMetadataLookupF32(bool *status, const psMetadata *md, const char *key);
    29603044psF64 psMetadataLookupF64(bool *status, const psMetadata *md, const char *key);
    2961 bool psMetadataLookupBool(bool *status, const psMetadata *md, const char *key);
    29623045psPtr psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key);
     3046psString psMetadataLookupStr(bool *status, const psMetadata *md, const char *key);
     3047psMetadata *psMetadataLookupMetadata(bool *status, const psMetadata *md, const char *key);
    29633048\end{prototype}
    29643049
     
    30793164
    30803165\begin{prototype}
    3081 psMetadata *psMetadataConfigParse(psMetadata *md, unsigned int *nFail, const char *str, bool overwrite);
    3082 psMetadata *psMetadataConfigRead(psMetadata *md, unsigned int *nFail, const char *filename, bool overwrite);
     3166psMetadata *psMetadataConfigParse(psMetadata *md, unsigned int *nFail,
     3167                                  const char *str, bool overwrite);
     3168psMetadata *psMetadataConfigRead(psMetadata *md, unsigned int *nFail,
     3169                                 const char *filename, bool overwrite);
    30833170\end{prototype}
    30843171
     
    33783465The constructor shall be:
    33793466\begin{prototype}
    3380 psLookupTable *psLookupTableAlloc(const char *filename, ///< File from which to read
    3381                                   const char *format,   ///< scanf-like format string
    3382                                   long indexCol         ///< Column of the index vector (starting at zero)
    3383                                   );
     3467psLookupTable *psLookupTableAlloc(const char *filename, const char *format,
     3468                                  long indexCol);
    33843469\end{prototype}
    33853470This function shall allocate a \code{psLookupTable}, and set the
     
    33913476
    33923477\begin{prototype}
    3393 psLookupTable *psLookupTableImport(psLookupTable *table,    ///< Lookup table into which to import
    3394                                    const psArray *vectors,  ///< Array of vectors
    3395                                    long indexCol            ///< Index of the index vector in the array of vectors
    3396                                    );
     3478psLookupTable *psLookupTableImport(psLookupTable *table, const psArray *vectors,
     3479                                   long indexCol);
    33973480\end{prototype}
    33983481\code{psLookupTableImport} shall import an array of vectors into a
     
    36813764the data range starting at \code{lower}, running to \code{upper}, in
    36823765steps of \code{delta}.  The upper-end value is {\em exclusive}; the
    3683 sequence is equivalent to \code{for (x = lower; x < upper; x +=
    3684   delta)}.
     3766sequence is equivalent to \code{for (x = lower; x < upper; x += delta)}.
     3767
     3768\begin{prototype}
     3769psString psVectorToString(const psVector *vector);
     3770\end{prototype}
     3771
     3772This function returns a string containing the values in the \code{vector},
     3773separated by whitespace.  This function is useful for testing and output.
    36853774
    36863775%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    37553844
    37563845\begin{prototype}
    3757 psImage* psImageRecycle(
    3758     psImage* old,                       ///< the psImage to recycle by resizing image buffer
    3759     int numCols,                        ///< the desired number of columns in image
    3760     int numRows,                        ///< the desired number of rows in image
    3761     const psElemType type               ///< the desired datatype of the image
    3762 );
     3846psImage* psImageRecycle(psImage* old, int numCols, int numRows, const psElemType type);
    37633847\end{prototype}
    37643848\code{psImageRecycle} shall recycle the input \code{old} image, such
     
    39063990\subsection{XML Functions}
    39073991
     3992\tbd{The XML code is currently disabled in psLib.  Instead, we use the
     3993metadata config files as a transport mechanism.}
     3994
    39083995Within Pan-STARRS, we will use XML documents as a transport mechanism
    39093996to carry data between programs and between IPP and other subsystems.
     
    40914178
    40924179\begin{prototype}
    4093 psArray *psDBSelectRows(psDB *dbh, const char *tableName, const psMetadata *where, unsigned long long limit);
     4180psArray *psDBSelectRows(psDB *dbh, const char *tableName, const psMetadata *where,
     4181                        unsigned long long limit);
    40944182\end{prototype}
    40954183
     
    41454233
    41464234\begin{prototype}
    4147 long psDBDeleteRows(psDB *dbh, const char *tableName, const psMetadata *where, unsigned long long limit);
     4235long psDBDeleteRows(psDB *dbh, const char *tableName, const psMetadata *where,
     4236                    unsigned long long limit);
    41484237\end{prototype}
    41494238
     
    41544243
    41554244\begin{prototype}
    4156 long psDBLastInsertID(
    4157     psDB *dbh                          ///< Database handle
    4158 );
     4245long psDBLastInsertID(psDB *dbh);
    41594246\end{prototype}
    41604247
    41614248Returns the last value created in an ``auto-increment'' field.
     4249
     4250
     4251\begin{prototype}
     4252psString psDBGenerateWhereConditionSQL(const psMetadata *where, const char *tableName);
     4253psString psDBGenerateWhereSQL(const psMetadata *where, const char *tableName);
     4254\end{prototype}
     4255
     4256\code{psDBGenerateWhereConditionSQL} shall generate a SQL fragment
     4257consisting of the \code{WHERE} condition, based on the \code{where}
     4258metadata format.
     4259
     4260\code{psDBGenerateWhereSQL} shall append ``where'' to the front of
     4261the SQL fragment returned by \code{psDBGenerateWhereConditionSQL}.
    41624262
    41634263
     
    41704270
    41714271\begin{prototype}
    4172 bool psDBExplicitTrans(
    4173     psDB *dbh,                          ///< Database handle
    4174     bool mode                           ///< transactions enable/disable
    4175 );
    4176 \end{prototype}
    4177 
    4178 Enable/Disable explicit transactions.  When enabled \code{psDBCommit()} must
    4179 be called to make changes to the database's state persistent.
    4180 
    4181 \begin{prototype}
    4182 bool psDBTransaction(
    4183     psDB *dbh                           ///< Database handle
    4184 );
     4272bool psDBExplicitTrans(psDB *dbh, bool mode);
     4273\end{prototype}
     4274
     4275Enable/Disable explicit transactions (accordinte to \code{mode}).
     4276When enabled \code{psDBCommit()} must be called to make changes to the
     4277database's state persistent.
     4278
     4279\begin{prototype}
     4280bool psDBTransaction(psDB *dbh);
    41854281\end{prototype}
    41864282
     
    41884284
    41894285\begin{prototype}
    4190 bool psDBCommit(
    4191     psDB *dbh                           ///< Database handle
    4192 );
     4286bool psDBCommit(psDB *dbh);
    41934287\end{prototype}
    41944288
     
    41964290
    41974291\begin{prototype}
    4198 bool psDBRollback(
    4199     psDB *dbh                           ///< Database handle
    4200 );
     4292bool psDBRollback(psDB *dbh);
    42014293\end{prototype}
    42024294
     
    42124304
    42134305\begin{prototype}
    4214 long p_psDBRunQueryPrepared(
    4215     psDB *dbh,                          ///< Database handle
    4216     const psArray *rowSet,              ///< row data as psArray of psMetadata
    4217     const char *format,                 ///< SQL string to execute
    4218     ...
    4219 );
     4306long p_psDBRunQueryPrepared(psDB *dbh, const psArray *rowSet,
     4307                            const char *format, ...);
    42204308\end{prototype}
    42214309
     
    42264314
    42274315\begin{prototype}
    4228 psArray *p_psDBFetchResult(
    4229     psDB *dbh                          ///< Database handle
    4230 );
     4316psArray *p_psDBFetchResult(psDB *dbh);
    42314317\end{prototype}
    42324318
     
    44494535\code{psF32}, \code{psF64}).  The user is expected to convert the data
    44504536type as needed with \code{psImageCopy}.
     4537
     4538\begin{prototype}
     4539psImage *psFitsReadImageBuffer(psImage *output, const psFits *fits,
     4540                               psRegion region, int z);
     4541\end{prototype}
     4542As for \code{psFitsReadImage}, but read into the extant
     4543\code{output} image.                             
    44514544 
    44524545\begin{prototype}
     
    45024595psArray *psFitsReadImageCube(const psFits *fits, psRegion region);
    45034596bool psFitsUpdateImageCube(psFits *fits, const psArray *input, int x0, int y0);
    4504 bool psFitsWriteImageCube(psFits *fits, psMetadata *header, const psArray
    4505 *input, const char *extname);
    4506 bool psFitsInsertImageCube(psFits *fits, psMetadata *header, const psArray
    4507 *input, const char *extname, bool after);
     4597bool psFitsWriteImageCube(psFits *fits, psMetadata *header, const psArray *input,
     4598                          const char *extname);
     4599bool psFitsInsertImageCube(psFits *fits, psMetadata *header, const psArray *input,
     4600                          const char *extname, bool after);
    45084601\end{prototype}
    45094602
     
    47234816
    47244817\begin{prototype}
    4725 psStats *psVectorStats(psStats *stats,
    4726                        const psVector *in,
    4727                        const psVector *errors,
    4728                        const psVector *mask,
    4729                        psMaskType maskVal);
     4818psStats *psVectorStats(psStats *stats, const psVector *in, const psVector *errors,
     4819                       const psVector *mask, psMaskType maskVal);
    47304820\end{prototype}
    47314821%
     
    49145004values.  It alters and returns the histogram \code{out} structure.
    49155005\begin{prototype}
    4916 psHistogram *psVectorHistogram(psHistogram *out,
    4917                                const psVector *values,
    4918                                const psVector *errors,
    4919                                const psVector *mask,
     5006psHistogram *psVectorHistogram(psHistogram *out, const psVector *values,
     5007                               const psVector *errors, const psVector *mask,
    49205008                               psMaskType maskVal);
    49215009\end{prototype}
     
    49975085To evaluate the polynomials at specific coordinates, we define:
    49985086\begin{prototype}
    4999 psF64 psPolynomial1DEval(const psPolynomial1D *poly,
    5000                          psF64 x);
    5001 psF64 psPolynomial2DEval(const psPolynomial2D *poly,
    5002                          psF64 x,
    5003                          psF64 y);               
    5004 psF64 psPolynomial3DEval(const psPolynomial3D *poly,
    5005                          psF64 x,
    5006                          psF64 y,
    5007                          psF64 z);                 
    5008 psF64 psPolynomial4DEval(const psPolynomial4D *poly,
    5009                          psF64 x,
    5010                          psF64 y,
    5011                          psF64 z,
    5012                          psF64 t);
     5087psF64 psPolynomial1DEval(const psPolynomial1D *poly, psF64 x);
     5088psF64 psPolynomial2DEval(const psPolynomial2D *poly, psF64 x, psF64 y);               
     5089psF64 psPolynomial3DEval(const psPolynomial3D *poly, psF64 x, psF64 y, psF64 z);                 
     5090psF64 psPolynomial4DEval(const psPolynomial4D *poly, psF64 x, psF64 y, psF64 z, psF64 t);
    50135091\end{prototype}
    50145092
    50155093In the event that several evaluations are required, we also define:
    50165094\begin{prototype}
    5017 psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly,
    5018                                    const psVector *x);
    5019 psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly,
    5020                                    const psVector *x,
     5095psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly, const psVector *x);
     5096psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly, const psVector *x,
    50215097                                   const psVector *y);
    5022 psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly,
    5023                                    const psVector *x,
    5024                                    const psVector *y,
    5025                                    const psVector *z);
    5026 psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly,
    5027                                    const psVector *x,
    5028                                    const psVector *y,
    5029                                    const psVector *z,
     5098psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly, const psVector *x,
     5099                                   const psVector *y, const psVector *z);
     5100psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly, const psVector *x,
     5101                                   const psVector *y, const psVector *z,
    50305102                                   const psVector *t);
    50315103\end{prototype}
     
    50375109evaluation, those coefficients that have the corresponding \code{mask}
    50385110element non-zero shall not be evaluated.
     5111
     5112\subsubsubsection{Conversion to Metadata}
     5113
     5114In order to facilitate storing polynomials in metadata configuration
     5115files, we supply functions to convert between polynomials and
     5116metadata containers.
     5117
     5118\begin{prototype}
     5119psPOlynomial2D *psPolynomial2DfromMetadata(psMetadata *folder);
     5120psPOlynomial3D *psPolynomial3DfromMetadata(psMetadata *folder);
     5121psPOlynomial4D *psPolynomial4DfromMetadata(psMetadata *folder);
     5122psPOlynomial2D *psPolynomial2DtoMetadata(psMetadata *md,
     5123                                         const psPolynomial2D *poly,
     5124                                         const char *format, ...);
     5125psPOlynomial3D *psPolynomial3DtoMetadata(psMetadata *md,
     5126                                         const psPolynomial3D *poly,
     5127                                         const char *format, ...);
     5128psPOlynomial4D *psPolynomial4DtoMetadata(psMetadata *md,
     5129                                         const psPolynomial4D *poly,
     5130                                         const char *format, ...);
     5131\end{prototype}
     5132
     5133The \code{psPolynomial?DfromMetadata} functions shall create a
     5134\code{psMetadata} folder with \code{psPolynomial?D} information.  The
     5135first two elements of the metadata folder shall specify the order of
     5136the x and y variables, \code{NORDER_X}, \code{NORDER_Y}, etc.  The
     5137following elements shall be the values of the coefficients and the
     5138coefficient errors (i.e., \code{VAL_X00_Y00}, \code{ERR_X00_Y00},
     5139etc.).  The input polynomial must be of ordinary type and have a valid
     5140name format.  \code{false} is returned if any inputs are \code{NULL}.
     5141If a particular mask element is non-zero, that polynomial coefficient
     5142(and error) are skipped.
     5143
     5144The \code{psPolynomial?DtoMetadata} functions shall parse a psMetadata
     5145container with \code{psPolynomial?D} information.  The first three
     5146elements of the metadata folder specify the order of the x, y, & z
     5147variables.  (i.e., \code{NORDER_X}, \code{NORDER_Y}, etc.).  The
     5148following elements are the values of the coefficients and the
     5149coefficient errors.  (i.e., \code{VAL_X00_Y00}, \code{ERR_X00_Y00},
     5150etc.).  If the orders or any coefficients are missing or have
     5151incorrect syntax, \code{NULL} is returned.
    50395152
    50405153\subsubsection{Splines}
     
    51935306
    51945307\begin{prototype}
    5195 bool psMinimizeLMChi2(psMinimization *min,
    5196                       psImage *covar,
    5197                       psVector *params,
    5198                       psMinConstrain *constrain,
    5199                       const psArray  *x,
    5200                       const psVector *y,
    5201                       const psVector *yWt,
     5308bool psMinimizeLMChi2(psMinimization *min, psImage *covar, psVector *params,
     5309                      psMinConstrain *constrain, const psArray  *x,
     5310                      const psVector *y, const psVector *yWt,
    52025311                      psMinimizeLMChi2Func func);
    52035312\end{prototype}
     
    52425351
    52435352\begin{prototype}
    5244 bool psMinimizeGaussNewtonDelta(psVector *delta,
    5245                                 const psVector *params,
    5246                                 const psVector *paramMask,
    5247                                 const psArray  *x,
    5248                                 const psVector *y,
    5249                                 const psVector *yErr,
     5353bool psMinimizeGaussNewtonDelta(psVector *delta, const psVector *params,
     5354                                const psVector *paramMask, const psArray  *x,
     5355                                const psVector *y, const psVector *yErr,
    52505356                                psMinimizeLMChi2Func func);
    52515357\end{prototype}
     
    52755381
    52765382\begin{prototype}
    5277 bool psMinimizePowell(psMinimization *min,
    5278                       psVector *params,
    5279                       const psVector *paramMask,
    5280                       const psArray *coords,
    5281                       psMinimizePowellFunc func);
     5383bool psMinimizePowell(psMinimization *min, psVector *params, const psVector *paramMask,
     5384                      const psArray *coords, psMinimizePowellFunc func);
    52825385\end{prototype}
    52835386
     
    52965399
    52975400\begin{prototype}
    5298 bool psMinimizeChi2Powell(psMinimization *min,
    5299                           psVector *params,
    5300                           psMinConstrain *constrain,
    5301                           const psArray *coords,
    5302                           const psVector *value,
    5303                           const psVector *error,
     5401bool psMinimizeChi2Powell(psMinimization *min, psVector *params,
     5402                          psMinConstrain *constrain, const psArray *coords,
     5403                          const psVector *value, const psVector *error,
    53045404                          psMinimizeChi2PowellFunc model);
    53055405\end{prototype}
     
    53335433
    53345434\begin{prototype}
    5335 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D *poly,
    5336                                         const psVector *mask,
    5337                                         psMaskType      maskValue,
    5338                                         const psVector *f,
    5339                                         const psVector *fErr,
    5340                                         const psVector *x);
    5341 psPolynomial2D *psVectorFitPolynomial2D(psPolynomial2D *poly,
    5342                                         const psVector *mask,
    5343                                         psMaskType      maskValue,
    5344                                         const psVector *f,
    5345                                         const psVector *fErr,
    5346                                         const psVector *x,
     5435psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D *poly, const psVector *mask,
     5436                                        psMaskType maskValue, const psVector *f,
     5437                                        const psVector *fErr, const psVector *x);
     5438psPolynomial2D *psVectorFitPolynomial2D(psPolynomial2D *poly, const psVector *mask,
     5439                                        psMaskType maskValue, const psVector *f,
     5440                                        const psVector *fErr, const psVector *x,
    53475441                                        const psVector *y);
    5348 psPolynomial3D *psVectorFitPolynomial3D(psPolynomial3D *poly,
    5349                                         const psVector *mask,
    5350                                         psMaskType      maskValue,
    5351                                         const psVector *f,
    5352                                         const psVector *fErr,
    5353                                         const psVector *x,
    5354                                         const psVector *y,
    5355                                         const psVector *z);
    5356 psPolynomial4D *psVectorFitPolynomial4D(psPolynomial4D *poly,
    5357                                         const psVector *mask,
    5358                                         psMaskType      maskValue,
    5359                                         const psVector *f,
    5360                                         const psVector *fErr,
    5361                                         const psVector *x,
    5362                                         const psVector *y,
    5363                                         const psVector *z,
     5442psPolynomial3D *psVectorFitPolynomial3D(psPolynomial3D *poly, const psVector *mask,
     5443                                        psMaskType maskValue, const psVector *f,
     5444                                        const psVector *fErr, const psVector *x,
     5445                                        const psVector *y, const psVector *z);
     5446psPolynomial4D *psVectorFitPolynomial4D(psPolynomial4D *poly, const psVector *mask,
     5447                                        psMaskType maskValue, const psVector *f,
     5448                                        const psVector *fErr, const psVector *x,
     5449                                        const psVector *y, const psVector *z,
    53645450                                        const psVector *t);
    53655451\end{prototype}
     
    53805466
    53815467\begin{prototype}
    5382 psPolynomial1D *psVectorClipFitPolynomial1D(psPolynomial1D *poly,
    5383                                         psStats            *stats,
    5384                                         const psVector     *mask,
    5385                                         psMaskType          maskValue,
    5386                                         const psVector     *f,
    5387                                         const psVector     *fErr,
    5388                                         const psVector     *x);
    5389 psPolynomial2D *psVectorClipFitPolynomial2D(psPolynomial2D *poly,
    5390                                         psStats            *stats,
    5391                                         const psVector     *mask,
    5392                                         psMaskType          maskValue,
    5393                                         const psVector     *f,
    5394                                         const psVector     *fErr,
    5395                                         const psVector     *x,
    5396                                         const psVector     *y);
     5468psPolynomial1D *psVectorClipFitPolynomial1D(psPolynomial1D *poly, psStats *stats,
     5469                                            const psVector *mask, psMaskType maskValue,
     5470                                            const psVector *f, const psVector *fErr,
     5471                                            const psVector *x);
     5472psPolynomial2D *psVectorClipFitPolynomial2D(psPolynomial2D *poly, psStats *stats,
     5473                                            const psVector *mask, psMaskType maskValue,
     5474                                            const psVector *f, const psVector *fErr,
     5475                                            const psVector *x, const psVector *y);
    53975476psPolynomial3D *psVectorClipFitPolynomial3D(psPolynomial3D *poly,
    5398                                         psStats            *stats,
    5399                                         const psVector     *mask,
    5400                                         psMaskType          maskValue,
    5401                                         const psVector     *f,
    5402                                         const psVector     *fErr,
    5403                                         const psVector     *x,
    5404                                         const psVector     *y,
    5405                                         const psVector     *z);
    5406 psPolynomial4D *psVectorClipFitPolynomial4D(psPolynomial4D *poly,
    5407                                         psStats            *stats,
    5408                                         const psVector     *mask,
    5409                                         psMaskType          maskValue,
    5410                                         const psVector     *f,
    5411                                         const psVector     *fErr,
    5412                                         const psVector     *x,
    5413                                         const psVector     *y,
    5414                                         const psVector     *z,
    5415                                         const psVector     *t);
     5477                                            psStats *stats, const psVector *mask,
     5478                                            psMaskType maskValue, const psVector *f,
     5479                                            const psVector *fErr, const psVector *x,
     5480                                            const psVector *y, const psVector *z);
     5481psPolynomial4D *psVectorClipFitPolynomial4D(psPolynomial4D *poly, psStats *stats,
     5482                                            const psVector *mask, psMaskType maskValue,
     5483                                            const psVector *f, const psVector *fErr,
     5484                                            const psVector *x, const psVector *y,
     5485                                            const psVector *z, const psVector *t);
    54165486\end{prototype}
    54175487These functions replicate the capability of the vector fitting
     
    54435513
    54445514\begin{prototype}
    5445 psPolynomial4D *psVectorChiClipFitPolynomial4D(
    5446     psPolynomial4D *poly,
    5447     psStats *stats,
    5448     const psVector *mask,
    5449     psMaskType maskValue,
    5450     const psVector *f,
    5451     const psVector *fErr,
    5452     const psVector *x,
    5453     const psVector *y,
    5454     const psVector *z,
    5455     const psVector *t);
     5515psPolynomial4D *psVectorChiClipFitPolynomial4D(psPolynomial4D *poly, psStats *stats,
     5516                                               const psVector *mask, psMaskType maskValue,
     5517                                               const psVector *f, const psVector *fErr,
     5518                                               const psVector *x, const psVector *y,
     5519                                               const psVector *z, const psVector *t);
    54565520\end{prototype}
    54575521
     
    55465610
    55475611\begin{prototype}
    5548 psVector *psImageRow(psVector *out,
    5549                      const psImage *input,
    5550                      int row);
    5551 psVector *psImageCol(psVector *out,
    5552                      const psImage *input,
    5553                      int column);
     5612psVector *psImageRow(psVector *out, const psImage *input, int row);
     5613psVector *psImageCol(psVector *out, const psImage *input, int column);
    55545614\end{prototype}
    55555615
     
    55635623
    55645624\begin{prototype}
    5565 psVector *psImageSlice(psVector *out,
    5566                        psPixels *coords,
    5567                        const psImage *input,
    5568                        const psImage *mask,
    5569                        psMaskType maskVal,
    5570                        psRegion region,
    5571                        psImageCutDirection direction,
    5572                        const psStats *stats);
     5625psVector *psImageSlice(psVector *out, psPixels *coords, const psImage *input,
     5626                       const psImage *mask, psMaskType maskVal, psRegion region,
     5627                       psImageCutDirection direction, const psStats *stats);
    55735628\end{prototype}
    55745629Extract pixels from a rectilinear region to a vector (array of
     
    56005655
    56015656\begin{prototype}
    5602 psVector *psImageCut(psVector *out,
    5603                      psVector *cutCols,
    5604                      psVector *cutRows,
    5605                      const psImage *input,
    5606                      const psImage *mask,
    5607                      psMaskType maskVal,
    5608                      psPlane *start,
    5609                      psPlane *stop,
    5610                      unsigned int nSamples,
     5657psVector *psImageCut(psVector *out, psVector *cutCols, psVector *cutRows,
     5658                     const psImage *input, const psImage *mask, psMaskType maskVal,
     5659                     psPlane *start, psPlane *stop, unsigned int nSamples,
    56115660                     psImageInterpolateMode mode);
    56125661\end{prototype}
     
    56275676
    56285677\begin{prototype}
    5629 psVector *psImageRadialCut(psVector *out,
    5630                            const psImage *input,
    5631                            const psImage *mask,
    5632                            psMaskType maskVal,
    5633                            float x,
    5634                            float y,
    5635                            const psVector *radii,
     5678psVector *psImageRadialCut(psVector *out, const psImage *input, const psImage *mask,
     5679                           psMaskType maskVal, float x, float y, const psVector *radii,
    56365680                           const psStats *stats);
    56375681\end{prototype}
     
    56805724
    56815725\begin{prototype}
    5682 psImage *psImageRebin(psImage *out, const psImage *in,
    5683                       const psImage *mask,
    5684                       psMaskType maskVal,
    5685                       int scale, const psStats *stats);
     5726psImage *psImageRebin(psImage *out, const psImage *in, const psImage *mask,
     5727                      psMaskType maskVal, int scale, const psStats *stats);
    56865728\end{prototype}
    56875729Rebin image to new scale.  A new image is constructed in which the
     
    57285770
    57295771\begin{prototype}
    5730 psImage *psImageShift(psImage *out, const psImage *input,
    5731                       float dx, float dy, double complex exposed, psImageInterpolateMode mode);
     5772psImage *psImageShift(psImage *out, const psImage *input, float dx, float dy,
     5773                      double complex exposed, psImageInterpolateMode mode);
    57325774\end{prototype}
    57335775Shift image by an arbitrary number of pixels (\code{dx,dy}) in either
     
    57525794
    57535795\begin{prototype}
    5754 psImage *psImageTransform(psImage *output,
    5755                           psPixels **blankPixels,
    5756                           const psImage *input,
    5757                           const psImage *inputMask,
    5758                           psMaskType inputMaskVal,
    5759                           const psPlaneTransform *outToIn,
    5760                           psRegion region,
    5761                           const psPixels *pixels,
    5762                           psImageInterpolateMode mode,
     5796psImage *psImageTransform(psImage *output, psPixels **blankPixels, const psImage *input,
     5797                          const psImage *inputMask, psMaskType inputMaskVal,
     5798                          const psPlaneTransform *outToIn, psRegion region,
     5799                          const psPixels *pixels, psImageInterpolateMode mode,
    57635800                          double exposedValue);
    57645801\end{prototype}
     
    58035840
    58045841\begin{prototype}
    5805 psStats *psImageStats(psStats *stats,
    5806                       const psImage *in,
    5807                       const psImage *mask,
    5808                       psMaskType maskVal);
     5842psStats *psImageStats(psStats *stats, const psImage *in,
     5843                      const psImage *mask, psMaskType maskVal);
    58095844\end{prototype}
    58105845Determine statistics for image (or subimage).  The statistics to be
     
    58165851
    58175852\begin{prototype}
    5818 psHistogram *psImageHistogram(psHistogram *out,
    5819                               const psImage *in,
    5820                               const psImage *mask,
    5821                               psMaskType maskVal);
     5853psHistogram *psImageHistogram(psHistogram *out, const psImage *in,
     5854                              const psImage *mask, psMaskType maskVal);
    58225855\end{prototype}
    58235856Construct a histogram from an image (or subimage).  The histogram to
     
    58705903
    58715904\begin{prototype}
    5872 psStats *psImageBackground(const psImage *image, // Image for which to get the background
    5873                            const psImage *mask, // Mask image
    5874                            psMaskType maskValue, // Mask pixels which this mask value
    5875                            double fmin, // Fraction to return in the lower quartile field (0.25 for LQ)
    5876                            double fmax, // Fraction to return in the upper quartile field (0.75 for LQ)
    5877                            long nMax,   // Maximum number of pixels to subsample
    5878                            psRandom *rng // Random number generator (for pixel selection)
    5879     );
     5905psStats *psImageBackground(const psImage *image, const psImage *mask,
     5906                           psMaskType maskValue, double fmin, double fmax,
     5907                           long nMax, psRandom *rng);
    58805908\end{prototype}
    58815909\code{psImageBackground} shall measure the median background level for
     
    60386066
    60396067\begin{prototype}
    6040 psImage *psPixelsToMask(psImage *out, const psPixels *pixels, psRegion region, psMaskType maskVal);
     6068psImage *psPixelsToMask(psImage *out, const psPixels *pixels, psRegion region,
     6069                        psMaskType maskVal);
    60416070psPixels *psPixelsFromMask(psPixels *out, const psImage *mask, psMaskType maskVal);
    60426071\end{prototype}
     
    62136242\begin{prototype}
    62146243psImage *psMatrixLUD(psImage *out, psVector **perm, const psImage *in);
    6215 psVector *psMatrixLUSolve(psVector *out, const psImage *LU, const psVector *RHS, const psVector *perm);
     6244psVector *psMatrixLUSolve(psVector *out, const psImage *LU, const psVector *RHS,
     6245                          const psVector *perm);
    62166246\end{prototype}
    62176247The above functions decompose a matrix, \code{in}, into its $LU$
     
    62296259standard manner.  In order to avoid memory leaks, \code{perm} must be
    62306260\code{NULL} on calling \code{psMatrixLUD}.
     6261
     6262\begin{prototype}
     6263bool psMatrixGJSolve(psImage *A, psVector *b);
     6264\end{prototype}
     6265This function solves the matrix equation $Ax = b$ for $x$ using the
     6266Gauss-Jordan method.  On completion, the input matrix has been
     6267inverted, and the input vector contains the solution, $x$.  The
     6268function is specified for data type \code{F64} only.
    62316269
    62326270\begin{prototype}
     
    65476585image, \code{out}.  The API shall be the following:
    65486586\begin{prototype}
    6549 psImage *psImageConvolve(psImage *out, const psImage *in, const psKernel *kernel, bool direct);
     6587psImage *psImageConvolve(psImage *out, const psImage *in,
     6588                         const psKernel *kernel, bool direct);
    65506589\end{prototype}
    65516590
     
    72017240%
    72027241\begin{prototype}
    7203 psPlane *psPlaneTransformApply(psPlane *out,
    7204                                const psPlaneTransform *transform,
     7242psPlane *psPlaneTransformApply(psPlane *out, const psPlaneTransform *transform,
    72057243                               const psPlane *coords);
    7206 psPlane *psPlaneDistortApply(psPlane *out,
    7207                              const psPlaneDistort *distort,
    7208                              const psPlane *coords,
    7209                              float mag, float color);
     7244psPlane *psPlaneDistortApply(psPlane *out, const psPlaneDistort *distort,
     7245                             const psPlane *coords, float mag, float color);
    72107246\end{prototype}
    72117247
     
    72687304
    72697305\begin{prototype}
    7270 psPlane *psPlaneTransformDeriv(psPlane *out, const psPlaneTransform *transformation, const psPlane *coord);
     7306psPlane *psPlaneTransformDeriv(psPlane *out, const psPlaneTransform *transformation,
     7307                               const psPlane *coord);
    72717308\end{prototype}
    72727309
     
    72817318
    72827319\begin{prototype}
    7283 psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
     7320psPixels *psPixelsTransform(psPixels *out, const psPixels *input,
     7321                            const psPlaneTransform *inToOut);
    72847322\end{prototype}
    72857323
     
    73487386not be normalized.
    73497387
     7388\begin{prototype}
     7389psSphereRot *psSphereRotConjugate(psSphereRot *out, const psSphereRot *in);
     7390\end{prototype}
     7391This function shall return the conjugate of the \code{in} rotation,
     7392and store it in the \code{out} rotation, if non-\code{NULL}.
     7393
    73507394Spherical coordinates may be transformed by providing the
    73517395transformation and the coordinate in the input system to
     
    73547398
    73557399\begin{prototype}
    7356 psSphere *psSphereRotApply(psSphere *out, const psSphereRot *transform, const psSphere *coord);
     7400psSphere *psSphereRotApply(psSphere *out, const psSphereRot *transform,
     7401                           const psSphere *coord);
    73577402\end{prototype}
    73587403
     
    73637408
    73647409\begin{prototype}
    7365 psSphereRot *psSphereRotCombine(psSphereRot *out, const psSphereRot *rot1, const psSphereRot *rot2)
     7410psSphereRot *psSphereRotCombine(psSphereRot *out, const psSphereRot *rot1,
     7411                                const psSphereRot *rot2);
    73667412\end{prototype}
    73677413
     
    73697415
    73707416\begin{prototype}
    7371 psSphereRot *psSphereRotInvert(psSphereRot *rot)
     7417psSphereRot *psSphereRotInvert(psSphereRot *rot);
    73727418\end{prototype}
    73737419
     
    73957441
    73967442\begin{prototype}
    7397 psSphere *psSphereGetOffset(const psSphere *position1,
    7398                             const psSphere *position2,
    7399                             psSphereOffsetMode mode,
    7400                             psSphereOffsetUnit unit);
    7401 
    7402 psSphere *psSphereSetOffset(const psSphere *position,
    7403                             const psSphere *offset,
    7404                             psSphereOffsetMode mode,
    7405                             psSphereOffsetUnit unit);
     7443psSphere *psSphereGetOffset(const psSphere *position1, const psSphere *position2,
     7444                            psSphereOffsetMode mode, psSphereOffsetUnit unit);
     7445psSphere *psSphereSetOffset(const psSphere *position, const psSphere *offset,
     7446                            psSphereOffsetMode mode, psSphereOffsetUnit unit);
    74067447\end{prototype}
    74077448
     
    74977538observer, represented as a speed and a direction:
    74987539\begin{prototype}
    7499 psSphere *psAberration(psSphere *apparent, const psSphere *actual, const psSphere *direction, double speed);
     7540psSphere *psAberration(psSphere *apparent, const psSphere *actual,
     7541                       const psSphere *direction, double speed);
    75007542\end{prototype}
    75017543The \code{actual} and \code{apparent} positions are represented as
     
    75567598%
    75577599\begin{prototype}
    7558 psEarthPole *psEOC_PrecessionModel(const psTime *time)
     7600psEarthPole *psEOC_PrecessionModel(const psTime *time);
    75597601\end{prototype}
    75607602%
     
    75767618generated by providing the polar coordinate to the following function:
    75777619\begin{prototype}
    7578 psSphereRot *psSphereRot_CEOtoGCRS(const psEarthPole *pole)
     7620psSphereRot *psSphereRot_CEOtoGCRS(const psEarthPole *pole);
    75797621\end{prototype}
    75807622This function constructs the rotation element as described in the ADD (
     
    75877629The following routine calculates the rotation of the Earth about the CIP:
    75887630\begin{prototype}
    7589 psSphereRot *psSphereRot_TEOtoCEO(const psTime *time, psEarthPole *tidalCorr)
     7631psSphereRot *psSphereRot_TEOtoCEO(const psTime *time, psEarthPole *tidalCorr);
    75907632\end{prototype}
    75917633The IERS code to create the comparable rotation is embedded in
     
    77697811The constructor is straight-forward:
    77707812\begin{prototype}
    7771 psProjection *psProjectionAlloc(double R, double D, double Xs, double Ys, psProjectionType type);
    7772 \end{prototype}
    7773 where the units of \code{R} and \code{D} are radians, while \code{Xs} and \code{Ys} are in radians per pixel.
     7813psProjection *psProjectionAlloc(double R, double D, double Xs, double Ys,
     7814                                psProjectionType type);
     7815\end{prototype}
     7816where the units of \code{R} and \code{D} are radians, while \code{Xs}
     7817and \code{Ys} are in radians per pixel.
    77747818
    77757819The following functions will project and deproject (respectively)
Note: See TracChangeset for help on using the changeset viewer.