Index: trunk/doc/release.2015/ps1.detrend/detrend.tex
===================================================================
--- trunk/doc/release.2015/ps1.detrend/detrend.tex	(revision 39798)
+++ trunk/doc/release.2015/ps1.detrend/detrend.tex	(revision 39799)
@@ -118,18 +118,17 @@
 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 with is an $8\times{}8$ grid of
+transfer array (OTA) devices, each of which is an $8\times{}8$ grid of
 readout cells.  This parallelizes the readout process, reducing the
 overhead in each exposure.  However, as a consequence of this large
-number of individual detector readouts, there are a number of
-calibrations that need to be included to ensure the response is
-consistent across the entire field of view.
-
-The PV3 reduction represents the third full processing version of the
-Pan-STARRS archival data.  The first two reductions were used
-internally for pipeline optimization and the development of the
-initial photometric and astrometric reference catalog.  The products
-from these reductions were not publicly released, but have been used
-to produce a wide range of scientific papers from the Pan-STARRS 1
-Science Consortium members.
+number of individual detector readouts, many calibrations are needed
+to ensure the response is consistent across the entire field of view.
+
+The Processing Version 3 (PV3) reduction represents the third full
+reduction of the Pan-STARRS archival data.  The first two reductions
+were used internally for pipeline optimization and the development of
+the initial photometric and astrometric reference catalog.  The
+products from these reductions were not publicly released, but have
+been used to produce a wide range of scientific papers from the
+Pan-STARRS 1 Science Consortium members.
 
 The Pan-STARRS image processing pipeline (IPP) is described elsewhere
@@ -144,19 +143,19 @@
 Following the \ippstage{chip} stage is the \ippstage{camera} stage, in
 which the astrometry and photometry for the entire exposure is
-calibrated against the reference catalog.  This stage also performs
-masking updates based on the now-known positions and brightnesses of
-stars that create dynamic features (see Section
-\ref{sec:dynamic_masks} below).  The \ippstage{warp} stage is the next
-to operate on the data, transforming the detector oriented
-\ippstage{chip} stage images into sky oriented images that have common
-tessellations and sky projections (Section \ref{sec:warping}).  When
-all \ippstage{warp} stage processing is done for the region of the
-sky, \ippstage{stack} processing is performed (Section
-\ref{sec:stacking}) to construct deeper, fully populated images from
-the set of \ippstage{warp} images that cover that region of the sky.
-Beyond the \ippstage{stack} stage, a series of additional stages are
-done that are more fully described in other papers.  Transient
-features are identified in the \ippstage{diff} stage, which takes
-input \ippstage{warp} and/or \ippstage{stack} data and performs image
+calibrated by matching the detections against the reference catalog.
+This stage also performs masking updates based on the now-known
+positions and brightnesses of stars that create dynamic features (see
+Section \ref{sec:dynamic_masks} below).  The \ippstage{warp} stage is
+the next to operate on the data, transforming the detector oriented
+\ippstage{chip} stage images onto common sky oriented images that have
+fixed sky projections (Section \ref{sec:warping}).  When all
+\ippstage{warp} stage processing is done for the region of the sky,
+\ippstage{stack} processing is performed (Section \ref{sec:stacking})
+to construct deeper, fully populated images from the set of
+\ippstage{warp} images that cover that region of the sky.  Beyond the
+\ippstage{stack} stage, a series of additional stages are done that
+are more fully described in other papers.  Transient features are
+identified in the \ippstage{diff} stage, which takes input
+\ippstage{warp} and/or \ippstage{stack} data and performs image
 differencing \citep{HuberXXX}.  Further photometry is performed in the
 \ippstage{staticsky} and \ippstage{skycal} stages, which add extended
@@ -196,21 +195,20 @@
 \czwdraft{Is this a sufficient explanation?  Also, is this the right
   place for it?}  Image products presented in figures have been
