Index: trunk/doc/release.2015/ps1.detrend/detrend.bbl
===================================================================
--- trunk/doc/release.2015/ps1.detrend/detrend.bbl	(revision 40566)
+++ trunk/doc/release.2015/ps1.detrend/detrend.bbl	(revision 40567)
@@ -1,4 +1,7 @@
-\begin{thebibliography}{15}
+\begin{thebibliography}{16}
 \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
+
+\bibitem[{{Alard}(2000)}]{2000A&AS..144..363A}
+{Alard}, C. 2000, \aaps, 144, 363
 
 \bibitem[{{Alard} \& {Lupton}(1998)}]{1998ApJ...503..325A}
Index: trunk/doc/release.2015/ps1.detrend/detrend.tex
===================================================================
--- trunk/doc/release.2015/ps1.detrend/detrend.tex	(revision 40566)
+++ trunk/doc/release.2015/ps1.detrend/detrend.tex	(revision 40567)
@@ -177,20 +177,16 @@
 in detail in \cite{2012ApJ...750...99T}.
 
-
 The Pan-STARRS 1 Science Survey uses the 1.4 gigapixel GPC1 camera
 with the PS1 telescope on Haleakala Maui to image the sky north of
 $-30^\circ$ declination.  The GPC1 camera is composed of 60 orthogonal
-transfer array (OTA) devices, each of which is an $8\times{}8$ grid of
-readout cells.  The large number of cells parallelizes the readout
-process, reducing the overhead in each exposure.  However, as a
-consequence, many calibration operations are needed to ensure the
-response is consistent across the entire seven square degree field of
-view.
+transfer array (OTA) devices arranged in an $8\times{}8$ grid,
+excluding the four corners.  Each of the 60 devices is itself an
+$8\times{}8$ grid of readout cells.  The large number of cells
+parallelizes the readout process, reducing the overhead in each
+exposure.  However, as a consequence, many calibration operations are
+needed to ensure the response is consistent across the entire seven
+square degree field of view.
 
 \note{DS notes fonts are not consistent for keywords, etc}
-
-\note{DS: captions need to be clear re: illustrated effect}
-
-\note{need to define PV3 (and PV0-2) here.  see datasystem.tx}
 
 %The Processing Version 3 (PV3) reduction represents the third full
@@ -262,5 +258,13 @@
 section \ref{sec:discussion}.
 
-\note{describe gpc1 camera layout before the following paragraph}
+As mentioned above, the GPC1 camera is composed of 60 orthogonal
+transfer array (OTA) devices arranged in an $8\times{}8$ grid,
+excluding the four corners.  Each of the 60 devices is itself an
+$8\times{}8$ grid of readout cells consisting of $590 \times 598$
+pixels.  We label the OTAs by their coordinate in the camera grid in
+the form `OTAXY', where X and Y each range from 0 - 7, e.g., OTA12 would
+be the chip in the $(1,2)$ position of the grid.  Similarly, we
+identify the cells as `xyXY' where X and Y again each range from 0 -
+7.  
 
 Image products presented in figures have been mosaicked to arrange
@@ -277,9 +281,9 @@
 and pixel $(590,1)$ to the top left of their position. For mosaics of
 the full field of view, the OTAs are arranged as they see the sky,
-with the cells arranged as in the single OTA images (Figure \ref{fig:optical ghosts}).  The lower left
-corner is the empty location where OTA70 would exist.  Toward the
-right, the OTA labels decrease in $X$ label, with the empty OTA00
-located in the lower right.  The OTA $Y$ labels increase upward in the
-mosaic.
+with the cells arranged as in the single OTA images (Figure
+\ref{fig:optical ghosts}).  The lower left corner is the empty
+location where OTA70 would exist.  Toward the right, the OTA labels
+decrease in $X$ label, with the empty OTA00 located in the lower
+right.  The OTA $Y$ labels increase upward in the mosaic.
 
 %%\textit{Note: These papers are being placed on the arXiv.org to
@@ -358,4 +362,16 @@
 \label{sec:dark}
 
+\begin{figure}
+  \centering
+  \begin{minipage}{0.45\hsize}
+    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23.png}
+  \end{minipage}%
+  \begin{minipage}{0.45\hsize}
+    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23.png}
+  \end{minipage}
+  \caption{{\bf Dark Correction:} An example of the dark model application to exposure o5677g0123o, OTA23 (2011-04-26, 43s \gps{} filter).  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, and the detector non-linearity corrected.  The right panel, shows the same exposure with the dark applied in addition to the processing shown on the left, removing the amplifier glows in the cell corners.}
+  \label{fig:dark image}
+\end{figure}
+
 The dark current in the GPC1 detectors has significant variations
 across each cell.  The model we make to remove this signal considers
