Index: trunk/doc/release.2015/ps1.analysis/analysis.tex
===================================================================
--- trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 41311)
+++ trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 41312)
@@ -120,5 +120,5 @@
 % \end{verbatim}
 
-The 1.8m Pan-STARRS\,1 telescope is located on the summit of Haleakala
+The 1.8m Pan-STARRS\,1 telescope (PS1) is located on the summit of Haleakala
 on the Hawaiian island of Maui.  The wide-field optical design of the
 telescope \citep{2004SPIE.5489..667H} produces a 3.3 degree field of view with
@@ -151,4 +151,12 @@
 details of the telescope, surveys, and resulting science publications
 are described by \cite{chambers2017}.
+
+Since 2014 March, PS1 has been re-dedicated to a mission of searching
+for hazardous asteroids, funded by the NASA NEO Program. Additional
+partners collaborate with the Pan-STARRS team to harvest the transient
+sources such supernovae and graviational wave counterparts
+\note{REFS}.  A second Pan-STARRS telescope (PS2), generally matching
+the PS1 design \citep{Morgan2012} has since been constructed and has
+been producing science results since early 2018.
 
 %The Processing Version 3 (PV3) reduction represents the third full
@@ -337,6 +345,5 @@
 image, or a group of related images representing the data read from
 \textmod{the multiple chips of a mosaic 
-camera from} a single exposure.  \textadd{In the IPP sequencing, this step is
-called the \ippstage{chip} stage.}  The images are expected to have already
+camera from} a single exposure.  The images are expected to have already
 been detrended so that pixel values are linearly related to the flux.
 The gain may be specified by the configuration system, or a variance
@@ -347,19 +354,51 @@
 program \ippprog{ppImage} during the \ippstage{chip} analysis stage.
 
