Changeset 3960 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- May 18, 2005, 1:07:18 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (47 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r3958 r3960 1 %%% $Id: psLibSDRS.tex,v 1.22 5 2005-05-18 20:45:01price Exp $1 %%% $Id: psLibSDRS.tex,v 1.226 2005-05-18 23:07:18 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 440 440 % 441 441 \begin{verbatim} 442 void *p_psAlloc(size_t size, c har *file, int line);443 void *p_psRealloc(void *ptr, size_t size, c har *file, int line);444 void p_psFree(void *ptr, c har *file, int line);442 void *p_psAlloc(size_t size, const char *file, int line); 443 void *p_psRealloc(void *ptr, size_t size, const char *file, int line); 444 void p_psFree(void *ptr, const char *file, int line); 445 445 \end{verbatim} 446 446 % … … 694 694 % 695 695 \begin{verbatim} 696 psReferenceCount psMemGetRefCounter( void *vptr);697 void *psMemIncrRefCounter( void *vptr);696 psReferenceCount psMemGetRefCounter(const void *vptr); 697 void *psMemIncrRefCounter(const void *vptr); 698 698 void *psMemDecrRefCounter(void *vptr); 699 699 \end{verbatim} … … 819 819 % 820 820 \begin{verbatim} 821 void psTrace(c har *facil, int myLevel,...);821 void psTrace(const char *facil, int myLevel,...); 822 822 \end{verbatim} 823 823 % … … 1215 1215 1216 1216 \begin{verbatim} 1217 void psAbort(c har *name,char *fmt,...);1217 void psAbort(const char *name, const char *fmt,...); 1218 1218 \end{verbatim} 1219 1219 … … 1329 1329 In addition, we specify two functions for working with \code{psScalar} data: 1330 1330 \begin{verbatim} 1331 psScalar *psScalarAlloc (psC64 value, psElemType dataType);1332 psScalar *psScalarCopy (psScalar *value);1331 psScalar *psScalarAlloc(psC64 value, psElemType dataType); 1332 psScalar *psScalarCopy(const psScalar *value); 1333 1333 \end{verbatim} 1334 1334 The first creates a \code{psType}-ed structure from a constant value, … … 1432 1432 1433 1433 \begin{verbatim} 1434 psVector *psVectorCopy(psVector *output, psVector *input, psElemType type);1434 psVector *psVectorCopy(psVector *output, const psVector *input, psElemType type); 1435 1435 \end{verbatim} 1436 1436 … … 1565 1565 1566 1566 \begin{verbatim} 1567 psArray *psArrayAdd(psArray *array, int delta, void *value);1567 psArray *psArrayAdd(psArray *array, int delta, const void *value); 1568 1568 \end{verbatim} 1569 1569 … … 1575 1575 1576 1576 \begin{verbatim} 1577 psBool psArrayRemove(psArray *array, psPtr value);1577 psBool psArrayRemove(psArray *array, const psPtr value); 1578 1578 \end{verbatim} 1579 1579 … … 1584 1584 1585 1585 \begin{verbatim} 1586 psBool psArraySet(psArray* in, psU32 position, void* value);1587 void* psArrayGet( psArray* in, psU32 position);1586 psBool psArraySet(psArray* in, psU32 position, const void* value); 1587 void* psArrayGet(const psArray* in, psU32 position); 1588 1588 \end{verbatim} 1589 1589 … … 1600 1600 specification of a comparison function to specify how the objects on 1601 1601 the list should be sorted. The motivation is primarily to be able to 1602 iterate on a sorted list of keys from a hash. 1602 iterate on a sorted list of keys from a hash. The \code{array} is 1603 sorted in-place. 1603 1604 1604 1605 \subsection{Doubly-linked lists} … … 1640 1641 1641 1642 \begin{verbatim} 1642 psList *psListAlloc( void *data);1643 psList *psListAlloc(const void *data); 1643 1644 \end{verbatim} 1644 1645 Create a list. This function may take a pointer to a data item, or it … … 1712 1713 1713 1714 \begin{verbatim} 1714 bool psListAdd(psList *list, int location, void *data);1715 bool psListAddAfter(psListIterator *iterator, void *data);1716 bool psListAddBefore(psListIterator *iterator, void *data);1715 bool psListAdd(psList *list, int location, const void *data); 1716 bool psListAddAfter(psListIterator *iterator, const void *data); 1717 bool psListAddBefore(psListIterator *iterator, const void *data); 1717 1718 \end{verbatim} 1718 1719 the first function, \code{psListAdd}, adds an entry to the \code{list} … … 1761 1762 \begin{verbatim} 1762 1763 bool psListRemove(psList *list, int location) 1763 bool psListRemoveData(psList *list, void *data);1764 bool psListRemoveData(psList *list, const void *data); 1764 1765 \end{verbatim} 1765 1766 A data item may be removed from the list with these functions. For … … 1779 1780 1780 1781 \begin{verbatim} 1781 psArray *psListToArray( psList *list);1782 psList *psArrayToList( psArray *array);1782 psArray *psListToArray(const psList *list); 1783 psList *psArrayToList(const psArray *array); 1783 1784 \end{verbatim} 1784 1785 These two functions are available to convert between the … … 1793 1794 specification of a comparison function to specify how the objects on 1794 1795 the list should be sorted. The motivation is primarily to be able to 1795 iterate on a sorted list of keys from a hash. 1796 iterate on a sorted list of keys from a hash. The \code{list} is 1797 sorted in-place. 1796 1798 1797 1799 \subsection{Hash Tables} … … 1851 1853 A data item may be added to the hash table with the function: 1852 1854 \begin{verbatim} 1853 bool psHashAdd(psHash *table, const char *key, void *data);1855 bool psHashAdd(psHash *table, const char *key, const void *data); 1854 1856 \end{verbatim} 1855 1857 In this function, the value of the string \code{key} is used to … … 1862 1864 The data associated with a given key may be found with the function: 1863 1865 \begin{verbatim} 1864 void *psHashLookup( psHash *table, const char *key);1866 void *psHashLookup(const psHash *table, const char *key); 1865 1867 \end{verbatim} 1866 1868 which returns the data value pointed to by the element associated with … … 1875 1877 The function 1876 1878 \begin{verbatim} 1877 psList *psHashKeyList( psHash *table);1879 psList *psHashKeyList(const psHash *table); 1878 1880 \end{verbatim} 1879 1881 returns the complete list of defined keys associated with the … … 1881 1883 1882 1884 \begin{verbatim} 1883 psArray *psHashToArray( psHash *hash);1885 psArray *psHashToArray(const psHash *hash); 1884 1886 \end{verbatim} 1885 1887 This function places the data in a \code{psHash} into a \code{psArray} … … 2058 2060 psBitSet *psBitSetSet(psBitSet *myBits, int bit); 2059 2061 psBitSet* psBitSetClear(psBitSet* inBits, int bit); 2060 psBitSet *psBitSetOp(psBitSet *outBits, const psBitSet *inBits1, c har *operator, const psBitSet *inBits2);2061 psBitSet *psBitSetNot(psBitSet *out, psBitSet *in);2062 psBitSet *psBitSetOp(psBitSet *outBits, const psBitSet *inBits1, const char *operator, const psBitSet *inBits2); 2063 psBitSet *psBitSetNot(psBitSet *out, const psBitSet *in); 2062 2064 bool psBitSetTest(const psBitSet *checkBits, int bit); 2063 2065 char *psBitSetToString(const pBitSet* bits); … … 2809 2811 2810 2812 psVector *psImageSlice(psVector *out, 2811 psVector *coords,2813 const psVector *coords, 2812 2814 const psImage *input, 2813 2815 const psImage *mask, … … 3263 3265 3264 3266 \begin{verbatim} 3265 psType *psBinaryOp (void *out, void *in1, char *op,void *in2);3266 psType *psUnaryOp (void *out, void *in,char *op);3267 psType *psBinaryOp(void *out, const void *in1, const char *op, const void *in2); 3268 psType *psUnaryOp(void *out, const void *in, const char *op); 3267 3269 \end{verbatim} 3268 3270 These functions determine the type of the operands on the basis of … … 3414 3416 types \code{psF32, psF64}. Input and output data types should match. 3415 3417 \begin{verbatim} 3416 psImage *psMatrixEigenvectors(psImage *out, psImage *in);3418 psImage *psMatrixEigenvectors(psImage *out, const psImage *in); 3417 3419 \end{verbatim} 3418 3420 \tbd{Should this return an array of vectors? Specified here as … … 3443 3445 psVector *psVectorReal(psVector *out, const psVector *in); 3444 3446 psVector *psVectorImaginary(psVector *out, const psVector *in); 3445 psVector *psVectorComplex(psVector *out, psVector *real,psVector *imag);3447 psVector *psVectorComplex(psVector *out, const psVector *real, const psVector *imag); 3446 3448 psVector *psVectorConjugate(psVector *out, const psVector *in); 3447 3449 psVector *psVectorPowerSpectrum(psVector *out, const psVector *in); … … 3503 3505 psImage *psImageReal(psImage *out, const psImage *in); 3504 3506 psImage *psImageImaginary(psImage *out, const psImage *in); 3505 psImage *psImageComplex(psImage *out, psImage *real, const psImage *imag);3507 psImage *psImageComplex(psImage *out, const psImage *real, const psImage *imag); 3506 3508 psImage *psImageConjugate(psImage *out, const psImage *in); 3507 3509 psImage *psImagePowerSpectrum(psImage *out, const psImage *in); … … 3915 3917 3916 3918 \begin{verbatim} 3917 bool psMetadataAddItem(psMetadata *md, psMetadataItem *item, int location, int mode);3919 bool psMetadataAddItem(psMetadata *md, const psMetadataItem *item, int location, int mode); 3918 3920 bool psMetadataAdd(psMetadata *md, int location, const char *name, int format, const char *comment, ...); 3919 3921 bool psMetadataAddV(psMetadata *md, int location, const char *name, int format, const char *comment, … … 4029 4031 psBool psMetadataAddF64(psMetadata* md, psS32 location, const char* name, const char* comment, psF64 value); 4030 4032 psBool psMetadataAddList(psMetadata* md, psS32 location, const char* name, const char* comment, 4031 psList* value);4033 const psList* value); 4032 4034 psBool psMetadataAddStr(psMetadata* md, psS32 location, const char* name, const char* comment, 4033 4035 const char* value); 4034 4036 psBool psMetadataAddVector(psMetadata* md, psS32 location, const char* name, const char* comment, 4035 psVector* value);4037 const psVector* value); 4036 4038 psBool psMetadataAddImage(psMetadata* md, psS32 location, const char* name, const char* comment, 4037 psImage* value);4039 const psImage* value); 4038 4040 psBool psMetadataAddHash(psMetadata* md, psS32 location, const char* name, const char* comment, 4039 psHash* value);4041 const psHash* value); 4040 4042 psBool psMetadataAddLookupTable(psMetadata* md, psS32 location, const char* name, const char* comment, 4041 psLookupTable* value);4043 const psLookupTable* value); 4042 4044 psBool psMetadataAddUnknown(psMetadata* md, psS32 location, const char* name, const char* comment, 4043 psPtr value); 4045 const psPtr value); 4046 psBool psMetadataAddMetadata(psMetadata* md, psS32 location, const char* name, const char* comment, 4047 const psMetadata* value); 4044 4048 \end{verbatim} 4045 4049 … … 4478 4482 4479 4483 \begin{verbatim} 4480 bool psDBCreateTable(psDB *dbh, const char *tableName, psMetadata *md);4484 bool psDBCreateTable(psDB *dbh, const char *tableName, const psMetadata *md); 4481 4485 \end{verbatim} 4482 4486 … … 4544 4548 4545 4549 \begin{verbatim} 4546 bool psDBInsertOneRow(psDB *dbh, const char *tableName, psMetadata *row);4550 bool psDBInsertOneRow(psDB *dbh, const char *tableName, const psMetadata *row); 4547 4551 \end{verbatim} 4548 4552 … … 4552 4556 4553 4557 \begin{verbatim} 4554 bool psDBInsertRows(psDB *dbh, const char *tableName, psArray *rowSet);4558 bool psDBInsertRows(psDB *dbh, const char *tableName, const psArray *rowSet); 4555 4559 \end{verbatim} 4556 4560 … … 4573 4577 4574 4578 \begin{verbatim} 4575 psS64 psDBUpdateRows(psDB *dbh, const char *tableName, psMetadata *where,psMetadata *values);4579 psS64 psDBUpdateRows(psDB *dbh, const char *tableName, const psMetadata *where, const psMetadata *values); 4576 4580 \end{verbatim} 4577 4581 … … 4584 4588 4585 4589 \begin{verbatim} 4586 psS64 psDBDeleteRows(psDB *dbh, const char *tableName, psMetadata *where);4590 psS64 psDBDeleteRows(psDB *dbh, const char *tableName, const psMetadata *where); 4587 4591 \end{verbatim} 4588 4592 … … 4657 4661 4658 4662 \begin{verbatim} 4659 char *psFitsGetExtName( constpsFits* fits);4660 bool psFitsSetExtName( constpsFits* fits, const char* name);4663 char *psFitsGetExtName(psFits* fits); 4664 bool psFitsSetExtName(psFits* fits, const char* name); 4661 4665 \end{verbatim} 4662 4666 … … 4670 4674 4671 4675 \begin{verbatim} 4672 psMetadata *psFitsReadHeader(psMetadata *out, constpsFits *fits);4676 psMetadata *psFitsReadHeader(psMetadata *out, psFits *fits); 4673 4677 \end{verbatim} 4674 4678 Read header data into a \code{psMetadata} structure. The data is read … … 4690 4694 4691 4695 \begin{verbatim} 4692 bool psFitsWriteHeader(psMetadata *output, constpsFits *fits);4696 bool psFitsWriteHeader(psMetadata *output, psFits *fits); 4693 4697 \end{verbatim} 4694 4698 Write metadata into the header of a FITS image file. The header is … … 4734 4738 4735 4739 \begin{verbatim} 4736 bool psFitsWriteImage(psFits *fits, psMetadata *header, const psImage *input, int depth);4740 bool psFitsWriteImage(psFits *fits, const psMetadata *header, const psImage *input, int depth); 4737 4741 \end{verbatim} 4738 4742 Create a new image based on the dimensions specified for the image and … … 4775 4779 4776 4780 \begin{verbatim} 4777 psArray *psFitsReadTableColumn (psFits *fits, c har *colname);4781 psArray *psFitsReadTableColumn (psFits *fits, const char *colname); 4778 4782 \end{verbatim} 4779 4783 This function reads a single column of the table in the extension … … 4784 4788 4785 4789 \begin{verbatim} 4786 psVector *psFitsReadTableColumnNum (psFits *fits, c har *colname);4790 psVector *psFitsReadTableColumnNum (psFits *fits, const char *colname); 4787 4791 \end{verbatim} 4788 4792 This function reads a single column of the table in the extension … … 4811 4815 4812 4816 \begin{verbatim} 4813 bool psFitsWriteTable(psFits* fits, psMetadata *header,psArray* table);4817 bool psFitsWriteTable(psFits* fits, const psMetadata *header, const psArray* table); 4814 4818 \end{verbatim} 4815 4819 Accepts a \code{psArray} of \code{psMetadata} and writes it to the … … 4818 4822 4819 4823 \begin{verbatim} 4820 bool psFitsUpdateTable(psFits* fits, psMetadata* data, int row);4824 bool psFitsUpdateTable(psFits* fits, const psMetadata* data, int row); 4821 4825 \end{verbatim} 4822 4826 Writes the \code{psMetadata} data to a FITS table at the specified row … … 4915 4919 4916 4920 \begin{verbatim} 4917 psF64 *psTimeToLMST( psTime *time, psF64 longitude);4921 psF64 *psTimeToLMST(const psTime *time, psF64 longitude); 4918 4922 \end{verbatim} 4919 4923 … … 5458 5462 5459 5463 \begin{verbatim} 5460 psSphereRot *psSphereRotCombine(psSphereRot *out, psSphereRot *rot1,psSphereRot *rot2)5464 psSphereRot *psSphereRotCombine(psSphereRot *out, const psSphereRot *rot1, const psSphereRot *rot2) 5461 5465 \end{verbatim} 5462 5466 … … 5472 5476 angular and 3-vector representations: 5473 5477 \begin{verbatim} 5474 psSphere *psCubeToSphere( psCube *cube);5475 psCube *psSphereToCube( psSphere *sphere);5478 psSphere *psCubeToSphere(const psCube *cube); 5479 psCube *psSphereToCube(const psSphere *sphere); 5476 5480 \end{verbatim} 5477 5481 … … 5522 5526 % 5523 5527 \begin{verbatim} 5524 psSphereRot *psSphereRotICRSToEcliptic( psTime *time);5525 psSphereRot *psSphereRotEclipticToICRS( psTime *time);5528 psSphereRot *psSphereRotICRSToEcliptic(const psTime *time); 5529 psSphereRot *psSphereRotEclipticToICRS(const psTime *time); 5526 5530 psSphereRot *psSphereRotICRSToGalactic(void); 5527 5531 psSphereRot *psSphereRotGalacticToICRS(void); … … 5583 5587 observer, represented as a speed and a direction: 5584 5588 \begin{verbatim} 5585 psSphere *psAberration(psSphere *apparent, psSphere *actual, psSpheredirection, double speed);5589 psSphere *psAberration(psSphere *apparent, const psSphere *actual, const psSphere *direction, double speed); 5586 5590 \end{verbatim} 5587 5591 The \code{actual} and \code{apparent} positions are represented as … … 5607 5611 5608 5612 \begin{verbatim} 5609 double psEOC_ParallaxFactor( psSphere *coords,psTime *time);5613 double psEOC_ParallaxFactor(const psSphere *coords, const psTime *time); 5610 5614 \end{verbatim} 5611 5615 Calculate the parallax factor for the given position and time.
Note:
See TracChangeset
for help on using the changeset viewer.