@@ -381,4 +397,29 @@
 \subsubsection{Time evolution}
 
+\begin{figure}
+  \centering
+  \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_v1.pdf}
+  \caption{Example showing a profile cut across exposure o5676g0195,
+    OTA67 (2011-04-25, 43s \gps{} filter).  The entire first row of
+    cells (xy00-xy07) have had a median calculated along each pixel
+    column on the OTA mosaicked image.  Arbitrary offsets have been
+    applied so the curves do not overlap.  The top curve (in purple)
+    shows the initial raw profile, with no dark model applied.  The
+    next curve (in green) shows the smoother profile after applying
+    the appropriate B-mode dark model.  Applying the (incorrect)
+    A-mode dark instead results in the third (blue) curve, which shows
+    a significant increase in gradients across the cells.  The fourth
+    (red) curve is the result of applying the PATTERN.CONTINUITY
+    correction along with the B-mode dark model.  Although this
+    creates a larger gradient across the mosaicked images, it
+    decreases the cell-to-cell boundary offsets.  The bottom (black)
+    curve shows the final image profile after all detrending and
+    background subtraction (no offset applied).  The bright source at
+    the cell xy00 to xy01 transition is a result of a large optical
+    ghost which, due to the area covered, increases the median level
+    more than the field stars.}
+  \label{fig:dark switching}
+\end{figure}
+
 The dark model is not consistently stable over the full survey, with
 significant drift over the course of multiple months.  Some of the
@@ -432,23 +473,4 @@
 as it is correctable with a small number of dark models, this does not
 significantly impact detrending.
-
-\begin{figure}
-  \centering
-  \begin{minipage}{0.45\hsize}
-    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23.png}
-  \end{minipage}%
-  \begin{minipage}{0.45\hsize}
-    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23.png}
-  \end{minipage}
-  \caption{An example of the dark model application to exposure o5677g0123o, OTA23 (2011-04-26, 43s \gps{} filter).  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, and the detector non-linearity corrected.  The right panel, shows the same exposure with the dark applied in addition to the processing shown on the left, removing the amplifier glows in the cell corners.}
-  \label{fig:dark image}
-\end{figure}
-
-\begin{figure}
-  \centering
-  \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_ex.png}
-  \caption{Example showing a profile cut across exposure o5676g0195, OTA67 (2011-04-25, 43s \gps{} filter).  The entire first row of cells (xy00-xy07) have had a median calculated along each pixel column on the OTA mosaicked image.  Arbitrary offsets have been applied to shift the curves to not overlap.  The top curve (in purple) shows the initial raw profile, with no dark model applied.  The next curve (in green) shows the smoother profile after applying the appropriate B-mode dark model.  Applying the A-mode dark instead results in the blue curve, which shows a significant increase in gradients across the cells.  The orange curve shows the result of the PATTERN.CONTINUITY correction.  Although this creates a larger gradient across the mosaicked images, it decreases the cell-to-cell level changes.  The final yellow curve shows the final image profile after all detrending and background subtraction, and has not had an offset applied.  The bright source at the cell xy00 to xy01 transition is a result of a large optical ghost, which due to the area covered, increases the median level more than the field stars.}
-  \label{fig:dark switching}
-\end{figure}
 
 \subsubsection{Video Dark}
@@ -496,5 +518,5 @@
     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22.png}
   \end{minipage}
-  \caption{An example of the video dark model application to exposure o5677g0123o, OTA22 (2011-04-26, 43s \gps{} filter), which has a video cell located in cell xy16.  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, the detector non-linearity corrected, and a regular dark applied.  The right panel, shows the same exposure with a video dark applied instead of the standard dark.  The main impact of this change is the improved correction of the corner glows, which are over subtracted with the standard dark.}
+  \caption{{\bf Video Dark:} An example of the video dark model application to exposure o5677g0123o, OTA22 (2011-04-26, 43s \gps{} filter), which has a video cell located in cell xy16.  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, the detector non-linearity corrected, and a regular dark applied.  The right panel, shows the same exposure with a video dark applied instead of the standard dark.  The main impact of this change is the improved correction of the corner glows, which are over subtracted with the standard dark.}
   \label{fig:video_darks}
 \end{figure}
@@ -627,5 +649,5 @@
 measurements and the corresponding measurements on the science image
 provides the scale factor multiplied to the fringe before it is