-mosaicked to arrange pixels in the following way.  Single cell images
-are arranged such that pixel $(1,1)$ is at the lower left corner.
-Images mosaicked to the OTA level have cell xy00 in the lower left
-corner, with cells xy10, xy20, etc. sequentially to the right, and
-cells xy01, xy02, etc. sequentially to the top of this cell.  Again,
-pixel $(1,1)$ of cell xy00 is located in the lower left corner of the
-image.  For mosaics of the full field of view, the OTAs are arranged
-as they see the sky.  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.  The OTAs to the left of the
-midplane (OTA4Y-OTA7Y) are oriented with cell xy00 and pixel $(1,1)$
-to the lower left of their position.  Due to the electronic
-connections of the OTAs in the focal plane, the OTAs to the right of
-the midplane (OTA0Y-OTA3Y) oriented with cell xy00 and pixel $(1,1)$
-to the top right of their position, and have a negative parity to the
-mosaic in both x and y.
+mosaicked to arrange pixels as follows.  Single cell images are
+arranged such that pixel $(1,1)$ is at the lower left corner.  Images
+mosaicked to the OTA level have cell xy00 in the lower left corner,
+with cells xy10, xy20, etc. sequentially to the right, and cells xy01,
+xy02, etc. sequentially to the top of this cell.  Again, pixel $(1,1)$
+of cell xy00 is located in the lower left corner of the image.  For
+mosaicks of the full field of view, the OTAs are arranged as they see
+the sky.  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.  The OTAs to the left of the midplane
+(OTA4Y-OTA7Y) are oriented with cell xy00 and pixel $(1,1)$ to the
+lower left of their position.  Due to the electronic connections of
+the OTAs in the focal plane, the OTAs to the right of the midplane
+(OTA0Y-OTA3Y) are rotated 180 degrees, and are oriented with cell xy00
+and pixel $(1,1)$ to the top right of their position.
 
 % Discuss 2-phase/3-phase device differnces
@@ -222,13 +220,14 @@
 \label{sec:detrend construction}
 
-The detrends for GPC1 are all constructed in similar ways.  A series
-of appropriate exposures is selected from the database, and processed
-with the \ippprog{ppImage} program.  This program is used for the
-\ippstage{chip} stage processing as well, and is designed to do image
-processing.  The extent of this processing is dependent on the order
-in which the detrend is applied to science data.  In general, the
-input exposures to the detrend have all prior stages of detrend
-processing applied.  Table \ref{tab:detrend ppImage} summarizes stages
-applied for the detrends we construct.
+The various detrends for GPC1 are constructed in similar ways.  A
+series of appropriate exposures is selected from the database, and
+processed with the \ippprog{ppImage} program.  This program is used
+for the \ippstage{chip} stage processing as well, and is designed to
+do multiple image processing operations.  The extent of this
+processing is dependent on the order in which the detrend to be
+constructed is applied to science data.  In general, the input
+exposures to the detrend have all prior stages of detrend processing
+applied.  Table \ref{tab:detrend ppImage} summarizes stages applied
+for the detrends we construct.
 
 Once the input data has been prepared, the \ippprog{ppMerge} program
@@ -241,15 +240,15 @@
 format of the detrend under construction, and after construction, are
 applied to the processed input data.  This creates a set of residual
-files that can be checked to determine if the newly created detrend
-works correctly.
-
-The process of detrend construction and testing can be iterated, with
+files that are checked to determine if the newly created detrend
+correctly removes the detector dependent signal.
+
+This process of detrend construction and testing can be iterated, with
 individual exposures excluded if they are found to be contaminating
-the output.  If the final detrend is considered sufficient, then the
-iterations are stopped and the detrend is finalized by selecting the
-date range to which it applies.  This allows subsequent science
-processing to select the detrends needed based on the observation
-date.  Table \ref{tab:detrend list} lists the set of detrends used in
-the PV3 processing.
+the output.  If the final detrend has sufficiently small residuals,
+then the iterations are stopped and the detrend is finalized by
+selecting the date range to which it applies.  This allows subsequent
+science processing to select the detrends needed based on the
+observation date.  Table \ref{tab:detrend list} lists the set of
+detrends used in the PV3 processing.
 
 \begin{deluxetable}{lcccc}
