Index: trunk/doc/release.2015/ps1.analysis/analysis.tex
===================================================================
--- trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 40687)
+++ trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 40689)
@@ -2676,4 +2676,163 @@
 models for each galaxy model measured for the stack image.
 
+\subsection{Galaxy Lensing Parameters}
+
+\begin{verbatim}
+* background : KSB, related (mention Deacon et al here or at the end?)
+* second moments are discussed above (same values, including window function as given)
+* write out the KSB formalism
+* stellar parameters using PSF stars
+* output parameters
+* this is only done on warp -- move to ForceWarp section?
+\end {verbatim}
+
+Weak-lensing studies frequently use non-parametric measurements of the
+ellipticities of galaxies to quantify the strength of gravitational
+lensing, and thus directly measure mass distributions in the Universe.
+The classic approach was originally described by
+\cite{1995ApJ...449..460K} and applied to a set of deep HST
+observations.  The details of the technique were further refined by
+\cite{1998ApJ...504..636H}; in the discussion below we primarily use
+their notation, though we explicitly cast their integrals as sums over
+discrete pixels.
+
+The KSB-style analysis of object ellipticities has also been used by
+several authors to search for margially-resolved binary stars
+in wide-field imaging data.  The use of the lensing statistics for
+this application was described by \cite{2005ApJ...626.1070H} in the
+context of vetting planet transit events in data from the Optical
+Gravitational Lensing Experiment (OGLE).  \cite{2013ApJS..206...18T} 
+applied the techinique to PTF data to search for binary stars and
+\cite{2017MNRAS.468.3499D} used the same technique to search for
+binary companions to known ultracool dwarfs using Pan-STARRS $\3pi$
+data.  The work by \cite{2017MNRAS.468.3499D} used images and their
+own analysis of the pixels with the program Sextractor
+\citep{Bertin.ref}.
+
+For the Pan-STARRS $\3pi$ PV3 analysis, we have measured the full set
+of KSB lensing parameters for \note{which subset?} of the data to
+enable both lensing studies and binary / multiple star searches.  Here
+we describe the measurements as performed within \ippprog{psphot},
+reviewing the mathematical framework as described by
+\cite{1995ApJ...449..460K} and \cite{1998ApJ...504..636H}.
+
+The goal of the KSB technique is to measure the intrinsic ellipticity
+of objects (i.e., galaxies, in the case of weak lensing studies) as
+would be observed sky on the without instrumental effects.  The
+analysis starts with the observed ellipticity of the object as
+represented by the two polarization components derived from the second
+moments (see Section~\ref{sec:moments}):
+\begin{eqnarray}
+  e_1 = \frac{M_{xx} - M_{yy}}{M_{xx} + M_{yy}} \\
+  e_2 = \frac{2 M_{xy}}{M_{xx} + M_{yy}}. \\
+\end{eqnarray}
+These two quantities have values which range from -1 to +1, with a
+circularly-symmetric object having $(e_1,e_2) = 0.0,0.0$.  The two
+polarization components vary sinusoidally with twice the position
+angle of the object: an elongated object aligned with the $x$-pixel
+axis will have positive values of $e_1$ and $e_2$ values near zero,
+while the same object aligned with the $y$-pixel axis will negative
+$e_1$ values.  An object with a position angle on the 45\degree\ lines
+between the pixel axes will have large positive or negative values of
+$e_2$ and low absoluate values of $e_1$.
+
+\note{need for the window function}.
+
+The observed ellipticity of an object observed in a real instrument
+will be affected by the instrumental signature of the instrument.  To
+first order, the effect on the polarization components can be
+described as a combination of ``smear'', in which the observed shape
+is more circularized (driving $e_1,e_2$ to low absolute values) and
+``shear'', in which the observed shape is stretched in one direction
+relative to the others (driving $e_1,e_2$ to larger absolute values).
+With sufficient understanding of the image PSF, both shear and smear
+terms can be corrected.  
+
+
+
+@ARTICLE{2017MNRAS.468.3499D,
+   author = {{Deacon}, N.~R. and {Magnier}, E.~A. and {Best}, W.~M.~J. and 
+	{Liu}, M.~C. and {Dupuy}, T.~J. and {Chambers}, K.~C. and {Draper}, P.~W. and 
+	{Flewelling}, H. and {Metcalfe}, N. and {Tonry}, J.~L. and {Wainscoat}, R.~J. and 
+	{Waters}, C.},
+    title = "{Identification of partially resolved binaries in Pan-STARRS 1 data}",
+  journal = {\mnras},
+archivePrefix = "arXiv",
+   eprint = {1702.05491},
+ primaryClass = "astro-ph.SR",
+ keywords = {binaries: visual, brown dwarfs},
+     year = 2017,
+    month = jul,
+   volume = 468,
+    pages = {3499-3515},
+      doi = {10.1093/mnras/stx440},
+   adsurl = {http://adsabs.harvard.edu/abs/2017MNRAS.468.3499D},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+
+@ARTICLE{1995ApJ...449..460K,
+   author = {{Kaiser}, N. and {Squires}, G. and {Broadhurst}, T.},
+    title = "{A Method for Weak Lensing Observations}",
+  journal = {\apj},
+   eprint = {astro-ph/9411005},
+ keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: DARK MATTER, GALAXIES: FORMATION, COSMOLOGY: GRAVITATIONAL LENSING, COSMOLOGY: LARGE-SCALE STRUCTURE OF UNIVERSE},
+     year = 1995,
+    month = aug,
+   volume = 449,
+    pages = {460},
+      doi = {10.1086/176071},
+   adsurl = {http://adsabs.harvard.edu/abs/1995ApJ...449..460K},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+@ARTICLE{1998ApJ...504..636H,
+   author = {{Hoekstra}, H. and {Franx}, M. and {Kuijken}, K. and {Squires}, G.
+	},
+    title = "{Weak Lensing Analysis of CL 1358+62 Using Hubble Space Telescope Observations}",
+  journal = {\apj},
+ keywords = {GALAXIES: CLUSTERS: INDIVIDUAL ALPHANUMERIC: CL 1358+62, GALAXIES: FUNDAMENTAL PARAMETERS, COSMOLOGY: GRAVITATIONAL LENSING, galaxies: clusters: individual (Cl 1358 + 62), Galaxies: Fundamental Parameters, Cosmology: Gravitational Lensing},
+     year = 1998,
+    month = sep,
+   volume = 504,
+    pages = {636-660},
+      doi = {10.1086/306102},
+   adsurl = {http://adsabs.harvard.edu/abs/1998ApJ...504..636H},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+@ARTICLE{2005ApJ...626.1070H,
+   author = {{Hoekstra}, H. and {Wu}, Y. and {Udalski}, A.},
+    title = "{An Algorithm to Detect Blends with Eclipsing Binaries in Planet Transit Searches}",
+  journal = {\apj},
+   eprint = {astro-ph/0501353},
+ keywords = {Stars: Binaries: Eclipsing, Stars: Planetary Systems},
+     year = 2005,
+    month = jun,
+   volume = 626,
+    pages = {1070-1078},
+      doi = {10.1086/430299},
+   adsurl = {http://adsabs.harvard.edu/abs/2005ApJ...626.1070H},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+@ARTICLE{2013ApJS..206...18T,
+   author = {{Terziev}, E. and {Law}, N.~M. and {Arcavi}, I. and {Baranec}, C. and 
+	{Bloom}, J.~S. and {Bui}, K. and {Burse}, M.~P. and {Chorida}, P. and 
+	{Das}, H.~K. and {Dekany}, R.~G. and {Kraus}, A.~L. and {Kulkarni}, S.~R. and 
+	{Nugent}, P. and {Ofek}, E.~O. and {Punnadi}, S. and {Ramaprakash}, A.~N. and 
+	{Riddle}, R. and {Sullivan}, M. and {Tendulkar}, S.~P.},
+    title = "{Millions of Multiples: Detecting and Characterizing Close-separation Binary Systems in Synoptic Sky Surveys}",
+  journal = {\apjs},
+archivePrefix = "arXiv",
+   eprint = {1210.4550},
+ primaryClass = "astro-ph.SR",
+ keywords = {binaries: close, methods: data analysis, stars: statistics, surveys, techniques: image processing },
+     year = 2013,
+    month = jun,
+   volume = 206,
+      eid = {18},
+    pages = {18},
+      doi = {10.1088/0067-0049/206/2/18},
+   adsurl = {http://adsabs.harvard.edu/abs/2013ApJS..206...18T},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+
 \section{Difference Image Photometry}
 