-subtracted from the science image.
+subtracted from the science image.  An example of the fringe correction can be seen in Figure~\ref{fig: fringe example}.  
 
 \begin{figure}
@@ -637,6 +659,11 @@
     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5220g0025o_fringe_XY53.png}
   \end{minipage}
-  \caption{Example of the \yps{} filter fringe pattern on exposure o5220g0025o OTA53 (\yps{} filter 30s).  The left panel shows the OTA mosaic with all detrending except the fringe correction, while the right shows the same including the fringe correction.  Both images have been smoothed with a Gaussian with $\sigma = 3$ pixels to highlight the faint and large scale fringe patterns. 
-}
+  \caption{{\bf Fringing:} Example of the \yps{} filter fringe pattern
+    on exposure o5220g0025o OTA53 (\yps{} filter 30s).  The left panel
+    shows the OTA mosaic with all detrending except the fringe
+    correction, while the right shows the same including the fringe
+    correction.  Both images have been smoothed with a Gaussian with
+    $\sigma = 3$ pixels to highlight the faint and large scale fringe
+    patterns.  }
   \label{fig: fringe example}
 \end{figure}
@@ -725,9 +752,9 @@
     \colhead{Description (static values listed in bold)}}
   \startdata
-  {\bf DETECTOR & 0x0001 & A detector defect is present.} \\
-  {\bf FLAT     & 0x0002 & The flat field model does not calibrate the pixel reliably.} \\
-  {\bf DARK     & 0x0004 & The dark model does not calibrate the pixel reliably.} \\
-  {\bf BLANK    & 0x0008 & The pixel does not contain valid data.} \\
-  {\bf CTE      & 0x0010 & The pixel has poor charge transfer efficiency.} \\
+  {\bf DETECTOR } & {\bf 0x0001}  & {\bf A detector defect is present.} \\
+  {\bf FLAT     } & {\bf 0x0002}  & {\bf The flat field model does not calibrate the pixel reliably.} \\
+  {\bf DARK     } & {\bf 0x0004}  & {\bf The dark model does not calibrate the pixel reliably.} \\
+  {\bf BLANK    } & {\bf 0x0008}  & {\bf The pixel does not contain valid data.} \\
+  {\bf CTE      } & {\bf 0x0010}  & {\bf The pixel has poor charge transfer efficiency.} \\
   SAT      & 0x0020 & The pixel is saturated. \\
   LOW      & 0x0040 & The pixel has a lower value than expected. \\
@@ -840,11 +867,14 @@
 corrector lens), and then back down onto the focal plane.  Due to the
 extra travel distance, the resulting source is out of focus and
-elongated along the radial direction of the camera focal plane. These
-optical ghosts can be modeled in the focal plane coordinates ($L,M$)
-which has its origin at the center of the focal plane.  In this
-system, a bright object at location ($L,M$) on the focal plane creates a
-reflection ghost on the opposite side of the optical axis near
-($-L,-M$).  The exact location is fit as a third order polynomial in the
-focal plane $L$ and $M$ directions (as listed in Table
+elongated along the radial direction of the camera focal
+plane. Figure~\ref{fig:optical ghosts} shows an example exposure with
+several prominent optical ghosts.
+
+These optical ghosts can be modeled in the focal plane coordinates
+($L,M$) which has its origin at the center of the focal plane.  In
+this system, a bright object at location ($L,M$) on the focal plane
+creates a reflection ghost on the opposite side of the optical axis
+near ($-L,-M$).  The exact location is fit as a third order polynomial
+in the focal plane $L$ and $M$ directions (as listed in Table
 \ref{tab:ghost_centers}).  An elliptical annulus mask is constructed
 at the expected ghost location, with the major and minor axes defined
@@ -887,16 +917,16 @@
 \end{deluxetable}
 
-\begin{deluxetable}{lc}
-  \tablecolumns{2}
+\begin{deluxetable}{lrr}
+  \tablecolumns{3}
   \tablewidth{0pc}
   \tablecaption{Optical Ghost Magnitude Limits}
-  \tablehead{\colhead{Filter}&\colhead{$m_{inst}$}}
+  \tablehead{\colhead{Filter} & \colhead{$m_{inst}$} & \colhead{Approx apparent mag ($3\pi$)}}
   \startdata
-  \gps{} & -16.5 \\
-  \rps{} & -20.0 \\
-  \ips{} & -25.0 \\
-  \zps{} & -25.0 \\
-  \yps{} & -25.0 \\
-  \wps{} & -20.0 \\
+  \gps{} & -16.5 & 12.2 \\
+  \rps{} & -20.0 &  8.9 \\
+  \ips{} & -25.0 &  3.7 \\
+  \zps{} & -25.0 &  3.4 \\
+  \yps{} & -25.0 &  2.5 \\
+  \wps{} & -20.0 & 10.2 \\
   \enddata
   \label{tab:ghost_magnitudes}
@@ -905,6 +935,7 @@
 \begin{figure}
   \centering
-  \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.jpg}
-  \caption{Example of the full GPC1 field of view illustrating the sources and destinations of optical ghosts on exposure o5677g0123o (2011-04-26, 43s \gps{} filter).  The bright stars on OTA33 and OTA44 result in nearly circular ghosts on the opposite OTA.  In contrast, the trio of stars on OTA11 result in very elongated ghosts on OTA66.}
+% \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.jpg}
+  \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.png}
+  \caption{{\bf Ghosts:} Example of the full GPC1 field of view illustrating the sources and destinations of optical ghosts on exposure o5677g0123o (2011-04-26, 43s \gps{} filter).  The bright stars on OTA33 and OTA44 result in nearly circular ghosts on the opposite OTA.  In contrast, the trio of stars on OTA11 result in very elongated ghosts on OTA66.}
   \label{fig:optical ghosts}
 \end{figure}