@@ -363,12 +362,12 @@
 
 The final non-linear response issue has no good option for correction.
-Large regions of some OTA cells experience charge transfer issues,
-making them unusable to be used for science observations.  These
-regions are therefore masked in processing, with these CTE regions
-making up the largest fraction of masked pixels on the detector.
-Other regions are masked for other regions, such as static bad pixel
-features or temporary readout masking caused by issues in the camera
-electronics that make these regions unreliable.  These all contribute
-to the detector mask, which is augmented in each exposure for dynamic
+Large regions of some OTA cells experience significant charge transfer
+issues, making them unusable for science observations.  These regions
+are therefore masked in processing, with these CTE regions making up
+the largest fraction of masked pixels on the detector.  Other regions
+are masked for other regions, such as static bad pixel features or
+temporary readout masking caused by issues in the camera electronics
+that make these regions unreliable.  These all contribute to the
+detector mask, which is augmented in each exposure for dynamic
 features that are masked based on the astronomical features within the
 field of view.
@@ -407,17 +406,18 @@
 between exposures.
 
-Both of these types of persistence trails are detected and optionally
+Both of these types of persistance trails are measured and optionally
 repaired via the \ippprog{burntool} program.  This program does an
 initial scan of the images, and identifies objects with pixel values
-brighter than a threshold of 30000 DN.  The trail from that star is
-fit with a one-dimensional power law in each pixel column above that
-threshold, based on empirical evidence that this is the functional
-form of this persistence effect.  This also matches the expectation
-that a constant fraction of charge is incompletely transferred at each
-shift beyond the persistence threshold.  Once this fit is done, the
-model can subtracted from the image, and the location of the star is
-stored in a table along with the exposure PONTIME, which denotes the
-number of seconds since the detector was last powered on and provides
-an internally consistent time scale.
+brighter than a conservative threshold of 30000 DN.  The trail from
+the peak of that object is fit with a one-dimensional power law in
+each pixel column above the threshold, based on empirical evidence
+that this is the functional form of this persistence effect.  This
+also matches the expectation that a constant fraction of charge is
+incompletely transfered at each shift beyond the persistence
+threshold.  Once this fit is done, the model can be subtracted from
+the image, and the location of the star is stored in a table along
+with the exposure PONTIME, which denotes the number of seconds since
+the detector was last powered on, and provides an internally consistent
+time scale.
 
 For subsequent exposures, the table associated with the previous image
@@ -426,14 +426,14 @@
 check for remnant trails on the image.  These are fit and subtracted
 using a one-dimensional exponential model, again based on empirical
-studies.  If a significant model with is determined, then this
-location is retained in the image output table.  If not, the old burn
-is allowed to expire.
-
-An issue with this method of correcting the persistence trails is that
-it is based on fits to the raw image data, which may have other signal
-sources not determined by the persistence effect.  The presence of
-other stars or artifacts along the path of the burn can result in a
-poor model to be determined, resulting in either an over- or
-under-subtraction of the persistence burn.  For this reason, the image
+studies.  If a significant model is found, then this location is
+retained in the image output table.  If not, the old burn is allowed
+to expire.
+
+The main concern with this method of correcting the persistance trails
+is that it is based on fits to the raw image data, which may have
+other signal sources not determined by the persistence effect.  The
+presence of other stars or artifacts along the path of the burn can
+result in a poor model to be fit, resulting in either an over- or
+under-subtraction of the persistance burn.  For this reason, the image
 mask is marked with a value indicating that this correction has been
 applied.  These pixels are not fully excluded, but they are marked as
@@ -462,5 +462,5 @@
   \end{minipage}
 
-  \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy60 (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 reduce the impact of these features.  Both exposures are in the g-filter with exposure times of 43s}
+  \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy60 (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 g-filter with exposure times of 43s}
 \end{figure}
 
@@ -489,5 +489,5 @@
 %  \end{subfigure}
   \end{minipage}
