Changeset 755
- Timestamp:
- May 21, 2004, 4:43:54 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibADD.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibADD.tex
r726 r755 1 %%% $Id: psLibADD.tex,v 1.1 4 2004-05-19 00:48:05price Exp $1 %%% $Id: psLibADD.tex,v 1.15 2004-05-22 02:43:54 price Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 4 \usepackage{amsmath} 3 5 4 6 % basic document variables … … 24 26 \RevisionsStart 25 27 % version Date Description 26 \theversion & 2003 Mar 11 & Hacking \\ 28 00 & 2004 Mar 11 & Hacking \\ 29 01 & 2004 May 21 & Added section on 2D Chebyshev fitting. \\ 27 30 \RevisionsEnd 28 31 … … 507 510 \end{center} 508 511 512 \paragraph{Fitting a 2D Chebyshev Polynomial} 513 514 Suppose we have an image, $z = z(x,y)$ with corresponding error 515 estimates, $\sigma_z(x,y)$, and want to fit this with a 2D Chebyshev 516 polynomial, 517 \begin{equation} 518 T(x,y) = \sum_{i,j} P_{i,j} T_i(x) T_j(y) 519 \end{equation} 520 where $T_i(x)$ is a Chebyshev polynomial in $x$ of order $i$ 521 (\S\ref{sec:polynomials}). Then we can calculate the coefficients, 522 $P_{i,j}$ by minimising $\chi^2$ in the standard manner: 523 524 \begin{eqnarray} 525 \chi^2 & = & \sum_{x,y} \left[ \frac{z(x,y) - P_{i,j} T_i(x) T_j(y)}{\sigma_z(x,y)} \right] ^2 \\ 526 \frac{\partial \chi^2}{\partial P_{k,l}} & = & -2 \sum_{x,y} \left[ \frac{z(x,y) - \sum_{i,j} P_{i,j} T_i(x) T_j(y)}{\sigma_z(x,y)} \right] \frac{T_k(x) T_l(y)}{\sigma_z(x,y)} 527 \end{eqnarray} 528 529 Setting the partial derivative to zero and assuming that the errors 530 are approximately equal over the image (as is the case for background 531 fitting), $\sigma_z(x,y) = \sigma = {\rm const}$, then: 532 \begin{equation} 533 \sum_{x,y} z(x,y) T_k(x) T_l(y) = \sum_{i,j} \sum_{x,y} P_{i,j} T_i(x) T_j(y) T_k(x) T_l(y) 534 \end{equation} 535 Then we use the orthogonality property of Chebyshev polynomials, namely, 536 \begin{equation} 537 \sum_{x=0}^N T_i(x) T_j(x) = \begin{cases} 0 & i \ne j \\ 538 N/2 & i=j \ne 0 \\ 539 N & i=j=0 \\ 540 \end{cases} 541 \end{equation} 542 543 \begin{eqnarray} 544 \sum_{x,y} z(x,y) T_k(x) T_l(y) & = & \sum_{i,j} P_{i,j} (\delta_{ik} N_x/2 + \delta_{i0} N_x/2) (\delta_{jl} N_y/2 + \delta_{j0} N_y/2) \\ 545 & = & ( P_{k,l} + P_{k,0} + P_{0,l} + P_{0,0} ) N_x N_y / 4 546 \end{eqnarray} 547 where $N_x$ and $N_y$ are the order of the polynomials in $x$ and $y$. 548 549 Note that this is not a matrix equation, but simply requires a single pass 550 through the data to calculate each coefficient. 551 509 552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 510 553 511 554 \subsubsection{Polynomials} 555 \label{sec:polynomials} 512 556 513 557 We will employ Chebyshev polynomials (NR \S 5.8) to approximate functions:
Note:
See TracChangeset
for help on using the changeset viewer.