@@ -917,20 +948,25 @@
 telescope.  Sources brighter than $m_{inst} = -21$ ($\rps \lesssim
 7.5$) that fell on this reflective surface resulted in light being
-scattered across the detector surface in a long narrow glint.  This
-surface was physically masked on 2010-08-24, removing the possibility
-of glints in subsequent data, but images that were taken prior to this
-date have an advisory dynamic mask constructed when a reference source
-falls on the focal plane within one degree of the detector edge.  This
-mask is 150 pixels wide, with length $L = 2500 \left(-20 -
-m_{inst}\right)$ pixels.  These glint masks are constructed by
-selecting sufficiently bright sources in the reference catalog that
-fall within rectangular regions around each edge of the GPC1 camera.
-These regions are separated from the edge of the camera by 17
-arcminutes, and extend outwards an additional degree.
+scattered across the detector surface in a long narrow glint.  
+Figure~\ref{fig:optical glints} shows an example exposure with
+a prominent optical glint.
+
+This reflective surface in the camera was physically masked on
+2010-08-24, removing the possibility of glints in subsequent data, but
+images that were taken prior to this date have an advisory dynamic
+mask constructed when a reference source falls on the focal plane
+within one degree of the detector edge.  This mask is 150 pixels wide,
+with length $L = 2500 \left(-20 - m_{inst}\right)$ pixels.  These
+glint masks are constructed by selecting sufficiently bright sources
+in the reference catalog that fall within rectangular regions around
+each edge of the GPC1 camera.  These regions are separated from the
+edge of the camera by 17 arcminutes, and extend outwards an additional
+degree.
 
 \begin{figure}
   \centering
-  \includegraphics[width=0.9\hsize,angle=0,clip]{images/glint_example_o5379g0103o.jpg}
-  \caption{Example of a glint on exposure o5379g0103o (2010-07-02, 45s \ips{} filter).  The source star out of the field of view creates a long reflection that extends through OTA73 and OTA63.}
+% \includegraphics[width=0.9\hsize,angle=0,clip]{images/glint_example_o5379g0103o.jpg}
+  \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_glints.png}
+  \caption{{\bf Glints:}  Example of a glint on exposure o5379g0103o (2010-07-02, 45s \ips{} filter).  The source star out of the field of view creates a long reflection that extends through OTA73 and OTA63.}
   \label{fig:optical glints}
 \end{figure}
@@ -1219,5 +1255,5 @@
     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_wbt_XY11.png}
   \end{minipage}
-  \caption{Example of OTA11 cell xy50 on exposures o5677g0123o (left) and o5677g0124o (right).  The top panels show the image with all appropriate detrending steps, but without burntool, and the bottom show the same with burntool applied.  There is some slight over subtraction in fitting the initial trail, but the impact of the trail is greatly reduced in both exposures.}
+  \caption{{\bf Persistent Charge:}  Example of OTA11 cell xy50 on exposures o5677g0123o (left) and o5677g0124o (right).  The top panels show the image with all appropriate detrending steps, but without burntool, and the bottom show the same with burntool applied.  There is some slight over subtraction in fitting the initial trail, but the impact of the trail is greatly reduced in both exposures.}
   \label{fig:burntool images}
 \end{figure}