-  \caption{Example of OTA11 cell xy60 on exposures o5677g0123o (left) and o5677g0124o (right).  The top panels show the image with all appropriate detrending steps, but with 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{Example of OTA11 cell xy60 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.}
 \end{figure}
 
@@ -507,5 +507,5 @@
 charge transfer efficiency is low compared to the rest of the
 detector.  Twenty-five of the sixty OTAs in GPC1 show some evidence of
-CTE issues, with this pattern showing up (to varying degrees) in
+CTE issues, with this pattern appearing (to varying degrees) in
 roughly triangular patches on the OTA due to defects in the
 semiconductor manufacturing.  To generate the mask for these regions,
@@ -558,5 +558,5 @@
   \label{fig:static mask}
   
-  \caption{Image map of static mask. color coded based on mask reason?  It won't be visible at true pixel scale.}
+  \caption{Image map of the GPC1 static mask.  The CTE regions are clearly visible as roughly triangular patches covering the corners of some OTAs.  Some entire cells are masked, including an entire column of cells on OTA14.  Calcite cells remove large areas from OTA17 AND OTA76.}
 \end{figure}
 
@@ -592,7 +592,7 @@
 
 In addition to the static mask that removes the constant detector
-level defects, we also generate a set of dynamic masks that change
-with the astronomical features in the image.  These masks are advisory
-in nature, and do not completely exclude the pixel from further
+defects, we also generate a set of dynamic masks that change with the
+astronomical features in the image.  These masks are advisory in
+nature, and do not completely exclude the pixel from further
 processing consideration.  The first of these dynamic masks is the
 burntool advisory mask mentioned above.  These pixels are included for
@@ -601,13 +601,13 @@
 deviations due to imperfections in the burntool correction.
 
-The remaining dynamic masks are not generated until the IPP \ippstage{camera}
-stage, at which point all object photometry is complete, and an
-astrometric solution is known for the exposure.  This added
-information provides the positions of bright sources based on the
-reference catalog, including those that fall slightly out of the
+The remaining dynamic masks are not generated until the IPP
+\ippstage{camera} stage, at which point all object photometry is
+complete, and an astrometric solution is known for the exposure.  This
+added information provides the positions of bright sources based on
+the reference catalog, including those that fall slightly out of the
 detector field of view or within the inter chip gaps, where internal
-photometry may not have identified them.  These bright sources are the
-origin for many of the image artifacts that the dynamic mask 
-identifies and excludes.
+photometry may not identify them.  These bright sources are the origin
+for many of the image artifacts that the dynamic mask identifies and
+excludes.
 
 \subsubsection{Electronic crosstalk ghosts}
@@ -615,6 +615,6 @@
 
 Due to electrical crosstalk between the flex cables connecting the
-individual detector OTA devices, ghost objects can be created due to
-the presence of a bright source at a different position on the camera.
+individual detector OTA devices, ghost objects can be created by the
+presence of a bright source at a different position on the camera.
 Table \ref{tab:crosstalk_rules} summarizes the list of known crosstalk
 rules, with an estimate of the magnitude difference between the source
@@ -622,17 +622,17 @@
 column of cells on any of the OTAs in the specified column of OTAs $Y$
 creates the ghost in the same $v$ and $Y$ in the target column of
-cells and OTAs.  In each of these cases, a source object brighter than
--14.47 instrumental magnitude creates a ghost object many orders of
-magnitude fainter at the target location.  The cell (x,y) pixel
-coordinate is identical between source and ghost, as a result of the
-transfer occurring as the devices are read.  A circular mask is added
-to the ghost location with radius $R = 3.44 \left(-14.47 - m_{source,
-  instrumental}\right)$ pixels.  Any objects in the photometric
-catalog found at the location of the ghost mask have the GHOST mask
-bit set, marking the object as a likely ghost.  The majority of the
-crosstalk rules are bi-directional, with a source in either position
-creating a ghost at the corresponding crosstalk target position.  The
-two faintest rules are uni-directional, due to differences in the
-electronic path for the crosstalk.
+cells and OTAs.  In each of these cases, a source object with an
+instrumental magnitude brighter than -14.47 creates a ghost object
+many orders of magnitude fainter at the target location.  The cell
+(x,y) pixel coordinate is identical between source and ghost, as a
+result of the transfer occurring as the devices are read.  A circular
+mask is added to the ghost location with radius $R = 3.44 \left(-14.47
+- m_{source, instrumental}\right)$ pixels.  Any objects in the
+photometric catalog found at the location of the ghost mask have the
+GHOST mask bit set, marking the object as a likely ghost.  The
+majority of the crosstalk rules are bi-directional, with a source in
+either position creating a ghost at the corresponding crosstalk target
+position.  The two faintest rules are uni-directional, due to
+differences in the electronic path for the crosstalk.
 
 For the very brightest sources ($m_{instrumental} < -15$), there can
@@ -843,13 +843,12 @@
 the cells on an OTA taking video data.  Before the nature of this
 issue was fully understood, these poorly constrained corners were
-masked with 25-pixel radius quarter circles, centered on the (0,0)
+masked with 25-pixel radius quarter circles, centered on the (1,1)
 pixel nearest the cell amplifier.  The other corners of the cell were
 masked with a 15-pixel radius quarter circle, as the amplifier
-creating the glow is associated with another cell, separated by the
-inter-cell spacing, diminishing the area affected.  Due to the large
+creating the glow is associated with another cell and separated by the
+inter-cell spacing, diminishing the area effected.  Due to the large
 area that this masking would cover, the PV3 processing used a more
 robust video dark model to correct this problem, as described in
 section \ref{sec:video_darks} below.
-
 
 \subsubsection{Masking Fraction}
@@ -873,5 +872,5 @@
 calculations to estimate the masking fraction.  The reference field of
 view of GPC1 is 3 degrees, which at the nominal plate scale of 0.258
-arcseconds per pixel, translates to a 20930 FPA pixel radius.
+arcseconds per pixel, translates to a 20930 FPA pixel radius. \czwdraft{I need a percentage here.}
 
 %% mysql> select filter,AVG(camProcessedExp.maskfrac_ref_static), AVG(camProcessedExp.maskfrac_ref_dynamic), AVG(camProcessedExp.maskfrac_ref_advisory), AVG(camProcessedExp.maskfrac_max_static),AVG(camProcessedExp.maskfrac_max_dynamic),AVG(camProcessedExp.maskfrac_max_advisory) from camRun join camProcessedExp USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.label = 'LAP.PV3.20140730.final' GROUP BY filter;
@@ -894,6 +893,6 @@
 unvignetted field of view results in an average of $\sim 20\%$ masking
 fraction across the field of view.  Dynamic masking adds an additional
-$2-3\%$, with advisory burntool masking contributing the largest
-single component.
+$2-3\%$ on average, with advisory burntool masking contributing the
+largest single component.
 
 \subsection{Overscan}
@@ -997,5 +996,5 @@
 
 The dark model we make for GPC1 considers each pixel individually,
-independent of any neighbors.  To create the dark model, we fit an
+independent of any neighbors.  To construct this model, we fit a
 multi-dimensional model to the array of input pixels from a randomly
 selected set of 100-150 overscan and non-linearity corrected dark
@@ -1055,5 +1054,5 @@
 these profiles indicates that the average dark model does not correct
 these dates sufficiently, due to the contradictory dark signals
-between the two modes. \czwdraft{this paragraph dependent on that figure.}
+between the two modes. \czwdraft{this paragraph dependent on that figure.  This doesn't quite match.}
 
 After 2011-05-01, the two-mode behavior of the dark disappears, and is
@@ -1109,8 +1108,8 @@
 can only run video signals on a subset of the OTAs at a given time.
 This requires two passes to enable the video signal across the full
-set of OTAs that support video cells.  This is beneficial to the
+set of OTAs that support video cells.  This is convenient for the
 process of creating darks, as those OTAs that do not have video
 signals enabled create standard dark models, while the video dark is
-created for the other devices.
+created for those that do.
 
 This simultaneous construction of video and standard dark models is
@@ -1167,11 +1166,11 @@
 Unfortunately, due to correlations within this noise, the variance
 measured from the bias images does not fully remove the positional
-dependence of objects that are detected.  The reason for this is that
-this simple noisemap underestimates the noise observed when the image
-is filtered during the object detection process.  This filtering
-convolves the background noise with a PSF, which has the effect of
-amplifying the correlated peaks in the noise.  This amplification can
-therefore boost background fluctuations above the threshold used to
-select real objects, contaminating the final object catalogs.
+dependence of objects that are detected.  This simple noisemap
+underestimates the noise observed when the image is filtered during
+the object detection process.  This filtering convolves the background
+noise with a PSF, which has the effect of amplifying the correlated
+peaks in the noise.  This amplification can therefore boost background
+fluctuations above the threshold used to select real objects,
+contaminating the final object catalogs.
 
 In the detection process, we expect false positives at a rate equal to
@@ -1236,5 +1235,5 @@
 due to the photometric consistency observed in the final catalog of
 GPC1 measurements \citep{MagnierXXX}, we can be confident that the
-flat model does not have a major time dependent component.
+flat model does not have a significant time dependent component.
 
 \subsection{Pattern correction}
@@ -1244,10 +1243,9 @@
 dark model, we have a set of ``pattern'' corrections that are applied
 to some selection of the OTAs in the camera.  This is done to reduce
-the effect that detector differences that are not stable enough to be
-corrected with a global model have on the measured astronomical
-signal.  Because these are not stable features that can simply be
-averaged over a large number of inputs, the pattern corrections
-attempt to identify and correct the detector issues based on
-appropriate filtering the individual science exposures.
+the effect that detector differences have on the measured astronomical
+signal that are not stable enough to be corrected with a static model.
+Because of this, the pattern corrections attempt to identify and
+correct the detector issues based on appropriate filtering the
+individual science exposures.
 
 The PATTERN.ROW correction is used to remove any remaining row-by-row
@@ -1259,12 +1257,12 @@
 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Bias_Pattern_Study
 As discussed above in the dark and noisemap sections, certain
-detectors have significant row-by-row bias offsets, caused by noise in
-the camera control electronics.  The magnitude of these offsets
-increases as the distance from the readout amplifier increases,
-resulting in horizontal streaks that are more pronounced along the
-large x pixel edge of the cell.  As the level of the offset is
-apparently random between exposures, the dark correction cannot fully
-remove this structure from the images, and the noisemap value only
-indicates the level of the average variance added by these bias
+detectors have significant bias offsets between adjacent rows, caused
+by noise in the camera control electronics.  The magnitude of these
+offsets increases as the distance from the readout amplifier
+increases, resulting in horizontal streaks that are more pronounced
+along the large x pixel edge of the cell.  As the level of the offset
+is apparently random between exposures, the dark correction cannot
+fully remove this structure from the images, and the noisemap value
+only indicates the level of the average variance added by these bias
 offsets.  Therefore, we apply the PATTERN.ROW correction in an attempt
 to mitigate the offsets and correct the image values.  To force the
@@ -1272,12 +1270,12 @@
 the cell.  Four fit iterations are run, and pixels $2.5\sigma$ deviant
 are excluded from subsequent fits, to minimize the effect stars and
-other astronomical signals have.  The final trend is then subtracted
-from the image.  Simply doing this subtraction will also have the
+other astronomical signals have.  This final trend is then subtracted
+from that row.  Simply doing this subtraction will also have the
 effect of removing the background sky level.  To prevent this, the
 constant and linear terms for each row are stored, and linear fits are
-made to these parameters as a function of row.  This produces a plane
-that is added back to the image to restore the background offset and
-any linear ramp that exists in the sky.
-
+made to these parameters as a function of row, perpendicular to the
+initial fits.  This produces a plane that is added back to the image
+to restore the background offset and any linear ramp that exists in
+the sky.
 
 This correction was required on all cells on all OTAs prior to
@@ -1350,5 +1348,5 @@
 %  \end{subfigure}
   \end{minipage}
-  \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy00 (i-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. \czwdraft{which I can't seem to find proper ranges to highlight.}}
+  \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy00 (i-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.}
 \end{figure}
 
@@ -1392,5 +1390,5 @@
 $\Delta_i = \sum_{j} Edge_{i} - Edge_{j}$, along with a matrix of
 associations $A_{i,i'} = \sum_{j} \delta(i,j) \delta(j,i')$ denoting
-which cell boundaries touch another.  By solving the system $A x =
+which cell boundaries are adjacent.  By solving the system $A x =
 diff$, we find the set of offsets $x_i$ to be applied to each cell to
 ensure the minimum differences between all cell edges and their
@@ -1421,6 +1419,6 @@
 Due to variations in the thickness of the detectors, we observe
 interference patterns at the infrared end of the filter set, as the
-wavelength of the light becomes comparable to the thickness of these
-variations.  Visually inspecting the images shows that the fringing is
+wavelength of the light becomes comparable to the thickness of the
+detectors.  Visually inspecting the images shows that the fringing is
 most prevalent in the y-filter images, with negligible fringing in
 other bands.  As a result of this, we only apply a fringe correction
@@ -1436,16 +1434,16 @@
 
 A course background model is constructed by calculating the median on
-a 3x3 grid (200x200 pixels each).  A set of 1000 randomly selected
-points are selected on \czwdraft{the final image} in each cell, and
-median calculated for this position in a 10x10 pixel box, and the
-background level subtracted.  These sample locations provide scale
-points to allow the amplitude of the measured fringe to be compared to
-that found on science images.
+a 3x3 grid (approximately 200x200 pixels each).  A set of 1000
+randomly selected points are selected on the fringe image in each
+cell, and a median calculated for this position in a 10x10 pixel box,
+with the background level subtracted.  These sample locations provide
+scale points to allow the amplitude of the measured fringe to be
+compared to that found on science images.
 
 To apply the fringe, the same sample locations are measured on science
 image to determine the relative strength of the fringing in that
 particular image.  A least squares fit between the fringe measurements
-and the corresponding measurements on the science provides the scale
-factor multiplied by the fringe before it is subtracted from the
+and the corresponding measurements on the science image provides the
+scale factor multiplied to the fringe before it is subtracted from the
 science image.
 
@@ -1470,5 +1468,4 @@
 \label{sec:background}
 
-
 Once all other detrending is done, the pixels from each cell are
 mosaicked into the full $4846\times{}4868$ pixel OTA image.  A
@@ -1505,8 +1502,8 @@
 projected onto a common set of tangent plane projected regions called
 projection cells.  These projection cells are $4\times{}4$ degree
-fields spaced onto set of centers that fully cover the sky.  They are
+fields spaced onto a set of centers that fully cover the sky.  They are
 arranged into rings of constant declination, and allowed to overlap as
 $|\delta|$ increases.  Each projection cell is further subdivided into
-$10\times{}10$ sky cells with fixed $0.25"$ resolution pixels, with
+$10\times{}10$ sky cells with fixed $0.25"$ resolution pixels, and
 constant overlap regions between adjacent skycells of $60"$.  These
 skycells are the main image unit used for processing image data beyond
@@ -1593,10 +1590,10 @@
 system, they can then be combined pixel-by-pixel regardless of their
 original orientation.  Creating a stacked image by coadding the
-individual warps increases the signal to noise which allows objects
-fainter than can be found on the individual inputs to be detected.
-Creating this stack also allows a complete image to be constructed
-that does not have regions masked due to the gaps between cells and
-OTAs.  This provides a fully populated static sky image that can
-be used for subtraction to find transient sources.
+individual warps increases the signal to noise, allowing objects
+fainter than the single image signal to noise threshold.  Creating
+this stack also allows a complete image to be constructed that does
+not have regions masked due to the gaps between cells and OTAs.  This
+fully populated static sky image can also be used as a template for
+subtraction to find transient sources.
 
 The stacked image is comprised of all warp frames for a given skycell
@@ -1670,9 +1667,9 @@
 With the flux normalization factors and target PSF chosen, the
 convolution kernels can be calculated for each image.  ISIS kernels
-are used with FWHM values of 1.5, 3.0, and 6.0 pixels and polynomial
-orders of 6, 4, and 2.  \czwdraft{Skipping this bit because I'm not
-  completely sure I understand it.}  The image is then scaled by the
-normalization as $renorm = 10^{-0.4 * norm_{image}} /
-norm_{convolution}$, and the variance by the square of that value.
+\citep{ISIS_kernels} are used with FWHM values of 1.5, 3.0, and 6.0
+pixels and polynomial orders of 6, 4, and 2.  \czwdraft{Skipping this
+  bit because I'm not completely sure I understand it.}  The image is
+then scaled by the normalization as $renorm = 10^{-0.4 * norm_{image}}
+/ norm_{convolution}$, and the variance by the square of that value.
 
 
@@ -1794,5 +1791,5 @@
 warp-warp difference images to be constructed to identify transient
 detections, higher pixel values that come from sources like optical
-ghosts depend on the telescope pointing will come in pairs as well.
+ghosts that depend on the telescope pointing will come in pairs as well.
 The higher pixel value contaminants are also potentially problematic
 as they may appear to be real sources, prompting photometry to be
@@ -1806,5 +1803,5 @@
 $B$, then a check is made to see if $(0.5 * (value_A - value_B))^2 >
 rej^2 * (variance_A + variance_B + (sys * value_A)^2 + (sys *
-value_B)^2)$, where $rej$ is the number of sigma deviant a point needs
+value_B)^2)$, where $rej$ is the number of sigmas deviant a point needs
 to be to be excluded, set to 4.0 for the PV3 processing, and $sys$ is
 an estimate of the systematic error, taken to be 0.1.
@@ -1904,5 +1901,5 @@
 determine the largest square box that contains under the limit of
 $0.25 * \sum_{x,y} kernel^2$.  This box is then convolved with the
-rejected pixel mask to reject their neighbors.  This final list of
+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.
@@ -1984,10 +1981,10 @@
 \label{sec:discussion}
 
-\czwdraft{Although the detrending and image combination algorithms
-  work well to produce a consistent and calibrated images, having the
-  full PV3 data set allows issues to be identified and solutions
-  created for future improvements to the IPP pipeline.  In addition,
-  the existence of the final calibrated catalog can be used to look
-  for issues that appear dependent on focal plane position.}
+Although the detrending and image combination algorithms work well to
+produce a consistent and calibrated images, having the full PV3 data
+set allows issues to be identified and solutions created for future
+improvements to the IPP pipeline.  In addition, the existence of the
+final calibrated catalog can be used to look for issues that appear
+dependent on focal plane position.
 
 An obvious way to make use of the PV3 catalog is to do a statistical
@@ -2055,6 +2052,21 @@
 clip this peak to reduce the noise in the image space is not clear.
 
-
-\czwdraft{I need a good concluding thing to say, so it doesn't end with, ``we should do better next time.''}
+\section{Conclusion}
+
+\czwdraft{Not happy with this.}
+
+The Pan-STARRS1 PV3 processing has reduced an unprecidented volume of
+image data, and has produced a catalog of \czwdraft{N} individual
+measurements of \czwdraft{Y} astronomical objects.  Accurately
+calibrating and detrending is essential to ensuring the quality of
+these results.  The detrending process detailed here produces
+consistent data, despite the many individual detectors and their
+individual response functions.
+
+From these individual exposures, we are able to construct images on
+common projections and orientations, further removing the particulars
+of any single exposure.  Furthermore, by created stacked images, we
+can determine an estimate of the true static sky, providing a deep
+data set that is ideal for use as a template for image differences.
 
 The Pan-STARRS1 Surveys (PS1) have been 
