Changeset 2188
- Timestamp:
- Oct 21, 2004, 12:40:25 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r2187 r2188 1 %%% $Id: ChangeLogSDRS.tex,v 1.3 6 2004-10-21 21:54:57price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.37 2004-10-21 22:40:25 price Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 352 352 \item In \code{psVectorStats} and \code{psVectorHistogram}, the \code{errors} 353 353 vector must be of the same type as the input values vector. 354 \item Added \code{psLookupTable} section, and removed 355 \code{psTimeTableInterpolate} (now redundant). 354 356 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r2187 r2188 1 %%% $Id: psLibSDRS.tex,v 1.1 39 2004-10-21 21:55:03price Exp $1 %%% $Id: psLibSDRS.tex,v 1.140 2004-10-21 22:39:57 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 1717 1717 \code{psHash} table as a linked list. 1718 1718 1719 \subsection{Lookup Tables} 1720 1721 Lookup tables store a variety of values indexed on a certain column. 1722 An example is for storing the difference between UT1 and UTC, and the 1723 polar motion vector as a function of date. 1724 1725 \begin{verbatim} 1726 typedef struct { 1727 psVector *index; ///< Index values 1728 psArray *values; ///< Corresponding values: an array of vectors 1729 } psLookupTable; 1730 \end{verbatim} 1731 1732 \code{index} shall contain the index values, which shall be sorted in 1733 increasing order. The \code{values} shall consist of an array of 1734 vectors, each of the same length as the \code{index} vector. The 1735 vectors (including the \code{index} and all vectors in the 1736 \code{values} array) may be any numerical type except complex types. 1737 1738 The constructor shall be: 1739 \begin{verbatim} 1740 psLookupTable *psLookupTableAlloc(int numValues); 1741 \end{verbatim} 1742 Here the \code{numValues} indicates the number of vectors in the 1743 \code{values} array. 1744 1745 The destructor shall also free the components. 1746 1747 \begin{verbatim} 1748 psLookupTable *psLookupTableRead(const char *filename, int numValues); 1749 \end{verbatim} 1750 \code{psLookupTableRead} shall read the file specified by 1751 \code{filename} and import the data into a \code{psLookupTable}. The 1752 file shall be plain text, with index and values on separate lines, 1753 separated by whitespace. Lines commencing with a comment character 1754 (the pound sign, \code{#}) and blank lines shall be ignored. 1755 \code{numValues} in addition to the index shall be read on each line. 1756 If the \code{index} vector is not sorted in the file, the lookup table 1757 shall be sorted prior to the function returning, but no sort shall be 1758 performed if the indices were sorted in the file. 1759 1760 Interpolation on a lookup table is performed by the following 1761 functions: 1762 \begin{verbatim} 1763 psF64 psLookupTableInterpolate(psLookupTable *table, psF64 index, int column); 1764 psVector *psLookupTableInterpolateAll(psLookupTable *table, psF64 index); 1765 \end{verbatim} 1766 Both functions shall interpolate the \code{table} at the provided 1767 \code{index}. For \code{psLookupTableInterpolate}, only the value in 1768 the specified \code{column} shall be calculated and returned. For 1769 \code{psLookupTableInterpolateAll}, all the values shall be calculated 1770 and returned as a \code{psVector}, the type of which shall be 1771 \code{PS_TYPE_F64}. If the \code{index} is beyond the range of the 1772 \code{table}, \code{psLookupTableInterpolate} shall return \code{NaN}, 1773 and \code{psLookupTableInterpolateAll} shall return \code{NULL} --- 1774 that is, no attempt is made at extrapolation. 1775 1776 1777 1778 1779 1780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1781 1719 1782 \section{Data manipulation} 1720 1783 … … 1732 1795 \item Minimization and fitting routines. 1733 1796 \end{itemize} 1734 1735 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1736 1797 1737 1798 \subsection{BitSets} … … 3410 3471 PSLib). The format of these files shall be simple, for speed in 3411 3472 reading: Each line shall contain the MJD, $x_p$ (in arcseconds), $y_p$ 3412 (in arcseconds) and $\Delta$UT (in seconds) separated by whitespace; 3413 blank lines and lines commencing with the comment character (the hash 3414 symbol, \code{#}) as the first character shall be ignored. For 3415 example: 3473 (in arcseconds) and $\Delta$UT (in seconds) in a format readable by 3474 \code{psLookupTableRead}. For example: 3416 3475 3417 3476 \begin{verbatim} … … 3446 3505 const char *filename; // Filename of time table 3447 3506 const psF64 validFrom, validTo; // MJDs of validity of time table 3448 bool loaded; // Has the table been loaded? 3449 psVector *mjd; // MJD data, type is psF64 3450 psVector *dut; // delta UT = UT1 - UTC data 3451 psVector *xp, *yp; // Polar motion data 3507 psLookupTable *table; // Lookup table indexed on MJD, with UT1-UTC, xp and yp 3452 3508 } psTimeTable; 3453 3509 \end{verbatim} … … 3473 3529 \end{verbatim} 3474 3530 3475 Given a time \code{table} and a Modified Julian Date, \code{mjd}, at3476 which to interpolate values, \code{psTimeTableInterpolate} shall3477 calculate the appropriate UT1-UTC (\code{dut}; if non-\code{NULL}),3478 and polar motion (\code{xp,yp}; if non-\code{NULL}) by interpolation3479 on the table. If the \code{mjd} is outside the range of the table or3480 the interpolation was for some other reason unsuccessful, then the3481 function shall return \code{false}; otherwise the function shall set3482 those parameters which are non-\code{NULL} (\code{dut,xp,yp}) and3483 return \code{true}. If the requested \code{mjd} lies in the range of3484 the \code{table}, but the \code{table} has not been \code{loaded},3485 then the function shall call \code{psTimeTableLoad}.3486 \begin{verbatim}3487 bool psTimeTableInterpolate(const psTimeTable *table, double *xp,3488 double *yp, double *dut, psF64 mjd);3489 \end{verbatim}3531 %Given a time \code{table} and a Modified Julian Date, \code{mjd}, at 3532 %which to interpolate values, \code{psTimeTableInterpolate} shall 3533 %calculate the appropriate UT1-UTC (\code{dut}; if non-\code{NULL}), 3534 %and polar motion (\code{xp,yp}; if non-\code{NULL}) by interpolation 3535 %on the table. If the \code{mjd} is outside the range of the table or 3536 %the interpolation was for some other reason unsuccessful, then the 3537 %function shall return \code{false}; otherwise the function shall set 3538 %those parameters which are non-\code{NULL} (\code{dut,xp,yp}) and 3539 %return \code{true}. If the requested \code{mjd} lies in the range of 3540 %the \code{table}, but the \code{table} has not been \code{loaded}, 3541 %then the function shall call \code{psTimeTableLoad}. 3542 %\begin{verbatim} 3543 %bool psTimeTableInterpolate(const psTimeTable *table, double *xp, 3544 % double *yp, double *dut, psF64 mjd); 3545 %\end{verbatim} 3490 3546 3491 3547 \paragraph{Time Metadata}
Note:
See TracChangeset
for help on using the changeset viewer.