@@ -1226,12 +1262,16 @@
 \begin{figure}
   \centering
-  \begin{minipage}{0.45\hsize}
-    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png}
-  \end{minipage}%
-  \begin{minipage}{0.45\hsize}
-    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png}
-  \end{minipage}
-
-  \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy50 (left panel) and on the subsequent exposure o5677g0124o (right panel).  In both figures, the green points show the image corrected with all appropriate detrending steps, but without burntool applied, illustrating the amplitude of the persistence trails.  The red points show the same data after the burntool correction, which reduces the impact of these features.  Both exposures are in the \gps{} filter with exposure times of 43s}
+  \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123n4o_XY11_bt_trail.pdf}
+
+  \caption{{\bf Burntool Correction:} Example of a profile cut along
+    the y-axis through a bright star on exposure o5677g0123o OTA11 in
+    cell xy50 (left panel) and on the subsequent exposure o5677g0124o
+    (right panel).  In both figures, the blue pluses show the image
+    corrected with all appropriate detrending steps, but without
+    burntool applied, illustrating the amplitude of the persistence
+    trails.  The red circles show the same data after the burntool
+    correction, which reduces the impact of these features.  Both
+    exposures are in the \gps{} filter with exposure times of 43s}
+
   \label{fig:burntool plot}
 \end{figure}
@@ -1261,8 +1301,9 @@
 effects.
 
+% An example of this data is shown in Figure~\ref{fig: nonlinearity}.  
+
 We store the average flux measurement and deviation from the linear
 fit for each exposure time for each region on all detector cells in
-the linearity detrend look-up tables.  An example of this data is
-shown in Figure~\ref{fig: nonlinearity}.  When this correction is
+the linearity detrend look-up tables.  When this correction is
 applied to science data, these lookup tables are loaded, and a linear
 interpolation is performed to determine the correction needed for the
@@ -1284,10 +1325,11 @@
 rejected.
 
-\begin{figure}
-  \centering
-  \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}
-  \caption{Example of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}
-  \label{fig: nonlinearity}
-\end{figure}
+% this figure does not really clarify anything
+% \begin{figure}
+%   \centering
+%   \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}
+%   \caption{Example of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}
+%   \label{fig: nonlinearity}
+% \end{figure}
 
 \subsection{Pattern correction}
@@ -1336,11 +1378,14 @@
 sky noise does not fully obscure the row-by-row noise.
 
+%% GPC1 tuning describe in email from Peter Onaka 2009.11.30,
+%% with notes in GPC1TuningTestLog.pdf
+
 This correction was required on all cells on all OTAs prior to
-2009-12-01, at which point a modification of the camera electronics
-reduced the scale of the row-by-row offsets for the majority of the
-OTAs.  \czw{describe modification} As a result, we only apply this
-correction to the cells where it is still necessary, as shown in
-Figure \ref{fig: pattern row cells}.  A list of these cells is in
-Table \ref{tab:pattern_row_cells}.
+2009-12-01, at which point a modification of the camera clocking phase
+delays reduced the scale of the row-by-row offsets for the majority of
+the OTAs.  As a result, we only apply this correction to the cells
+where it is still necessary, as shown in Figure \ref{fig: pattern row
+  cells}.  A list of these cells is in Table
+\ref{tab:pattern_row_cells}.
 
 Although this correction largely resolves the row-by-row offset issue
@@ -1391,5 +1436,5 @@
     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_wpt_XY57.png}
   \end{minipage}
-  \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy01 (\ips{} filter 45s).  The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied.  The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier.  There is a slight over subtraction along the rows near the bright star.}
+  \caption{{\bf Correlated Noise:} Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy01 (\ips{} filter 45s).  The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied.  The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier.  There is a slight over subtraction along the rows near the bright star.}
   \label{fig: pattern row example}
 \end{figure}
@@ -1657,17 +1702,17 @@
 the input OTA images, with some reduction in accuracy.
 