+\textadd{In the standard IPP analysis, the initial stage of processing
+  is performed in parallel on each of the individual CCDs in the
+  camera.  This so-called \ippstage{chip} stage analysis includes the
+  detrending of CCD image as well as the detection and analysis of
+  sources in the image using the basic version of \ippprog{psphot}.
+  The next stage of the analysis, the \ippstage{camera} stage,
+  consists of photometric and astrometric calibration.}
+
+  \textadd{After the calibrations are available, the detrended CCD images from
+  an entire exposure are geometrically transformed to a common pixel
+  grid in the \ippstage{warp} stage of the pipeline.  The resulting
+  warped images are generated on a pre-define tessellation of the sky
+  which starts with projection centers spaced roughly
+  4\degrees\ across the sky.  Around each of these projection centers,
+  a large regular pixel grid is defined, and then subdivided along
+  pixel boundaries into smaller units which are well-matched to the
+  memory footprint of our processing computesr.  These smaller images,
+  called `skycells' are defined with 1 arcminute of overlap with their
+  neighbors to that any modest-sized object can be analysed entirely
+  on a single pixel grid.  Note that the term skycell is used to
+  describe the particular subdivision of the sky.  A typical exposure
+  from the GPC1 camera generates warp images on roughly 70 skycells.
+  We refer to the specific warped images from an exposure as `warps'.}
+
+  \textadd{Multiple warps for the same skycell are combined together in the
+  \ippstage{stack} stage of the IPP by co-adding the flux to generate
+  a deep `stack' image.  Alternatively, one warp may be subtracted
+  from another warp of the same skycell, or a stack image may be
+  subtracted from a warp image, or indeed from another stack.  These
+  subtraction operations are used to detect moving and transient
+  objects within the IPP.  Different variants of \ippprog{psphot} are
+  used for the source detection and analysis for each of these
+  different analysis stages.}
+
 The variant called \ippprog{psphotStack} accepts a set of images, each
 representing the same patch of sky \textadd{(with pixels aligned)} in
-a different \textmod{filter.  This version was used for the analysis
-  of the deep ``stacks'' (co-added images combining multiple
-  observations of the same field) produced by the IPP \ippstage{stack}
-  stage.  Nominally,
-the full $grizy$ filter set was used for the analysis} of the PS1 PV3 stack
-images, though where insufficient data were available in a given
-filter, a subset of these filters was processed as a group.  As
-discussed in detail below, the \ippprog{psphotStack} analysis includes the
-capability of measuring forced PSF photometry in some filter images
-based on the position of sources detected in the other filters.  It
-also includes an option to convolve the set of images to a single,
-common PSF size across the filters for the purpose of fixed aperture
-photometry.
+a different \textmod{filter.  This version was used in the IPP for the
+  analysis of the deep ``stacks'' produced by the IPP \ippstage{stack}
+  stage.  Nominally, the full $grizy$ filter set was used for the
+  analysis} of the PS1 PV3 stack images, though where insufficient
+data were available in a given filter, a subset of these filters was
+processed as a group.  As discussed in detail below, the
+\ippprog{psphotStack} analysis includes the capability of measuring
+forced PSF photometry in some filter images based on the position of
+sources detected in the other filters.  It also includes an option to
+convolve the set of images to a single, common PSF size across the
+filters for the purpose of fixed aperture photometry.
 
 Another variant of \ippprog{psphot} used in the PV3 analysis is called
@@ -1638,4 +1677,5 @@
 
 \subsubsection{Fast Ensemble PSF Fitting}
+\label{sec:ensemble.fitting}
 
 Before the detailed analysis of the sources is performed, it is
@@ -2900,5 +2940,5 @@
 \end{figure*}
 
-\section{Forced Photometry Modes}
+\section{Forced Warp Analysis}
 \label{sec:psf.forced.fit}
 
@@ -2951,26 +2991,35 @@
 
 The IPP analysis solves this problem by starting with the sources
-detected in the stack images and performing forced photometry on the
-individual warp images used to generate the stack, and then combining
-the resulting measurements to determine a high-quality average value.
-This forced-photometry analysis is performed using the
+detected in the stack images and performing \textmod{a highly
+  constrained analysis on the individual warp images used to generate
+  the stack, and then combining the resulting measurements to
+  determine a high-quality average value.  We consider all of these
+  measurements to be ``forced'' because of the strong prior
+  constraints from the stack.}  This analysis is performed using the
 \ippprog{psphotFullForce} variant of \ippprog{psphot}.
 
-In this program, the positions of sources are loaded from the output
-catalog of the stack photometry.  Candidates PSF stars are
-pre-identified as those stars used to generate the PSF model in the
-stack photometry analysis.  A PSF model is generated for each input
-warp image based on those stars; PSF stars which are excessively
-masked on a particular image are not used to model the PSF.  The PSF
-model is fitted to all of the known source positions in the warp
-images.  Aperture magnitudes, Kron magnitudes, and moments are also
-measured at this stage for each warp.  Note that the flux measurement
-for a faint, but significant, source from the stack image may be at a
-low significance (less than the $5\sigma$ criterion used when the
+\subsection{Forced PSF Photometry}
+
+\textmod{PSF photometry is measured for all objects detected in the
+  stack using the positions determined by the stack photometry
+  analysis.}  Candidate PSF stars are pre-identified as those stars
+used to generate the PSF model in the stack photometry analysis.  A
+PSF model is generated for each input warp image based on those stars;
+PSF stars which are excessively masked on a particular image are not
+used to model the PSF.  The \textadd{normalization of the} PSF model
+is fitted to all of the known source positions in the warp images to
+determine the PSF fluxes. This measurement is performed simultaneously
+for all sources in the image at once using the method described above
+(Section~\ref{sec:ensemble.fitting}).
+
+\textmod{Aperture fluxes, Kron fluxes}, and moments are also measured at
+this stage for each warp.  Note that the flux measurement for a faint,
+but significant, source from the stack image may be at a low
+significance (less than the $5\sigma$ criterion used when the
 photometry is not run in this forced mode) in any individual warp
 image; the measured flux may even be negative due to statistical
 fluctuations.  When combined together, these low-significance
-measurements result in a significant measurement as the signal-to-noise
-increases with the combination of more data.
+measurements result in a significant measurement as the
+signal-to-noise increases with the combination of more data.
 
 Individual warp images are processed independently with separate
@@ -3022,4 +3071,7 @@
 normalization value is determined.  The integrated flux, flux error,
 and the $\chi^2$ value for each grid point are recorded.
+\textadd{This analysis is performed on the warp images one object at a
+  time with the other objects in the image subtracted according to
+  the best model currently known.}
 
 For a given galaxy, the result is a collection of $\chi^2$ values,
@@ -3071,10 +3123,13 @@
 For the Pan-STARRS $3\pi$ PV3 analysis, we have measured the full set
 of KSB lensing parameters for all objects with measured second moments
-(i.e.,, excluding saturated stars, suspected cosmic rays, and other
+(i.e., excluding saturated stars, suspected cosmic rays, and other
 likely defects) 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}.
+\cite{1998ApJ...504..636H}.  \textadd{Just like the forced PSF
+  photometry and the constrained galaxy models above, this analysis is
+  performed by measuring the KSB lensing parameters on the individual
+  warp images and averaging these measurements for each object.}
 
 The goal of the KSB technique is to measure the intrinsic ellipticity
@@ -3099,5 +3154,5 @@
 $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$.
+$e_2$ and low absolute values of $e_1$.
 
 Note that in our analysis of the second moments, we are applying a
@@ -3211,8 +3266,9 @@
   sm}_\alpha$) and the shear polarizability ($X^{\rm sh}_{\alpha
   \beta}$, $e^{\rm sh}_\alpha$) for all objects on each of the warp
-images.  We have also selected only the PSF stars from the images and
-interpolated a smoothed version of these parameters to the location of
-the objects, using the grid described above to interpolate the PSF
-parameters.  We also determine the interpolated PSF ellipticities
+images.  \textmod{We have also selected only the PSF stars from the images and
+interpolated a smoothed version of these parameters from the PSF stars
+to the locations of
+all objects, using the grid described above to interpolate the 
+parameters.  We then determine the ellipticities of the stars}
 ($e^*_1, e^*_2$) from the equivalent smooth grid.  Thus, for every
 object in the $3\pi$ survey, we are able to report the PSF and object
@@ -3241,4 +3297,14 @@
 which generates those image.  
 
+\note{Note that this article is limited to the analysis of the
+  difference image detections, and that additional work is needed to
+  filter real/bogus.  Refer to Denneau et al 2013 PASP for the MOPS analysis.  Refer
+  to the Wright et al papers for the SNe classifications (& other
+  papers?).  Mention Yuan \& Akerloff 2008.}
+
+\note{mention the 3 difference image modes (WW, WS, SS)}
+
+% https://ui.adsabs.harvard.edu/abs/2013PASP..125..357D/abstract  
+
 The analysis of the difference image follows the same basic steps as
 other \ippprog{psphot} versions with some minor modifications (see
@@ -3247,5 +3313,5 @@
 performed.  The PSF model construction stage is not possible in the
 difference image due to the lack of valid sources.  Instead, the PSF
-model from is generated from the positive image, after PSF-matching
+model is generated from the positive image, after PSF-matching
 but before the subtraction is performed.  Because we do not expect to
 have a large number of sources, only a single source detection pass is
@@ -3367,4 +3433,7 @@
 repeated measurements of the same exposures).  
 
+% PS2 reference:
+% https://ui.adsabs.harvard.edu/abs/2012SPIE.8444E..0HM/abstract
+
 \acknowledgments
 
Index: trunk/doc/release.2015/ps1.analysis/response.txt
===================================================================
--- trunk/doc/release.2015/ps1.analysis/response.txt	(revision 41311)
+++ trunk/doc/release.2015/ps1.analysis/response.txt	(revision 41312)
@@ -518,8 +518,24 @@
 are averaged.
 
+** We agree that the organization of this section could be improved,
+but we disagree a bit with the proposal.  We consider all of these
+analyses to be forced in that the fits are highly constrained by the
+stack priors, with their positions (for PSFs and the lensing anaysis)
+and most of the structural parameters fixed.  In the extended galaxy
+analysis, each of the grid steps is completely forced, just like in
+forced PSF photometry.  By using the term 'forced' to describe this
+process, we would like to make it clear that, for each grid position,
+the parameters (except normalization) are completely constrained.
+
+We have renamed Section 6 as Forced Warp Analysis and split out the
+PSF vs extended source analysis sections as recommended.  We added
+some explanation at the end of the section to explain what we mean by
+'forced'.
+
 - The general description of the section should end with "variant of psphot",
 with the motivation being written such that it applies to both the
 averaged forced photometry on stars and the averaged single-epoch fits
 for galaxies
+** see previous
 
 Sec 6.1 (now 6.2):
@@ -532,10 +548,19 @@
 - The terms "skycell" and "warp image" are first used here without
 definition. Are warp images the same as CAMERA and CHIP?
-**
+** Updated Section 2 to outline the relevant processing stages and
+define 'warp', 'skycell', and 'stack' more cleanly.
 
 - For the forced photometry on single epoch images, is this a joint
 fit for overlapping objects?
-Are overlapping galaxy models subtracted first? "The PSF model is
-fitted..." -> "The amplitude of the PSF model is fitted as the flux..."
+** for the galaxy models, no.  The galaxy model fits are measured on
+each object with the other objects subtracted.  Text added to this
+effect in Section 6.1
+
+Are overlapping galaxy models subtracted first? 
+** yes, see above.
+
+"The PSF model is fitted..." -> "The amplitude of the PSF model is fitted as the flux..."
+** fixed the wording here and also clarified below that we measure
+Kron and aperture fluxes as well.
 
 Sec 6.2 (now 6.3):
@@ -543,7 +568,10 @@
 parameters are an average of all of the single-epoch measurements.
 This should be stated upfront, and then again at the end of the subsection
-clarifying how the PSF systematics are removed. Phrases like
+clarifying how the PSF systematics are removed.
+
+Phrases like
 "interpolated PSF ellipticities" are confusing, when I *think* what's
 being used are "interpolated star ellipticities".
+** reworded this to make the analysis clearer
 
 - Was this lensing code used in any of the GREAT challenge papers,
@@ -554,4 +582,5 @@
 - "ie,," -> "ie,"
 " absoluate" -> "absolute"
+** fixed both
 
 Sec 7:
@@ -561,10 +590,13 @@
 If these questions are covered in other Pan-STARRS papers, please reference
 them here.
+****
 
 - A basic piece of information that should be given is whether the differencing
 is performed on pairs of images, or single (warp) images compared to
 image stacks.
+****
 
 - "model from is" -> "model is"
+** fixed
 
 Conclusions:
