Index: trunk/doc/pslib/psLibADD.tex
===================================================================
--- trunk/doc/pslib/psLibADD.tex	(revision 9785)
+++ trunk/doc/pslib/psLibADD.tex	(revision 10586)
@@ -1,3 +1,3 @@
-%%% $Id: psLibADD.tex,v 1.94 2006-10-30 21:45:46 eugene Exp $
+%%% $Id: psLibADD.tex,v 1.95 2006-12-09 00:30:57 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1146,6 +1146,6 @@
 \begin{equation} 
 \left( \begin{array}{c} x^\prime \\ y^\prime \end{array} \right) =
-\left| \begin{array}{cc} \cos \theta & \sin \theta \\ 
-                        -\sin \theta & \cos \theta 
+\left| \begin{array}{cc} \cos \theta & -\sin \theta \\ 
+                         \sin \theta & \cos \theta 
 \end{array} \right|
 \left( \begin{array}{c} x \\ y \end{array} \right)
@@ -1154,11 +1154,11 @@
 (aligned) ellipse.  Applying this rotation to (\ref{aligned-ellipse}) yields:
 \begin{equation} 
-z = \frac{x^2 \cos^2 \theta + y^2 \sin^2 \theta + 2 x y \sin \theta \cos \theta}{2\sigma_a^2} +
-    \frac{x^2 \sin^2 \theta + y^2 \cos^2 \theta - 2 x y \sin \theta \cos \theta}{2\sigma_b^2} 
+z = \frac{x^2 \cos^2 \theta + y^2 \sin^2 \theta - 2 x y \sin \theta \cos \theta}{2\sigma_a^2} +
+    \frac{x^2 \sin^2 \theta + y^2 \cos^2 \theta + 2 x y \sin \theta \cos \theta}{2\sigma_b^2} 
 \end{equation}
 Grouping these terms together, we find:
 \begin{equation} 
 z = \frac{x^2}{2}(\sigma_a^{-2} \cos^2 \theta + \sigma_b^{-2}\sin^2 \theta) + 
-    \frac{y^2}{2}(\sigma_b^{-2} \cos^2 \theta + \sigma_a^{-2}\sin^2 \theta) - 
+    \frac{y^2}{2}(\sigma_b^{-2} \cos^2 \theta + \sigma_a^{-2}\sin^2 \theta) + 
     \frac{xy}{2} \sin (2 \theta) (\sigma_b^{-2} - \sigma_a^{-2})
 \end{equation}
@@ -1192,5 +1192,5 @@
 From these, we may derive the equations for $\sigma_a$, $\sigma_b$, and $\theta$:
 \begin{eqnarray}
-\theta & = & \frac{1}{2} \arg (-2 \sigma_{xy}, f_2) \\
+\theta & = & \frac{1}{2} \arg (2 \sigma_{xy}, f_2) \\
 \sigma_a & = & \sqrt{\frac{2}{f_1 - f_3}} \\
 \sigma_b & = & \sqrt{\frac{2}{f_1 + f_3}}
@@ -1210,6 +1210,6 @@
 \left| 
 \begin{array}{cc}
-+\cos \theta & +\sin \theta \\
--\sin \theta & +\cos \theta \\
++\cos \theta & -\sin \theta \\
++\sin \theta & +\cos \theta \\
 \end{array} \right| 
 \left| 
@@ -1220,6 +1220,6 @@
 \left| 
 \begin{array}{cc}
-+\cos \theta & -\sin \theta \\
-+\sin \theta & +\cos \theta \\
++\cos \theta & +\sin \theta \\
+-\sin \theta & +\cos \theta \\
 \end{array} \right| 
 \end{equation}
@@ -1228,5 +1228,5 @@
 m_{x,x} & = & \sigma_a^{2} \cos^2 \theta + \sigma_b^{2}\sin^2 \theta \\
 m_{y,y} & = & \sigma_b^{2} \cos^2 \theta + \sigma_a^{2}\sin^2 \theta \\
-m_{x,y} & = & -\frac{1}{2} \sin (2 \theta) (\sigma_a^2 - \sigma_b^2)
+m_{x,y} & = & \frac{1}{2} \sin (2 \theta) (\sigma_a^2 - \sigma_b^2)
 \end{eqnarray}
 Using the double-angle relationships, these become:
@@ -1234,5 +1234,5 @@
 m_{x,x} & = & \frac{1}{2}(\sigma_a^{2} + \sigma_b^{2}) + \frac{1}{2}(\sigma_a^{2} - \sigma_b^{2}) \cos (2 \theta) \\
 m_{y,y} & = & \frac{1}{2}(\sigma_a^{2} + \sigma_b^{2}) - \frac{1}{2}(\sigma_a^{2} - \sigma_b^{2}) \cos (2 \theta) \\
-m_{x,y} & = & -\frac{1}{2} \sin (2 \theta) (\sigma_a^{-2} - \sigma_b^{-2})
+m_{x,y} & = & \frac{1}{2} \sin (2 \theta) (\sigma_a^{2} - \sigma_b^{2})
 \end{eqnarray}
 These three formulae define the second moments in terms of $\sigma_a$, $\sigma_b$, and $\theta$. 
@@ -1242,11 +1242,11 @@
 g_1 = m_{x,x} + m_{y,y}   	 & = & \sigma_a^{2} + \sigma_b^{2} \\
 g_2 = m_{x,x} - m_{y,y}   	 & = & (\sigma_a^{2} - \sigma_b^{2}) \cos (2 \theta) \\
-g_3 = \sqrt{f_2^2 + 4 m_{x,y}^2} & = & \sigma_a^{2} - \sigma_b^{-2}
+g_3 = \sqrt{g_2^2 + 4 m_{x,y}^2} & = & \sigma_a^{2} - \sigma_b^{2}
 \end{eqnarray}
 From these, we may derive the equations for $\sigma_a$, $\sigma_b$, and $\theta$:
 \begin{eqnarray}
-\theta   & = & \frac{1}{2} \arg (-2 m_{x,y}, g_2) \\
-\sigma_a & = & \sqrt{\frac{g_1 - g_3}{2}} \\
-\sigma_b & = & \sqrt{\frac{g_1 + g_3}{2}}
+\theta   & = & \frac{1}{2} \arg (2 m_{x,y}, g_2) \\
+\sigma_a & = & \sqrt{\frac{g_1 + g_3}{2}} \\
+\sigma_b & = & \sqrt{\frac{g_1 - g_3}{2}}
 \end{eqnarray}
 