+Examples of a warped signal, variance, and mask image are illustrated
+in Figures~\ref{fig:warp image} through \ref{fig:warp mask}.
+
 \begin{figure}
   \centering
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_2046019_sci.png}
-  \caption{Example of the warp image for skycell skycell.2047.005
-    centered at ($\alpha,\delta$) = (179.763, 32.1899) for exposure
-    o4985g0073o, (2009-06-03, 30s \zps{} filter).  The data from six
+  \caption{Example of the warp image for skycell skycell.1146.095
+    centered at ($\alpha,\delta$) = (11.934, -4.197) for exposure
+    o5104g0266o, (2009-09-30, 60s \rps{} filter).  The data from four
     OTAs contribute to this image, although they are all truncated by
     the skycell boundaries.  This skycell image is aligned such that
     north points to the top of the image, and east to the left.  The
-    contributing OTAs are from the right half of the detector, with
-    OTA24 contributing the most pixels, and originally have the
-    positive y axis pointing to the southwest in this warped image,
-    with the positive x axis to the northwest.}
+    contributing OTAs are OTA20, OTA21, OTA30, OTA31.}
   \label{fig:warp image}
 \end{figure}
@@ -1677,11 +1722,11 @@
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_2046019_var.png}
   \caption{Example of the warp variance image for skycell
-    skycell.2047.005 of exposure o4985g0073o, the same as in Figure
+    skycell.1146.095 of exposure o5104g0266o, the same as in Figure
     \ref{fig:warp image}.  This variance map retains information about
     the higher flux levels that were found in burntool corrected
     persistence trails, which appear here as streaks along the
-    original OTA y axis.  The amplifier glows that are corrected in
-    the dark model are also more visible in the corners of the cells
-    in OTA24.  As both of these effects are corrected in the science
+    original OTA y axis.  The dark glows that are corrected in the
+    dark model are also more visible, especially on certain cell
+    edges.  As both of these effects are corrected in the science
     image, there are no significant features visible there.}
   \label{fig:warp variance}
@@ -1691,13 +1736,17 @@
   \centering
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_2046019_mask.png}
-  \caption{Example of the warp mask image for skycell skycell.2047.005
-    of exposure o4985g0073o, the same as in Figure \ref{fig:warp
+  \caption{Example of the warp mask image for skycell skycell.1146.095
+    of exposure o5104g0266o, the same as in Figure \ref{fig:warp
       image}.  This mask image shows the many small defects removed
     from the image, along with larger advisory trails on corrected
     burntool trails.  The saturated cores of the bright stars are also
-    masked, along with the diffraction spikes found on these stars.
-    In addition OTA24 shows the precautionary crosstalk bleed masks
-    for the two brightest stars applied to all cells within the same
-    row.}
+    masked, along with the diffraction spikes found on these stars.  A
+    ghost mask is visible just below the center as an elliptical
+    region.
+%    In addition OTA24 shows the precautionary crosstalk bleed masks
+%    for the two brightest stars applied to all cells within the same
+%    row.
+  \label{fig:warp mask}
+  }
 \end{figure}
 
@@ -1716,10 +1765,19 @@
 sources.
 
+As part of the stacking process, the collection of input pixels for a
+given output stack pixel are checked for consistency and outliers are
+rejected.  Varying image quality makes a pixel-by-pixel check for
+outliers challenging in the vicinity of brighter stars.  Pixels in the
+wings of bright stars are liable to be over-rejected as the image
+quality changes because the flux observed at a given position varies
+as its location on the stellar profile changes.  To avoid this effect,
+we convolve all input images to a common PSF before making the
+pixel-by-pixel comparison.  This PSF-matching technique allows us to
+detect inconsistent pixels even in the sensitive wings of bright objects.
+
 For the $3\pi$ survey, the stacked image is comprised of all warp
 frames for a given skycell in a single filter.  The source catalogs
 and image components are loaded into the \IPPprog{ppStack} program to
 prepare the inputs and stack the frames.
-
-\note{need to point out that we are convolving to a matched PSF}
 
 Once all files are ingested, the first step is to measure the size and
@@ -1770,18 +1828,19 @@
 convolution kernels can be calculated for each image.  To calculate
 the convolution kernels, we use the algorithm described by
-\cite{1998ApJ...503..325A} and \cite{2000.alard} to perform optimal
-image subtraction.  These `ISIS' kernels \citep[named after the
-  software package described by][]{1998ApJ...503..325A} are used with
-FWHM values of 1.5, 3.0, and 6.0 pixels and polynomial orders of 6, 4,
-and 2.  Regions around the sources identified in the input images are
-extracted, convolved with the kernel, and the residual with the target
-PSF used to update the parameters of the kernel via least squares
-optimization.  Stamps that significantly deviate are rejected,
-although the squared residual difference will increase with increasing
-source flux.  To mitigate this effect, a parabola is fit to the
-distribution of squared residuals as a function of source flux.
-Stamps that deviate from this fit by more than $2.5\sigma$ are
-rejected, and not used on further kernel fit iterations.  This process
-is repeated twice, and the final convolution kernel is returned.
+\cite{1998ApJ...503..325A} and extended by \cite{2000A&AS..144..363A}
+to perform optimal image subtraction.  These `ISIS' kernels
+\citep[named after the software package described
+  by][]{1998ApJ...503..325A} are used with FWHM values of 1.5, 3.0,
+and 6.0 pixels and polynomial orders of 6, 4, and 2.  Regions around
+the sources identified in the input images are extracted, convolved
+with the kernel, and the residual with the target PSF used to update
+the parameters of the kernel via least squares optimization.  Stamps
+that significantly deviate are rejected, although the squared residual
+difference will increase with increasing source flux.  To mitigate
+this effect, a parabola is fit to the distribution of squared
+residuals as a function of source flux.  Stamps that deviate from this
+fit by more than $2.5\sigma$ are rejected, and not used on further
+kernel fit iterations.  This process is repeated twice, and the final
+convolution kernel is returned.
 
 This convolution may change the image flux scaling, so the kernel is
@@ -1812,9 +1871,7 @@
 identify discrepant input values that should be excluded.
 
-\note{clarify 'should' below, e.g., with a histogram}
-
 If only a single input is available, the initial stack contains the
 value from that single input.  If there are only two inputs, the
-average of the two is used.  These cases should occur only rarely in
+average of the two is used.  These cases are expected to occur only rarely in
 the $3\pi$ survey, as there are many input exposures that overlap each
 point on the sky.  For the more common case of three or more inputs, a
@@ -1879,14 +1936,15 @@
 distribution is likely to be unimodal), or if there are insufficient
 inputs for this mixture model analysis, the input values are passed to
