Changeset 1028 for trunk/doc/pslib/psLibADD.tex
- Timestamp:
- Jun 14, 2004, 11:19:36 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibADD.tex (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibADD.tex
r758 r1028 1 %%% $Id: psLibADD.tex,v 1.1 7 2004-05-24 20:14:06 eugene Exp $1 %%% $Id: psLibADD.tex,v 1.18 2004-06-14 21:19:36 price Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 520 520 \end{center} 521 521 522 \paragraph{Fitting a 2D Chebyshev Polynomial}523 524 Suppose we have an image, $z = z(x,y)$ with corresponding error525 estimates, $\sigma_z(x,y)$, and want to fit this with a 2D Chebyshev526 polynomial,527 \begin{equation}528 T(x,y) = \sum_{i,j} P_{i,j} T_i(x) T_j(y)529 \end{equation}530 where $T_i(x)$ is a Chebyshev polynomial in $x$ of order $i$531 (\S\ref{sec:polynomials}). Then we can calculate the coefficients,532 $P_{i,j}$ by minimising $\chi^2$ in the standard manner:533 534 \begin{eqnarray}535 \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 \\536 \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)}537 \end{eqnarray}538 539 Setting the partial derivative to zero and assuming that the errors540 are approximately equal over the image (as is the case for background541 fitting), $\sigma_z(x,y) = \sigma = {\rm const}$, then:542 \begin{equation}543 \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)544 \end{equation}545 Then we use the orthogonality property of Chebyshev polynomials, namely,546 \begin{equation}547 \sum_{x=0}^N T_i(x) T_j(x) = \begin{cases} 0 & i \ne j \\548 N/2 & i=j \ne 0 \\549 N & i=j=0 \\550 \end{cases}551 \end{equation}552 553 \begin{eqnarray}554 \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) \\555 & = & ( P_{k,l} + P_{k,0} + P_{0,l} + P_{0,0} ) N_x N_y / 4556 \end{eqnarray}557 where $N_x$ and $N_y$ are the order of the polynomials in $x$ and $y$.558 559 Note that this is not a matrix equation, but simply requires a single pass560 through the data to calculate each coefficient.561 562 522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 563 523
Note:
See TracChangeset
for help on using the changeset viewer.
