Changeset 3070 for trunk/doc/pslib
- Timestamp:
- Jan 21, 2005, 3:59:10 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 4 edited
-
ChangeLogADD.tex (modified) (1 diff)
-
ChangeLogSDRS.tex (modified) (4 diffs)
-
psLibADD.tex (modified) (3 diffs)
-
psLibSDRS.tex (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogADD.tex
r2640 r3070 17 17 \item Added short section on histograms in the presence of errors. 18 18 \item Added short note on inverse spherical transformations. 19 \item Added section on astronomical object models 19 20 \end{itemize} -
trunk/doc/pslib/ChangeLogSDRS.tex
r3069 r3070 1 %%% $Id: ChangeLogSDRS.tex,v 1.5 7 2005-01-20 08:25:45 price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.58 2005-01-22 01:57:42 eugene Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 390 390 \end{itemize} 391 391 392 \subsection{Changes from Revision 10 (30 November 2004) to present}392 \subsection{Changes from Revision 10 (30 November 2004) to Revision 11 (21 January 2005)} 393 393 394 394 \begin{itemize} … … 399 399 \item fixed error of psHash to psMetadata in psFitsReadHeaderSet 400 400 \item added psFitsWriteImage 401 \item changed psFitsWriteImageSection to psFitsUpdateImage {\bf verify} 402 \item changed psFitsWriteHeader to psFitsUpdateHeader {\bf verify} 401 \item changed psFitsWriteImageSection to psFitsUpdateImage 403 402 \item added header entry to psFitsWriteTable 404 403 \item added psFitsUpdateTable … … 434 433 PS_INTERPOLATE_BICUBIC_VARIANCE, PS_INTERPOLATE_SINC_VARIANCE}. 435 434 \item Added \code{psImageTransform}. 436 \end{itemize} 435 \item Added section of Database Functions 436 \end{itemize} -
trunk/doc/pslib/psLibADD.tex
r2779 r3070 1 %%% $Id: psLibADD.tex,v 1.5 6 2004-12-21 21:37:08 price Exp $1 %%% $Id: psLibADD.tex,v 1.57 2005-01-22 01:57:42 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1646 1646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1647 1647 1648 \subs ubsection{Missing and Todo}1648 \subsection{Missing and Todo} 1649 1649 1650 1650 \tbd{define SINC, LAGRANGE interpolation} … … 1659 1659 1660 1660 \tbd{define Brent's method \& minimization bracketing} 1661 1662 \section{Pan-STARRS Modules} 1663 1664 \subsection{Object Models} 1665 1666 \subsubsection{Real 2D Gaussian} 1667 1668 This function is a two-dimensional Gaussian with an elliptical 1669 cross-section and a constant local background: 1670 \[ 1671 f(x,y) = Z_o e^{-z} + S_o 1672 \] 1673 where 1674 \[ 1675 z = \frac{(x - x_o)^2}{2\sigma_x^2} + \frac{(y-y_o)^2}{2\sigma_y^2} + (x-x_o) (y - y_o) \sigma_{xy} 1676 \] 1677 1678 Below is the relationship between the \code{psModel} parameters and 1679 the function parameters, sample C-code implementing the function 1680 efficiently, and the value of the derivatives: 1681 1682 \begin{verbatim} 1683 param[0] = So; 1684 param[1] = Zo; 1685 param[2] = Xo; 1686 param[3] = Yo; 1687 param[4] = sqrt(2) / SigmaX; 1688 param[5] = sqrt(2) / SigmaY; 1689 param[6] = Sxy; 1690 1691 X = x[0] - param[2]; 1692 Y = x[1] - param[3]; 1693 1694 px = param[4]*X; 1695 py = param[5]*Y; 1696 1697 z = 0.5*SQ(px) + 0.5*SQ(py) + param[6]*X*Y; 1698 r = exp(-z); 1699 f = param[1]*r + param[0]; 1700 /* f is the function value */ 1701 1702 q = param[1]*r; 1703 deriv[0] = +1; 1704 deriv[1] = +r; 1705 deriv[2] = q*(2*px*param[4] + param[6]*Y); 1706 deriv[3] = q*(2*py*param[5] + param[6]*X); 1707 deriv[4] = -2*q*px*X; 1708 deriv[5] = -2*q*py*Y; 1709 deriv[6] = -q*X*Y; 1710 \end{verbatim} 1711 1712 The intial guess for the Gaussian parameters may be taken from the 1713 moments, peak value, and local sky. 1714 1715 \subsubsection{Pseudo-Gaussian} 1716 1717 This function is a polynomial approximation of a 2D Gaussian. The 1718 function is very similar to the real Gaussian: 1719 \[ 1720 f(x,y) = Z_o (1 + z + z^2/2 + z^3/6)^{-1} + S_o 1721 \] 1722 where 1723 \[ 1724 z = \frac{(x - x_o)^2}{2\sigma_x^2} + \frac{(y-y_o)^2}{2\sigma_y^2} + (x-x_o) (y - y_o) \sigma_{xy} 1725 \] 1726 1727 Below is the relationship between the \code{psModel} parameters and 1728 the function parameters, sample C-code implementing the function 1729 efficiently, and the value of the derivatives: 1730 1731 \begin{verbatim} 1732 param[0] = So; 1733 param[1] = Zo; 1734 param[2] = Xo; 1735 param[3] = Yo; 1736 param[4] = sqrt(2) / SigmaX; 1737 param[5] = sqrt(2) / SigmaY; 1738 param[6] = Sxy; 1739 1740 X = x[0] - param[2]; 1741 Y = x[1] - param[3]; 1742 1743 px = param[4]*X; 1744 py = param[5]*Y; 1745 1746 z = 0.5*SQ(px) + 0.5*SQ(py) + param[6]*X*Y; 1747 t = 1 + z + 0.5*z*z; 1748 r = 1.0 / (t*(1 + z/3)); /* ~ exp (-Z) */ 1749 f = param[1]*r + param[0]; 1750 /* f is the function value */ 1751 1752 /* note difference from a pure gaussian: q = param[1]*r */ 1753 q = param[1]*r*r*t; 1754 deriv[0] = +1; 1755 deriv[1] = +r; 1756 deriv[2] = q*(2*px*param[4] + param[6]*Y); 1757 deriv[3] = q*(2*py*param[5] + param[6]*X); 1758 deriv[4] = -2*q*px*X; 1759 deriv[5] = -2*q*py*Y; 1760 deriv[6] = -q*X*Y; 1761 \end{verbatim} 1762 1763 The intial guess for the Gaussian parameters may be taken from the 1764 moments, peak value, and local sky. 1765 1766 \subsubsection{Waussian} 1767 1768 The Waussian is a modified polynomial approximation of a 2D Gaussian, 1769 with non-linear polynomial terms having variable coefficients, rather 1770 than the Taylor series values of 1/2 and 1/6. The 1771 function is very similar to the pseudo-Gaussian: 1772 \[ 1773 f(x,y) = Z_o (1 + z + B_2 (z^2/2 + B_3 z^3/6))^{-1} + S_o 1774 \] 1775 where 1776 \[ 1777 z = \frac{(x - x_o)^2}{2\sigma_x^2} + \frac{(y-y_o)^2}{2\sigma_y^2} + (x-x_o) (y - y_o) \sigma_{xy} 1778 \] 1779 1780 Below is the relationship between the \code{psModel} parameters and 1781 the function parameters, sample C-code implementing the function 1782 efficiently, and the value of the derivatives. Note the fudge factors 1783 of 100 in the derivatives of $B_2$ and $B_3$: these are included to 1784 slow the variation of these parameters, which are otherwise very 1785 sensitive to small errors. 1786 1787 \begin{verbatim} 1788 param[0] = So; 1789 param[1] = Zo; 1790 param[2] = Xo; 1791 param[3] = Yo; 1792 param[4] = Sx; 1793 param[5] = Sy; 1794 param[6] = Sxy; 1795 param[7] = B2; 1796 param[8] = B3; 1797 1798 X = x - param[2]; 1799 Y = y - param[2]; 1800 1801 px = param[4]*X; 1802 py = param[5]*Y; 1803 1804 z = 0.5*SQ(px) + 0.5*SQ(py) + param[6]*X*Y; 1805 t = 0.5*z*z*(1 + param[8]*z/3); 1806 r = 1.0 / (1 + z + param[7]*t); /* ~ exp (-Z) */ 1807 f = param[1]*r + param[0]; 1808 1809 /* note difference from gaussian: q = param[1]*r */ 1810 q = param[1]*r*r*(1 + param[7]*z*(1 + param[8]*z/2)); 1811 deriv[0] = +1; 1812 deriv[1] = +r; 1813 deriv[2] = q*(2*px*param[4] + param[6]*Y); 1814 deriv[3] = q*(2*py*param[5] + param[6]*X); 1815 deriv[4] = -2*q*px*X; 1816 deriv[5] = -2*q*py*Y; 1817 deriv[6] = -q*X*Y; 1818 deriv[7] = -100*param[1]*r*r*t; 1819 deriv[8] = -100*param[1]*r*r*param[7]*(z*z*z)/6; 1820 /* the values of 100 dampen the swing of param[7,8] */ 1821 \end{verbatim} 1822 1823 \subsubsection{Twisted Gaussian} 1824 1825 This function describes an object with power-law wings and a flattened 1826 core, where the core has a different contour from the wings. 1827 1828 \[ 1829 f(x,y) = Z_{\rm pk} (1 + z_1 + z_2^M)^{-1} + Sky 1830 \] 1831 where 1832 \[ 1833 z_1 = \frac{x^2}{2\sigma_{x,in}^2} + \frac{y^2}{2\sigma_{y,in}^2} + x y \sigma_{xy,in} 1834 z_2 = \frac{x^2}{2\sigma_{x,out}^2} + \frac{y^2}{2\sigma_{y,out}^2} + x y \sigma_{xy,out} 1835 \] 1836 1837 \begin{verbatim} 1838 param[0] = So; 1839 param[1] = Zo; 1840 param[2] = Xo; 1841 param[3] = Yo; 1842 param[4] = SxInner; 1843 param[5] = SyInner; 1844 param[6] = SxyInner; 1845 param[7] = SxOuter; 1846 param[8] = SyOuter; 1847 param[9] = SxyOuter; 1848 param[10] = N; 1849 1850 X = x - param[2]; 1851 Y = y - param[3]; 1852 1853 px1 = param[4]*X; 1854 py1 = param[5]*Y; 1855 px2 = param[7]*X; 1856 py2 = param[8]*Y; 1857 1858 z1 = 0.5*SQ(px1) + 0.5*SQ(py1) + param[4]*X*Y; 1859 z2 = 0.5*SQ(px2) + 0.5*SQ(py2) + param[9]*X*Y; 1860 1861 r = 1.0 / (1 + z1 + pow(z2,param[10])); 1862 f = param[5]*r + param[6]; 1863 1864 q1 = param[5]*SQ(r); 1865 q2 = param[5]*SQ(r)*param[10]*pow(z2,(param[10]-1)); 1866 1867 deriv[0] = +1; 1868 deriv[1] = +r; 1869 deriv[2] = q1*(2*px1*param[4] + param[6]*Y) + q2*(2*px2*param[7] + param[9]*Y); 1870 deriv[3] = q1*(2*py1*param[5] + param[6]*X) + q2*(2*py2*param[8] + param[9]*X); 1871 1872 /* these fudge factors impede the growth of param[4] beyond param[7] */ 1873 f1 = fabs(param[7]) / fabs(param[4]); 1874 f2 = (f1 < FSCALE) ? 1 : FFACTOR*(f1 - FSCALE) + 1; 1875 deriv[4] = -2*q1*px1*X*f2; 1876 1877 /* these fudge factors impede the growth of param[5] beyond param[8] */ 1878 f1 = fabs(param[8]) / fabs(param[5]); 1879 f2 = (f1 < FSCALE) ? 1 : FFACTOR*(f1 - FSCALE) + 1; 1880 deriv[5] = -2*q1*py1*Y*f2; 1881 1882 deriv[6] = -q1*X*Y; 1883 1884 deriv[7] = -2*q2*px2*X; 1885 deriv[8] = -2*q2*py2*Y; 1886 deriv[9] = -q2*X*Y; 1887 deriv[10] = -q1*ln(z2); 1888 \end{verbatim} 1889 1890 The intial guess for the Gaussian parameters may be taken from the 1891 moments, peak value, and local sky. 1892 1893 \tbd{future galaxy models to be implemented} 1894 1895 \begin{verbatim} 1896 float Sersic() 1897 param[0] = So; 1898 param[1] = Zo; 1899 param[2] = Xo; 1900 param[3] = Yo; 1901 param[4] = Sx; 1902 param[5] = Sy; 1903 param[6] = Sxy; 1904 param[7] = Nexp; 1905 1906 float SersicBulge() 1907 param[0] So; 1908 param[1] Zo; 1909 param[2] Xo; 1910 param[3] Yo; 1911 param[4] SxInner; 1912 param[5] SyInner; 1913 param[6] SxyInner; 1914 param[7] Zd; 1915 param[8] SxOuter; 1916 param[9] SyOuter; 1917 param[10] = SxyOuter; 1918 param[11] = Nexp; 1919 \end{verbatim} 1661 1920 1662 1921 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
trunk/doc/pslib/psLibSDRS.tex
r3069 r3070 1 %%% $Id: psLibSDRS.tex,v 1.16 8 2005-01-20 08:25:55 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.169 2005-01-22 01:57:42 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 11 11 \project{Pan-STARRS Image Processing Pipeline} 12 12 \organization{Institute for Astronomy} 13 \version{1 0}13 \version{11} 14 14 \docnumber{PSDC-430-007} 15 15 … … 41 41 09 & 2004 Nov 15 & final for cycle 4 \\ \hline 42 42 10 & 2004 Nov 30 & update for cycle 4 \\ 43 11 & 2005 Jan 21 & draft for cycle 5 \\ 43 44 \RevisionsEnd 44 45 … … 97 98 search path, PSLib may be used within a program by including the line 98 99 \code{#include <pslib.h>} into the C code and linking with 99 \code{-lpslib }.100 \code{-lpslib.} 100 101 101 102 This document describes the data structures and details the functions … … 109 110 principle relevance and VerbPhase describes the operation applied to 110 111 that data type. For example, the function which copies an image (of 111 type \code{psImage}) is called \code{psImageCopy() }.112 type \code{psImage}) is called \code{psImageCopy().} 112 113 113 114 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 4193 4194 typedef xmlDocPtr psXMLDoc; 4194 4195 void psXMLDocFree(psXMLDoc *doc); 4195 \end{verbatim} .4196 \end{verbatim} 4196 4197 4197 4198 The next pair of functions convert a \code{psMetadata} data structure … … 4200 4201 psXMLDoc *psMetadataToXMLDoc(const psMetadata *metadata); 4201 4202 psMetadata *psXMLDocToMetadata(const psXMLDoc *doc); 4202 \end{verbatim} .4203 \end{verbatim} 4203 4204 4204 4205 The next pair of functions loads the data in a named file into a … … 4208 4209 psXMLDoc *psXMLParseFile(const char *filename); 4209 4210 int psXMLDocToFile(const psXMLDoc *doc, const char *filename); 4210 \end{verbatim} .4211 \end{verbatim} 4211 4212 4212 4213 The next pair of functions accepts a block of memory and parses it … … 4215 4216 psXMLDoc *psXMLParseMemory(const char *buffer, const int size); 4216 4217 int psXMLDocToMemory(const psXMLDoc *doc, char *buffer); 4217 \end{verbatim} .4218 \end{verbatim} 4218 4219 4219 4220 The next pair of functions read from and write to a file descriptor. … … 4224 4225 psXMLDoc *psXMLParseFD(int fd); 4225 4226 int psXMLDocToFD(const psXMLDoc *doc, int fd); 4226 \end{verbatim}. 4227 \end{verbatim} 4228 4229 \subsection{Database Functions} 4230 4231 Many of the applications that PSLib will be used for will require 4232 access to a simple relational database. PSLib includes generic 4233 database-independent interface mechanisms as part of its API set. The 4234 most important aspect of PSLib's database support is to abstract as 4235 much database specific complexity as is feasible. As almost all RDBMS 4236 provide at least a simple transactional model, commit and rollback 4237 support should be provided. 4238 4239 Currently, only support for MySQL 4.1.x is required but other backends 4240 may be added as options in the future. As a particular example which 4241 has implications for the database interaction model, support for 4242 SQLite may be required in the future. Currently, the choice of 4243 backend database interface may be made as a compile option. Details 4244 of the specified APIs in the discussion below refer to the relevant 4245 MySQL functions. 4246 4247 Database errors must be trapped and placed onto the psError stack. 4248 The complete error message should be retrieved with the database's 4249 error function. 4250 4251 \subsubsection{Managing the Database Connection} 4252 4253 We specify a database handle which carries the information about the 4254 database connection: 4255 4256 \begin{verbatim} 4257 typedef struct { 4258 MYSQL mysql; 4259 } psDB; 4260 \end{verbatim} 4261 4262 The following collection of functions provides basic database functionality: 4263 4264 \begin{verbatim} 4265 // wraps mysql_init() & mysql_real_connect() 4266 psDB *psDBInit(const char *host, const char *user, const char *passwd, const char *dbname); 4267 4268 // wraps mysql_close() 4269 void psDBCleanup(psDB *dbh); 4270 4271 // wraps mysql_create_db() 4272 bool psDBCreate(psDB *dbh, const char *dbname); 4273 4274 // wraps mysql_select_db() 4275 bool psDBChange(psDB *dbh, const char *dbname); 4276 4277 // wraps mysql_drop_db() 4278 bool psDBDrop(psDB *dbh, const char *dbname); 4279 \end{verbatim} 4280 4281 For MySQL support, \code{psDBInit()} wraps \code{mysql_init()} and 4282 \code{mysql_real_connect()} in order to initialize a psDB structure and 4283 establish a database connection. A null pointer should be returned on 4284 failure. 4285 4286 When implementing support for SQLite, or other DB which is purely 4287 file-based, the \code{host}, \code{user}, and \code{passwd} arguments 4288 would be ignored while \code{dbname} would specify the path to the 4289 SQLite db file. 4290 4291 \subsubsection{Interacting with Database Tables} 4292 4293 The functions in this section perform high level interactions with the 4294 database tables. All of them should behave ``atomically'' with 4295 respect to the state of the database. Specifically, all interactions 4296 with the database should be done as a part of a transaction that is 4297 rolled-back on failure and committed only after all queries used by 4298 the API have been run. In general, this API set attempts to treat a 4299 database table as a 2D matrix where columns can be represented by a 4300 \code{psVector} and rows as a \code{psMetadata} type. A 4301 \code{psMetadata} collection is also used to define the columns of a 4302 table and as part of the query restrictions. 4303 4304 \begin{verbatim} 4305 bool psDBCreateTable(psDB *dbh, const char *tableName, psMetadata *md); 4306 \end{verbatim} 4307 4308 This function generates and executes the SQL needed to create a table 4309 named \code{tableName}, with the column names and datatypes as 4310 described in \code{md}. Each data item in the \code{psMetadata} 4311 collection represents a single table field. The name of the field is 4312 given by the name of the \code{psMetadataItem} and the data type is 4313 give by the \code{psMetadataItem.type} and \code{psMetadataItem.ptype} 4314 entries. A lookup table should be used to convert from PSLib types 4315 into MySQL compatible SQL data types. For example, a 4316 \code{PS_META_STR} would map to an SQL99 varchar. If value of 4317 \code{type} is \code{PS_META_STR} then the \code{psMetadataItem.data} 4318 element is set to a string with the length for the field written as a 4319 text string. The value of the \code{psMetadataItem.data} element is 4320 unused for the \code{PS_META_PRIMITIVE} types. Other metadata types 4321 beyond \code{PS_META_STR} and \code{PS_META_PRIMITIVE} are not allowed 4322 in a table definition metadata collection. 4323 4324 Database indexes can be specified setting the \code{comment} field to 4325 ``\code{Primary Key}'' or ``\code{Key}''. Comment are otherwise 4326 ignored. 4327 4328 \begin{verbatim} 4329 bool psDBDropTable(psDB *dbh, const char *tableName); 4330 \end{verbatim} 4331 4332 This function deletes the specified table. 4333 4334 \begin{verbatim} 4335 psArray *psDBSelectColumn(psDB *dbh, const char *tableName, const char *col, const psU64 limit); 4336 psVector *psDBSelectColumnNum(psDB *dbh, const char *tableName, const char *col, const psU64 limit); 4337 \end{verbatim} 4338 4339 These functions generates and executes the SQL needed to select an 4340 entire column from a table or up to \code{limit} rows from it. If 4341 \code{limit} is 0, the entire range is returned. The database 4342 response is processed and a \code{psArray} of elements of the native 4343 type is returned. The Num version of the function returns the data in 4344 a \code{psVector}. It returns an error (NULL) if the requested field 4345 is not a numerical type. 4346 4347 \begin{verbatim} 4348 psArray *psDBSelectRows(psDB *dbh, const char *tableName, psMetadata *where); 4349 \end{verbatim} 4350 4351 This function returns rows from the specified table which match 4352 the restrictions given by \code{where}. The restrictions are 4353 specified as field / value pairs. The \code{psMetadata} collection 4354 where must consist of valid database fields, though the database query 4355 checking functions may be used to validate the fields as part of the 4356 query. If \code{where} is \code{NULL}, then there are no restrictions 4357 on the rows selected. The selected rows are returned as a 4358 \code{psArray} of \code{psMetadata} values, one per row. 4359 4360 \begin{verbatim} 4361 bool psDBInsertRow(psDB *dbh, const char *tableName, psMetadata *row); 4362 \end{verbatim} 4363 4364 Insert the data from \code{row} into \code{tableName}. It should be noted in 4365 the API reference that if fields are specified in \code{row} that do not exist 4366 in \code{tablename}, the insert will fail. 4367 4368 \begin{verbatim} 4369 psArray *psDBDumpRows(psDB *dbh, const char *tableName); 4370 \end{verbatim} 4371 4372 Fetch all rows as an psArray of psMetadata. 4373 4374 \begin{verbatim} 4375 psArray *psDBDumpCols(psDB *dbh, const char *tableName); 4376 \end{verbatim} 4377 4378 Fetch all columns as an psArray of psVector 4379 4380 \begin{verbatim} 4381 psU64 psDBUpdateRow(psDB *dbh, const char *tableName, psMetadata *where, psMetadata *values); 4382 \end{verbatim} 4383 4384 Update the columns contained in \code{values} in the row(s) that have a field 4385 with the value indicated by \code{where} (note that this is only allows very 4386 limited use of SQL99's ``where'' semantics). The number of rows modified is 4387 returned. If there are multiple psMetadataItems in \code{where} then each item 4388 should be considered as an additional constraint. e.g. ``where foo = x and 4389 where bar = y'' 4390 4391 \begin{verbatim} 4392 psU64 psDBDeleteRow(psDB *dbh, const char *tableName, psMetadata *where); 4393 \end{verbatim} 4394 4395 Delete the rows that are matched by \code{where} using the same semantics for 4396 \code{where} as in psDBUpdateRow(). 4227 4397 4228 4398 \subsection{FITS I/O Functions} … … 4598 4768 4599 4769 \begin{verbatim} 4600 psPlaneTransform *psPlaneTransformInvert(psPlaneTransform *out, const psPlaneTransform *in, float xMin, 4601 float xMax, float yMin, float yMax, int nSamples); 4602 psPlaneTransform *psPlaneTransformCombine(psPlaneTransform *out, const psPlaneTransform *trans1, 4603 const psPlaneTransform *trans2); 4604 bool psPlaneTranformFit(psPlaneTransform *trans, const psArray *source, const psArray *dest, int nRejIter, 4605 float sigmaClip); 4770 psPlaneTransform *psPlaneTransformInvert(psPlaneTransform *out, const psPlaneTransform *in, psRegion *region, int nSamples); 4771 psPlaneTransform *psPlaneTransformCombine(psPlaneTransform *out, const psPlaneTransform *trans1, const psPlaneTransform *trans2); 4772 bool psPlaneTranformFit(psPlaneTransform *trans, const psArray *source, const psArray *dest, int nRejIter, float sigmaClip); 4606 4773 \end{verbatim} 4607 4774 … … 4612 4779 the forward transformation. In the event that the input 4613 4780 transformation is linear, an exact solution may be calculated; 4614 otherwise \code{nSamples} samples in each axis, ranging from4615 \code{xMin} to \code{xMax} and \code{yMin} to \code{yMax} shall be 4616 used as a grid to fit the best inverse transformation. The function 4617 shall return \code{NULL} if it was unable to generate the inverse 4618 transformation; otherwise it shall return the inverse transformation. 4619 In the event that \code{out} is \code{NULL}, a new 4620 \code{psPlaneTransform} shall be allocated andreturned.4621 4622 \code{psPlaneTransform Subsume} takes two transformations4781 otherwise \code{nSamples} samples in each axis, covering the region 4782 specified by \code{region} shall be used as a grid to fit the best 4783 inverse transformation. The function shall return \code{NULL} if it 4784 was unable to generate the inverse transformation; otherwise it shall 4785 return the inverse transformation. In the event that \code{out} is 4786 \code{NULL}, a new \code{psPlaneTransform} shall be allocated and 4787 returned. 4788 4789 \code{psPlaneTransformCombine} takes two transformations 4623 4790 (\code{trans1} and \code{trans2}) and returns a single transformation 4624 4791 that has the effect of performing \code{trans1} followed by 4625 4792 \code{trans2}. The function shall return \code{NULL} if it was unable 4626 4793 to generate the transformation; otherwise it shall return the 4627 transformation. \tbd{Not sure on the algorithm yet --- it may be the 4628 same as for \code{psPlaneTransformInvert}, in which case we will need 4629 the ranges and number of samples as well.} 4630 4631 \code{psPlaneTransform} takes two arrays containing matched 4632 coordinates (i.e., coordinates the \code{source} correspond to the 4633 appropriate coordinates in the \code{dest}) and returns the 4794 transformation. 4795 4796 \code{psPlaneTransformFit} takes two arrays containing matched 4797 coordinates (i.e., coordinates in the \code{source} array correspond 4798 to the coordinates in the \code{dest} array) and returns the 4634 4799 best-fitting transformation. The \code{source} and \code{dest} will 4635 4800 contain \code{psCoord}s. In the event that the number of coordinates
Note:
See TracChangeset
for help on using the changeset viewer.