-an Olympic \note{define} weighted mean calculation.  We reject $20\%$ of the number
-of inputs through this process.  The number of bad inputs is set to
-$N_\mathrm{bad} = 0.2 \times N_\mathrm{input} + 0.5$, with the 0.5 term
-ensuring at least one input is rejected.  This number is further
-separated into the number of low values to exclude, $N_\mathrm{low} =
-N_\mathrm{bad} / 2$, which will default to zero if there are few
-inputs, and $N_\mathrm{high} = N_\mathrm{low} - N_\mathrm{bad}$.
-After sorting the input values to determine which values fall into the
-low and high groups, the remaining input values are used in a weighted
-mean using the image weights above.
+an ``Olympic'' weighted mean calculation (both the lowest and highest
+values are ignored in calculating the weighted mean).  We reject
+$20\%$ of the number of inputs through this process.  The number of
+bad inputs is set to $N_\mathrm{bad} = 0.2 \times N_\mathrm{input} +
+0.5$, with the 0.5 term ensuring at least one input is rejected.  This
+number is further separated into the number of low values to exclude,
+$N_\mathrm{low} = N_\mathrm{bad} / 2$, which will default to zero if
+there are few inputs, and $N_\mathrm{high} = N_\mathrm{low} -
+N_\mathrm{bad}$.  After sorting the input values to determine which
+values fall into the low and high groups, the remaining input values
+are used in a weighted mean using the image weights above.
 
 A systematic variance term is necessary to correctly scale how
@@ -1924,14 +1982,16 @@
 pixels.  The ISIS kernel used in the previous step is again used to
 determine the largest square box that does not exceed the limit of
-$0.25 \times \sum_{x,y} kernel^2$.  This square box is then convolved with
-the rejected pixel mask to reject the neighboring pixels.  This final
-list of rejected pixels is passed to the final combination, which
-creates the final stack values from the weighted mean of the
+$0.25 \times \sum_{x,y} kernel^2$.  This square box is then convolved
+with the rejected pixel mask to reject the neighboring pixels.  This
+final list of rejected pixels is passed to the final combination,
+which creates the final stack values from the weighted mean of the
 non-rejected pixels.  Six total images are constructed for this final
 stack: the image, its variance, a mask, a map of the exposure time per
 pixel, that exposure time map weighted by the input image weight, and
-a map of the number of inputs per pixel.
-
-These convolved stack products are not retained, as the convolution is
+a map of the number of inputs per pixel.  Examples of each output
+image type for the stacking process are shown in
+Figures~\ref{fig:stack image} through \ref{fig:stack exp wtimage}.
+
+The convolved stack products are not retained, as the convolution is
 used to ensure that the pixel rejection uses seeing-matched images.
 This prevents any differences in the input PSF shape from skewing the
