Changeset 1592
- Timestamp:
- Aug 18, 2004, 6:32:24 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (65 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r1571 r1592 1 %%% $Id: psLibSDRS.tex,v 1.8 1 2004-08-19 01:30:33price Exp $1 %%% $Id: psLibSDRS.tex,v 1.82 2004-08-19 04:32:24 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 1137 1137 determine the type of the data on the basis of the data. 1138 1138 Supported data types must be defined by a structure in which 1139 the first element is always of type \code{psType}: 1139 the first element is always of type \code{psType}: 1140 1140 \begin{verbatim} 1141 1141 typedef struct { … … 1171 1171 PS_TYPE_C32, ///< Complex numbers consisting of floats 1172 1172 PS_TYPE_C64, ///< Complex numbers consisting of doubles 1173 PS_TYPE_OTHER ,///< Not supported for arithmetic1173 PS_TYPE_OTHER ///< Not supported for arithmetic 1174 1174 } psElemType; 1175 1175 \end{verbatim} … … 1248 1248 to use automatic construction mechanisms effectively. The data type 1249 1249 is defined by the first element, \code{psType}. The structure is 1250 associated with a constructor and a destructor:1250 associated with a constructor and reallocator: 1251 1251 % 1252 1252 \begin{verbatim} 1253 1253 psVector *psVectorAlloc(int nalloc, psElemType type); 1254 1254 psVector *psVectorRealloc(const psVector *vector, int nalloc); 1255 void p_psVectorFree(psVector *restrict vector);1256 1255 \end{verbatim} 1257 1256 % … … 1327 1326 dimensionality must be 2. 1328 1327 1329 \begin{verbatim}1330 void p_psImageFree(psImage *restrict image);1331 \end{verbatim}1332 Free the memory associated with a specific image, including the pixel1333 data. Free the children of the image if they exist.1334 1335 1328 \subsection{Simple Arrays} 1336 1329 … … 1355 1348 % 1356 1349 \begin{verbatim} 1357 psArray *psArrayAlloc(int nalloc , psElemType type);1350 psArray *psArrayAlloc(int nalloc); 1358 1351 psArray *psArrayRealloc(const psArray *array, int nalloc); 1359 void p_psArrayFree(psArray *restrict array);1360 1352 \end{verbatim} 1361 1353 % … … 1409 1401 struct psListElem *prev; ///< previous link in list 1410 1402 struct psListElem *next; ///< next link in list 1411 void *data; ///< real data item1403 void *data; ///< real data item 1412 1404 } psListElem; 1413 1405 \end{verbatim} … … 1427 1419 \code{NULL}, then an empty list, with both pointers are set to 1428 1420 \code{NULL} should be created. 1421 1422 The destructor function for \code{psList} must free the data 1423 associated with the entire list. 1429 1424 1430 1425 \begin{verbatim} … … 1469 1464 data from a list (with \code{psListGet}) also increments the reference 1470 1465 counter. 1471 1472 \begin{verbatim}1473 void p_psListFree(psList *list);1474 \end{verbatim}1475 This function frees the data associated with the entire list. This1476 function is used by psFree to free a list with its associated data.1477 1466 1478 1467 \begin{verbatim} … … 1534 1523 \begin{verbatim} 1535 1524 typedef struct { 1536 int nbucket; // number of buckets1537 psHashBucket **buckets; // the buckets themselves1525 int nbucket; ///< number of buckets 1526 psHashBucket **buckets; ///< the buckets themselves 1538 1527 } psHash; 1539 1528 \end{verbatim} … … 1545 1534 \begin{verbatim} 1546 1535 typedef struct psHashBucket { 1547 char *key; // key for this item of data1548 void *data; // the data itself1549 struct psHashBucket *next; // list of other possible keys1536 char *key; ///< key for this item of data 1537 void *data; ///< the data itself 1538 struct psHashBucket *next; ///< list of other possible keys 1550 1539 } psHashBucket; 1551 1540 \end{verbatim} … … 1561 1550 the buckets. 1562 1551 1552 The destructor for \code{psHash} must free all data associated with a complete hash table. 1553 1563 1554 A data item may be added to the hash table with the function: 1564 1555 \begin{verbatim} 1565 bool psHashAdd(psHash *table, c har *key, void *data);1556 bool psHashAdd(psHash *table, const char *key, void *data); 1566 1557 \end{verbatim} 1567 1558 In this function, the value of the string \code{key} is used to … … 1574 1565 The data associated with a given key may be found with the function: 1575 1566 \begin{verbatim} 1576 void *psHashLookup(psHash *table, c har *key);1567 void *psHashLookup(psHash *table, const char *key); 1577 1568 \end{verbatim} 1578 1569 which returns the data value pointed to by the element associated with … … 1580 1571 a specific key may be removed (deleted) with the function: 1581 1572 \begin{verbatim} 1582 bool psHashRemove(psHash *table, c har *key);1573 bool psHashRemove(psHash *table, const char *key); 1583 1574 \end{verbatim} 1584 1575 The function returns a value of \code{true} if the operation was 1585 1576 successfull, and \code{false} otherwise. 1586 1587 The data associated with a complete hash table may be freed by calling:1588 \begin{verbatim}1589 void p_psHashFree(psHash *table);1590 \end{verbatim}1591 1577 1592 1578 The function … … 1636 1622 \begin{verbatim} 1637 1623 psBitSet *psBitSetAlloc(int n); 1638 void p_psBitSetFree(psBitSet *restrict myBits);1639 1624 \end{verbatim} 1640 1625 where \code{n} is the requested number of bits. … … 1650 1635 1651 1636 \begin{verbatim} 1652 psBitSet *psBitSetSet(psBitSet * restrictmyBits, int bit);1637 psBitSet *psBitSetSet(psBitSet *myBits, int bit); 1653 1638 psBitSet *psBitSetOp(psBitSet *outBits, 1654 const psBitSet * restrictinBits1,1639 const psBitSet *inBits1, 1655 1640 char *operator, 1656 const psBitSet * restrictinBits2);1641 const psBitSet *inBits2); 1657 1642 psBitSet *psBitSetNot(psBitSet *out, psBitSet *in); 1658 bool psBitSetTest(const psBitSet * restrictcheckBits, int bit);1643 bool psBitSetTest(const psBitSet *checkBits, int bit); 1659 1644 \end{verbatim} 1660 1645 … … 1689 1674 1690 1675 \begin{verbatim} 1691 psVector *psVectorSort(psVector *out, const psVector * restrictin);1676 psVector *psVectorSort(psVector *out, const psVector *in); 1692 1677 \end{verbatim} 1693 1678 … … 1703 1688 1704 1689 \begin{verbatim} 1705 psVector *psVectorSortIndex(psVector * restrict out; const psVector *restrictin);1690 psVector *psVectorSortIndex(psVector *out; const psVector *in); 1706 1691 \end{verbatim} 1707 1692 … … 1748 1733 \begin{verbatim} 1749 1734 psStats *psVectorStats(psStats *stats, 1750 const psVector * restrictin,1751 const psVector * restrictmask,1735 const psVector *in, 1736 const psVector *mask, 1752 1737 unsigned int maskVal); 1753 1738 \end{verbatim} … … 1783 1768 double sampleUQ; ///< upper quartile of sample 1784 1769 double sampleLQ; ///< lower quartile of sample 1785 double sampleLimit; ///< Number of datapoints to1786 1770 double robustMean; ///< robust mean of data 1787 1771 double robustMedian; ///< robust median of data … … 1827 1811 \end{verbatim} 1828 1812 1829 A ssociated constructors and destructors arealso required:1830 1813 A constructor is also required: 1814 % 1831 1815 \begin{verbatim} 1832 1816 psStats *psStatsAlloc(psStatsOptions options); 1833 void p_psStatsFree(psStats *restrict stats);1834 1817 \end{verbatim} 1835 1818 … … 1842 1825 \begin{verbatim} 1843 1826 typedef struct { 1844 const psVector * restrict bounds;///< Bounds for the bins1827 const psVector *bounds; ///< Bounds for the bins 1845 1828 psVector *nums; ///< Number in each of the bins 1846 1829 int minNum, maxNum; ///< Number below minimum / above maximum 1847 bool uniform; ///< Is it a uniform distribution?1830 bool uniform; ///< Is it a uniform distribution? 1848 1831 } psHistogram; 1849 1832 \end{verbatim} … … 1872 1855 following constructor: 1873 1856 \begin{verbatim} 1874 psHistogram *psHistogramAllocGeneric(const psVector * restrictbounds);1857 psHistogram *psHistogramAllocGeneric(const psVector *bounds); 1875 1858 \end{verbatim} 1876 1859 where the \code{psVector *bounds} (of type \code{psF32}) is defined by … … 1878 1861 constructor sets the value of \code{uniform} to be false. 1879 1862 1880 A histogram is free with the destructor:1881 \begin{verbatim}1882 void p_psHistogramFree(psHistogram *restrict myHist);1883 \end{verbatim}1884 1885 1863 The following function populates the histogram bins from the specified 1886 1864 vector (\code{in}). It alters and returns the histogram \code{out} … … 1888 1866 \begin{verbatim} 1889 1867 psHistogram *psVectorHistogram(psHistogram *out, 1890 const psVector * restrictin,1891 const psVector * restrictmask,1868 const psVector *in, 1869 const psVector *mask, 1892 1870 unsigned int maskVal); 1893 1871 \end{verbatim} … … 1942 1920 1943 1921 \begin{verbatim} 1944 /** Type of polynomial */1945 1922 typedef enum { 1946 1923 PS_POLYNOMIAL_ORD, ///< Ordinary polynomial … … 1977 1954 naming convention exampled above. 1978 1955 1979 The constructor and destructor are:1956 The constructor is: 1980 1957 \begin{verbatim} 1981 1958 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY, psPolynomialType type); 1982 void p_psDPolynomial2DFree(psDPolynomial2D *restrict myPoly);1983 1959 \end{verbatim} 1984 1960 where \code{nX} and \code{nY} are the number of terms in x and y … … 1992 1968 In the event that several evaluations are required, we also define: 1993 1969 \begin{verbatim} 1994 psVector *psDPolynomial2DEvalVector(psVector *x, psVector *y, const psDPolynomial2D *restrict myPoly); 1970 psVector *psDPolynomial2DEvalVector(const psVector *x, const psVector *y, 1971 const psDPolynomial2D *myPoly); 1995 1972 \end{verbatim} 1996 1973 If the \code{x} and \code{y} vectors do not match the precision of the … … 2010 1987 2011 1988 \begin{verbatim} 2012 /** A 1D cubic-spline */2013 1989 typedef struct { 2014 1990 int n; ///< Number of spline pieces 2015 psPolynomial1D * spline; ///< Array of nsplines1991 psPolynomial1D **spline; ///< Array of n pointers to splines 2016 1992 float *domains; ///< The boundaries between each spline piece. Size is n+1. 2017 1993 } psSpline1D; … … 2055 2031 \begin{verbatim} 2056 2032 float psSpline1DEval(const psSpline1D *spline, float x); 2057 psVector *psSpline1DEvalVector( psVector *x, const psSpline1D *spline);2033 psVector *psSpline1DEvalVector(const psVector *x, const psSpline1D *spline); 2058 2034 \end{verbatim} 2059 2035 … … 2274 2250 2275 2251 \begin{verbatim} 2276 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D *myPoly, 2277 const psVector * restrictx,2278 const psVector * restricty,2279 const psVector * restrictyErr);2252 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D *myPoly, 2253 const psVector *x, 2254 const psVector *y, 2255 const psVector *yErr); 2280 2256 \end{verbatim} 2281 2257 \code{psVectorFitPolynomial1d} returns the polynomial that best fits the … … 2329 2305 2330 2306 \begin{verbatim} 2331 psImage *psImageSubsection(const psImage *image, const *section);2307 psImage *psImageSubsection(const psImage *image, const char *section); 2332 2308 \end{verbatim} 2333 2309 Similar to \code{psImageSubset}, but uses an image \code{section}, of … … 2365 2341 \begin{verbatim} 2366 2342 typedef enum { 2367 PS_CUT_X_POS ;2368 PS_CUT_X_NEG ;2369 PS_CUT_Y_POS ;2370 PS_CUT_Y_NEG ;2343 PS_CUT_X_POS, 2344 PS_CUT_X_NEG, 2345 PS_CUT_Y_POS, 2346 PS_CUT_Y_NEG 2371 2347 } psImageCutDirection; 2372 2348 2373 2349 psVector *psImageSlice(psVector *out, 2374 2350 psVector *coords, 2375 const psImage * restrictinput,2376 const psImage * restrictmask,2351 const psImage *input, 2352 const psImage *mask, 2377 2353 unsigned int maskVal, 2378 2354 unsigned int x, … … 2399 2375 \begin{verbatim} 2400 2376 psVector *psImageCut(psVector *out, const psImage *input, 2401 const psImage * restrictmask,2377 const psImage *mask, 2402 2378 unsigned int maskVal, 2403 2379 float xs, float ys, float xe, float ye, … … 2420 2396 \begin{verbatim} 2421 2397 psVector *psImageRadialCut(psVector *out, const psImage *input, 2422 const psImage * restrictmask,2398 const psImage *mask, 2423 2399 unsigned int maskVal, 2424 2400 float x, float y, … … 2485 2461 2486 2462 \begin{verbatim} 2487 psImage *psImageRotate(psImage *out, const psImage *input, float angle, psC64 exposed, psImageInterpolateMode mode); 2463 psImage *psImageRotate(psImage *out, const psImage *input, float angle, 2464 psC64 exposed, psImageInterpolateMode mode); 2488 2465 \end{verbatim} 2489 2466 Rotate the input image by given angle, specified in degrees. The … … 2525 2502 \begin{verbatim} 2526 2503 psStats *psImageStats(psStats *stats, 2527 const psImage * restrictin,2528 const psImage * restrictmask,2504 const psImage *in, 2505 const psImage *mask, 2529 2506 unsigned int maskVal); 2530 2507 \end{verbatim} … … 2538 2515 \begin{verbatim} 2539 2516 psHistogram *psImageHistogram(psHistogram *out, 2540 const psImage * restrictin,2541 const psImage * restrictmask,2517 const psImage *in, 2518 const psImage *mask, 2542 2519 unsigned int maskVal); 2543 2520 \end{verbatim} … … 2566 2543 2567 2544 \begin{verbatim} 2568 psF64 psImagePixelInterpolate (const psImage *input, float x, float y, psC64 unexposedValue, psImageInterpolateMode mode); 2545 psF64 psImagePixelInterpolate (const psImage *input, float x, float y, 2546 psC64 unexposedValue, psImageInterpolateMode mode); 2569 2547 \end{verbatim} 2570 2548 Perform interpolation of image pixel values to the given fractional … … 2649 2627 2650 2628 \begin{verbatim} 2651 int psImageClipComplexRegion(psImage *input, complex double min, complex double vmin, complex double max, complex double vmax); 2629 int psImageClipComplexRegion(psImage *input, complex double min, complex double vmin, 2630 complex double max, complex double vmax); 2652 2631 \end{verbatim} 2653 2632 Clip image values outside of range to given values. All pixels with … … 2791 2770 2792 2771 \begin{verbatim} 2793 psImage *psMatrixInvert(psImage *out, const psImage *in, float * restrictdeterminant);2772 psImage *psMatrixInvert(psImage *out, const psImage *in, float *determinant); 2794 2773 \end{verbatim} 2795 2774 \code{psMatrixInvert} returns the inverse of the specified matrix … … 2803 2782 types \code{psF32, psF64}. 2804 2783 \begin{verbatim} 2805 float psMatrixDeterminant(const psImage * restrictin);2784 float psMatrixDeterminant(const psImage *in); 2806 2785 \end{verbatim} 2807 2786 … … 2833 2812 should match. 2834 2813 \begin{verbatim} 2835 psVector *psMatrixToVector(psVector *out, psImage *in);2836 psImage *psVectorToMatrix(psImage *out, psVector *in);2814 psVector *psMatrixToVector(psVector *out, const psImage *in); 2815 psImage *psVectorToMatrix(psImage *out, const psVector *in); 2837 2816 \end{verbatim} 2838 2817 … … 3079 3058 3080 3059 \begin{verbatim} 3081 psTime *psTimeGetTime(psTimeType );3060 psTime *psTimeGetTime(psTimeType type); 3082 3061 \end{verbatim} 3083 3062 … … 3089 3068 \end{verbatim} 3090 3069 This function may be used to convert between \code{PS_TIME_TAI} and 3091 \code{PS_TIME_UTC} time representations. 3070 \code{PS_TIME_UTC} time representations. The \code{time} is modified 3071 and returned. 3092 3072 3093 3073 To convert to or from Local Mean Sidereal Time, it is necessary to … … 3096 3076 \begin{verbatim} 3097 3077 psTime *psTimeToLST(psTime *time, double longitude); 3098 psTime *psLSTToTime(psTime *time, double longitude); 3099 \end{verbatim} 3100 % 3101 The functions may accept either \code{psTimeType}. Note that this 3102 function must supply the value UT1-UTC, which is available externally 3103 The value UT1-UTC is necessary for this an various other SLALIB 3104 functions. The following utility function encapsulates the PSLib 3105 mechanism to extract the value of UT1-UTC: 3106 \begin{verbatim} 3107 double psGetUT1Delta(psTime *time); 3108 psSphere *psGetPoleCoords(psTime *time); 3078 psTime *psTimeFromLST(psTime *time, double longitude); 3079 \end{verbatim} 3080 % 3081 The functions may accept either \code{psTimeType}. The \code{time} is 3082 modified and returned. Note that this function must supply the value 3083 UT1-UTC, which is available externally. The value UT1-UTC is 3084 necessary for this an various other SLALIB functions. The following 3085 utility function encapsulates the PSLib mechanism to extract the value 3086 of UT1-UTC: 3087 \begin{verbatim} 3088 double psTimeGetUT1Delta(const psTime *time); 3089 psSphere *psTimeGetPoleCoords(const psTime *time); 3109 3090 \end{verbatim} 3110 3091 … … 3115 3096 3116 3097 \begin{verbatim} 3117 psF64 psTimeToJD( psTime *time);3118 psF64 psTimeToMJD( psTime *time);3119 char *psTimeToISOTime( psTime *time);3120 struct timeval *psTimeToTimeval(psTime *time);3098 psF64 psTimeToJD(const psTime *time); 3099 psF64 psTimeToMJD(const psTime *time); 3100 char *psTimeToISOTime(const psTime *time); 3101 timeval *psTimeToTimeval(const psTime *time); 3121 3102 \end{verbatim} 3122 3103 … … 3127 3108 3128 3109 \begin{verbatim} 3129 psTime *ps JDToTime(psF64 input);3130 psTime *ps MJDToTime(psF64 input);3131 psTime *ps ISOTimeToTime(char *input);3132 psTime *psTime valToTime(struct timeval *input);3110 psTime *psTimeFromJD(psF64 input); 3111 psTime *psTimeFromMJD(psF64 input); 3112 psTime *psTimeFromISO(const char *input); 3113 psTime *psTimeFromTimeval(const timeval *input); 3133 3114 \end{verbatim} 3134 3115 3135 3116 \subsubsection{Date and Time Math} 3136 3117 3118 \begin{verbatim} 3119 psTime *psTimeAdd(const psTime *tai1, psF64 delta); 3120 psF64 psTimeSubtract(const psTime *time1, const psTime *time2); 3121 psF64 psTimeDelta(const psTime *time1, const psTime *time2); 3122 \end{verbatim} 3123 \code{psTimeAdd} adds some time to a \code{psTime}. 3124 \code{psTimeSubtract} subtracts two times. \code{psTimeDelta} gives 3125 the absolute time difference between two times. 3126 3137 3127 Time math is only done on the \code{psTime} TAI type. 3138 3139 \begin{verbatim}3140 psTime *psTAIAdd(psTime *tai1, psTime *tai2);3141 psTime *psTAISub(psTime *tai1, psTime *tai2);3142 psTime *psTAIDelta(psTime *tai1, psTime *tai2);3143 \end{verbatim}3144 3128 3145 3129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 3260 3244 typedef struct { 3261 3245 const int id; ///< unique ID for this item 3262 c har *restrict name;///< Name of item3246 const char *name; ///< Name of item 3263 3247 psMetadataType type; ///< type of this item 3264 3248 const union { … … 3269 3253 } data; ///< value of metadata 3270 3254 char *comment; ///< optional comment ("", not NULL) 3271 psList * restrict items;///< list of psMetadataItems with the same name3255 psList *items; ///< list of psMetadataItems with the same name 3272 3256 } psMetadataItem; 3273 3257 \end{verbatim} … … 3301 3285 \begin{verbatim} 3302 3286 typedef struct { 3303 psList * restrict list;///< list of psMetadataItem3304 psHash * restrict table;///< hash table of the same metadata3287 psList *list; ///< list of psMetadataItem 3288 psHash *table; ///< hash table of the same metadata 3305 3289 } psMetadata; 3306 3290 \end{verbatim} … … 3356 3340 \end{verbatim} 3357 3341 3358 The \code{psMetadataItem} destructor is specified below. Note that3359 the destructor for \code{psMetadataItem} must call the appropriate3360 destructor for the \code{data.item} (recall that it is the duty of the3361 \code{psMyTypeFree}s to decrement the \code{refCounter} and free the3362 memory if and only if the \code{refCounter == 1} --- see3363 \S\ref{sec:free}).3364 \begin{verbatim}3365 void p_psMetadataItemFree(psMetadataItem *item);3366 \end{verbatim}3367 3368 3342 The constructor for the collection of metadata, \code{psMetadata}, 3369 3343 simply returns an empty metadata container (employing the constructors … … 3372 3346 \begin{verbatim} 3373 3347 psMetadata *psMetadataAlloc(void); 3374 void p_psMetadataFree(psMetadata *md);3375 3348 \end{verbatim} 3376 3349 … … 3389 3362 % 3390 3363 \begin{verbatim} 3391 bool psMetadataAddItem(psMetadata *restrict md, int where, 3392 psMetadataItem *restrict item); 3393 bool psMetadataAdd(psMetadata *restrict md, int where, 3394 const char *name, int format, const char *comment, ...); 3364 bool psMetadataAddItem(psMetadata *md, int where, psMetadataItem *item); 3365 bool psMetadataAdd(psMetadata *md, int where, const char *name, int format, const char *comment, ...); 3395 3366 \end{verbatim} 3396 3367 … … 3405 3376 % 3406 3377 \begin{verbatim} 3407 bool psMetadataRemove(psMetadata * restrict md, int where, const char *restrictkey);3378 bool psMetadataRemove(psMetadata *md, int where, const char *key); 3408 3379 \end{verbatim} 3409 3380 … … 3411 3382 event that the key is non-unique, the first item is returned. 3412 3383 \begin{verbatim} 3413 psMetadataItem *psMetadataLookup(const psMetadata *restrict md, 3414 const char *restrict key); 3384 psMetadataItem *psMetadataLookup(const psMetadata *md, const char *key); 3415 3385 \end{verbatim} 3416 3386 … … 3419 3389 \code{psList}. 3420 3390 \begin{verbatim} 3421 psMetadataItem *psMetadataGet(const psMetadata * restrictmd, int which);3391 psMetadataItem *psMetadataGet(const psMetadata *md, int which); 3422 3392 \end{verbatim} 3423 3393 … … 3434 3404 \begin{verbatim} 3435 3405 void psMetadataSetIterator(psMetadata *md, int where); 3436 psMetadataItem *psMetadataGetNext(psMetadata * restrict md, const char *restrictmatch, int which);3437 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, const char *restrictmatch, int which);3406 psMetadataItem *psMetadataGetNext(psMetadata *md, const char *match, int which); 3407 psMetadataItem *psMetadataGetPrevious(psMetadata *md, const char *match, int which); 3438 3408 \end{verbatim} 3439 3409 … … 3447 3417 data type, printing is not allowed. 3448 3418 \begin{verbatim} 3449 void psMetadataItemPrint(FILE *fd, const char *format, const psMetadataItem * restrictmd);3419 void psMetadataItemPrint(FILE *fd, const char *format, const psMetadataItem *md); 3450 3420 \end{verbatim} 3451 3421 3452 3422 \begin{verbatim} 3453 3423 psMetadata *psMetadataReadHeader(psMetadata *output, const char *extname, 3454 int extnum, const char *filename);3424 int extnum, const char *filename); 3455 3425 \end{verbatim} 3456 3426 Read header data from a FITS image file into a \code{psMetadata} … … 3462 3432 \begin{verbatim} 3463 3433 psMetadata *psMetadataFReadHeader(psMetadata *output, const char *extname, 3464 int extnum, FILE *f);3434 int extnum, FILE *f); 3465 3435 \end{verbatim} 3466 3436 Read header data from a FITS image file descriptor into a … … 3587 3557 % 3588 3558 \begin{verbatim} 3589 psPlane *psPlaneTransformApply (psPlane *out,3590 const psPlaneTransform *transform,3591 const psPlane *coords);3592 psPlane *psPlaneDistortApply (psPlane *out,3593 const psPlaneDistort *distort,3594 const psPlane *coords,3595 float term3, float term4);3559 psPlane *psPlaneTransformApply(psPlane *out, 3560 const psPlaneTransform *transform, 3561 const psPlane *coords); 3562 psPlane *psPlaneDistortApply(psPlane *out, 3563 const psPlaneDistort *distort, 3564 const psPlane *coords, 3565 float mag, float color); 3596 3566 \end{verbatim} 3597 3567 … … 3624 3594 \end{verbatim} 3625 3595 3626 The constructor and destructor aredefined as follows:3596 The constructor is defined as follows: 3627 3597 \begin{verbatim} 3628 3598 psSphereTransform *psSphereTransformAlloc(double NPlon, double NPlat, double ZP); 3629 void p_psSphereTransformFree(psSphereTransform *trans);3630 3599 \end{verbatim} 3631 3600 where \code{NPlon} and \code{NPlat} define the coordinates in the … … 3666 3635 \item AIT 3667 3636 \item PAR 3668 \item GLS3669 3637 \end{itemize} 3670 3638 … … 3712 3680 3713 3681 \begin{verbatim} 3714 psSphere *psSphereGetOffset(const psSphere * restrictposition1,3715 const psSphere * restrictposition2,3682 psSphere *psSphereGetOffset(const psSphere *position1, 3683 const psSphere *position2, 3716 3684 psSphereOffsetMode mode, 3717 3685 psSphereOffsetUnit unit); 3718 3686 3719 psSphere *psSphereSetOffset(const psSphere * restrictposition,3720 const psSphere * restrictoffset,3687 psSphere *psSphereSetOffset(const psSphere *position, 3688 const psSphere *offset, 3721 3689 psSphereOffsetMode mode, 3722 3690 psSphereOffsetUnit unit); 3723 3691 3724 3692 typedef enum { 3725 PS_SPHERICAL;3726 PS_LINEAR;3693 PS_SPHERICAL; ///< Offset on a sphere 3694 PS_LINEAR; ///< Linear offset 3727 3695 } psSphereOffsetMode; 3728 3696 3729 3697 typedef enum { 3730 PS_ARCSEC;3731 PS_ARCMIN;3732 PS_DEGREE;3733 PS_RADIAN;3698 PS_ARCSEC; ///< Arcseconds 3699 PS_ARCMIN; ///< Arcminutes 3700 PS_DEGREE; ///< Degrees 3701 PS_RADIAN; ///< Radians 3734 3702 } psSphereOffsetUnit; 3735 3703 \end{verbatim} … … 3814 3782 \subsubsection{Positions of Major SS Objects} 3815 3783 3816 We require the ability to calculate the position of major Solar System 3817 objects, as well as Lunar phase. These functions all take the 3818 specified modified julian date, \code{mjd}, and the latitude/longitude 3819 of the observer. 3820 3821 \begin{verbatim} 3822 psSphere *psSunGetPos(psTime time); 3823 psTime *psSunGetRise (psTime *twi15, psTime *twi18, psTime time); 3824 psTime *psSunGetSet (psTime *twi15, psTime *twi18, psTime time); 3784 \tbd{We require the ability to calculate the position of major Solar System 3785 objects, as well as Lunar phase.} 3786 3787 \begin{verbatim} 3788 psSphere *psSunGetPos(psTime *time); 3789 psTime *psSunGetRise (psTime *twi15, psTime *twi18, const psTime *time); 3790 psTime *psSunGetSet (psTime *twi15, psTime *twi18, const psTime *time); 3825 3791 3826 3792 psSphere *psMoonGetPos(psTime time, psSphere location); 3827 psTime *psMoonGetRise (psTime *twi15, psTime *twi18, psTime time);3828 psTime *psMoonGetSet (psTime *twi15, psTime *twi18, psTime time);3793 psTime *psMoonGetRise (psTime *twi15, psTime *twi18, psTime *time); 3794 psTime *psMoonGetSet (psTime *twi15, psTime *twi18, psTime *time); 3829 3795 float psGetMoonPhase(psTime time); 3830 3796 3831 3797 psSphere *psPlanetGetPos(psTime time, psSphere location); 3832 psTime *psPlanetGetRise (psTime *twi15, psTime *twi18, psTime time); 3833 psTime *psPlanetGetSet (psTime *twi15, psTime *twi18, psTime time); 3834 3798 psTime *psPlanetGetRise (psTime *twi15, psTime *twi18, psTime *time); 3799 psTime *psPlanetGetSet (psTime *twi15, psTime *twi18, psTime *time); 3835 3800 \end{verbatim} 3836 3801
Note:
See TracChangeset
for help on using the changeset viewer.