@@ -1980,9 +2040,9 @@
   \centering
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_sci.png}
-  \caption{Example of the stack image for skycell skycell.2047.005
-    centered at ($\alpha,\delta$) = (179.763, 32.1899) in the \zps{}
-    filter, stack\_id 3775944.  This stack includes 25 input images,
-    including o4985g0073o the warp image in Figure \ref{fig:warp
-      image}, and has a combined exposure time of 870s.  Combining
+  \caption{Example of the stack image for skycell skycell.1146.095
+    centered at ($\alpha,\delta$) = (11.934, -4.197) in the \rps{}
+    filter, stack\_id 3956997.  This stack includes 39 input images
+    including o5104g0266o, the warp image in Figure \ref{fig:warp
+      image}, and has a combined exposure time of 1880s.  Combining
     such a large number of input images removes the inter-cell and
     inter-chip gaps, providing a fully populated image.  In addition,
@@ -1997,11 +2057,10 @@
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_mask.png}
   \caption{Example of the stack mask image for skycell
-    skycell.2047.005 centered at ($\alpha,\delta$) = (179.763,
-    32.1899) in the \zps{} filter, stack\_id 3775944.  The entire
-    frame is largely unmasked after combining inputs, with the only
-    remaining masks falling on the cores of bright stars, and in small
-    regions around the brightest objects where the overlapping of
-    diffraction spike masks have removed all inputs.}
-
+    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
+    in the \rps{} filter, stack\_id 3956997.  The entire frame is
+    largely unmasked after combining inputs, with the only remaining
+    masks falling on the cores of bright stars, and in small regions
+    around the brightest objects where the overlapping of diffraction
+    spike masks have removed all inputs.}
   \label{fig:stack mask image}
 \end{figure}
@@ -2010,7 +2069,7 @@
   \centering
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_var.png}
-  \caption{Example of the stack variance image for skycell
-    skycell.2047.005 centered at ($\alpha,\delta$) = (179.763,
-    32.1899) in the \zps{} filter, stack\_id 3775944.  The variance
+  \caption{Example of the stack variance image for skycell 
+    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
+    in the \rps{} filter, stack\_id 3956997.  The variance
     map for this stack is reasonably smooth, with the mottled pattern
     from the inter-chip and inter-cell gaps printing through.  Some
@@ -2025,10 +2084,9 @@
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_num.png}
   \caption{Example of the stack number image for skycell
-    skycell.2047.005 centered at ($\alpha,\delta$) = (179.763,
-    32.1899) in the \zps{} filter, stack\_id 3775944.  This map shows
+    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
+    in the \rps{} filter, stack\_id 3956997.  This map shows
     the number of inputs contributing to each pixel of the output
     stack.  Again, the pattern of the inter-chip and inter-cell gaps
-    is visible, along with the mask pattern of regions with CTE
-    problems (visible in the upper right corner). }
+    is visible, along with other mask features. }
 
   \label{fig:stack num image}
@@ -2039,10 +2097,9 @@
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_exp.png}
   \caption{Example of the stack exposure time image for skycell
-    skycell.2047.005 centered at ($\alpha,\delta$) = (179.763,
-    32.1899) in the \zps{} filter, stack\_id 3775944.  As all input
-    warps had the same 30s exposure time, this map essentially
-    recreates the number map, with units of seconds of exposure
-    instead of number of inputs contributing to a given pixel.}
-
+    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
+    in the \rps{} filter, stack\_id 3956997.  Since the input
+    exposures had exposures times of 40 and 60 seconds, the pattern
+    observed here similar to, but subtly different from the number
+    map.}
   \label{fig:stack exp image}
 \end{figure}
@@ -2052,12 +2109,10 @@
   \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3956997_expwt.png}
   \caption{Example of the stack weighted exposure image for skycell
-    skycell.2047.005 centered at ($\alpha,\delta$) = (179.763,
-    32.1899) in the \zps{} filter, stack\_id 3775944.  This map shows
+    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
+    in the \rps{} filter, stack\_id 3956997.  This map shows
     the weighted average exposure time, as described in the text.  It
     is similar to the simple exposure time map, but shows how some
     input exposures have their contributions weighted down due to the
     observed larger image variances.}
-
-
   \label{fig:stack exp wtimage}
 \end{figure}
@@ -2226,6 +2281,4 @@
 University (ELTE), and the Los Alamos National Laboratory.
 
-\note{ApJ, etc latex macros have an extra comma}
-
 \bibliography{lib}{}
 \bibliographystyle{apj}
