Index: /trunk/doc/release.2015/Makefile.Common
===================================================================
--- /trunk/doc/release.2015/Makefile.Common	(revision 39867)
+++ /trunk/doc/release.2015/Makefile.Common	(revision 39868)
@@ -7,14 +7,23 @@
 PS2PDF_OPTS = "-dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode"
 
+ifeq ($(DO_PDFLATEX),1)
+     MY_LATEX  = $(PDFLATEX)
+else
+     MY_LATEX  = $(PSLATEX)
+endif
+
 %.pdf: %.tex
-	$(PSLATEX) $*.tex 
-	$(BIBTEX) $*
-	$(PSLATEX) $*.tex 
-#	thumbpdf --modes=dvips $*.pdf
-#	$(PSLATEX) $*.tex 
-	dvips -z -t letter -o $*.ps $*.dvi
-	ps2pdf $(PS2PSF_OPT) $*.ps $*.pdf
+	$(MY_LATEX) $*.tex 
+	if [ $(DO_BIBTEX) -eq 1 ]; then $(BIBTEX) $*; fi
+	$(MY_LATEX) $*.tex 
+	if [ $(DO_BIBTEX) -eq 1  ]; then $(MY_LATEX) $*.tex; fi
+	thumbpdf --modes=dvips $*.pdf
+	$(MY_LATEX) $*.tex 
+	if [ $(DO_PDFLATEX) -eq 0 ]; then dvips -z -t letter -o $*.ps $*.dvi; fi
+	if [ $(DO_PDFLATEX) -eq 0 ]; then ps2pdf $(PS2PDF_OPTS) $*.ps $*.pdf; fi
 #	@rm -f $*.ps $*.dvi $*.aux $*.log $*.tbr $*.tbd $*.toc $*.tpm $*.lof body.tmp head.tmp
 
+%.tgz:
+	tar --transform 's%inputs/%%' -zcf $@ $(FILES)
 clean :
 	$(RM) *.bib *.log *.dvi *.aux *.toc *.tbd *.tbr *.tpm *.lof *.out *~ core body.tmp head.tmp
@@ -24,2 +33,8 @@
 
 empty: clean
+
+foo:
+	@echo all: $^
+	@echo 1st: $<
+	@echo file: $@
+	@echo word: $*
Index: /trunk/doc/release.2015/inputs/lib.bib
===================================================================
--- /trunk/doc/release.2015/inputs/lib.bib	(revision 39867)
+++ /trunk/doc/release.2015/inputs/lib.bib	(revision 39868)
@@ -9987,4 +9987,33 @@
 }
 
+% moffat profile:
+@ARTICLE{1969A&A.....3..455M,
+   author = {{Moffat}, A.~F.~J.},
+    title = "{A Theoretical Investigation of Focal Stellar Images in the Photographic Emulsion and Application to Photographic Photometry}",
+  journal = {\aap},
+     year = 1969,
+    month = dec,
+   volume = 3,
+    pages = {455},
+   adsurl = {http://adsabs.harvard.edu/abs/1969A%26A.....3..455M},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+
+% more moffat example:
+@ARTICLE{1983A&A...126..278B,
+   author = {{Buonanno}, R. and {Buscema}, G. and {Corsi}, C.~E. and {Ferraro}, I. and 
+	{Iannicola}, G.},
+    title = "{Automated photographic photometry of stars in globular clusters}",
+  journal = {\aap},
+ keywords = {Astronomical Photography, Globular Clusters, Star Distribution, Stellar Spectrophotometry, Hertzsprung-Russell Diagram, Stellar Evolution},
+     year = 1983,
+    month = oct,
+   volume = 126,
+    pages = {278-282},
+   adsurl = {http://adsabs.harvard.edu/abs/1983A%26A...126..278B},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+
+% daophot                  
 @ARTICLE{1987PASP...99..191S,
     author = {{Stetson}, P.~B.},
@@ -15800,4 +15829,5 @@
 }
 
+% dophot
 @ARTICLE{1993PASP..105.1342S,
    author = {{Schechter}, P.~L. and {Mateo}, M. and {Saha}, A.},
Index: /trunk/doc/release.2015/ps1.analysis/Makefile
===================================================================
--- /trunk/doc/release.2015/ps1.analysis/Makefile	(revision 39867)
+++ /trunk/doc/release.2015/ps1.analysis/Makefile	(revision 39868)
@@ -1,19 +1,29 @@
 # $Id: Makefile,v 1.16 2006-01-16 01:11:40 eugene Exp $
+
+DO_PDFLATEX = 0
+DO_BIBTEX = 1
 
 help:
 	@echo "USAGE: make (target)"
-	@echo "  targets:  all analysis"
+	@echo "  targets:  all pdf tgz"
 
-all: analysis.pdf
-analysis: analysis.pdf
+all: pdf tgz 
+pdf: analysis.pdf
+tgz: analysis.tgz
 
-ANALYSIS = analysis.tex 
+FILES = \
+../inputs/astro.sty \
+../inputs/code.sty \
+../inputs/apj.bst \
+../inputs/lib.bib \
+peaks.ps \
+FWHM.smooth.trend.ps1.ps \
+moment.class.ps \
+radial.profiles.ps \
+analysis.tex \
+analysis.bbl
 
-#       pics/Metadata.ps 
-#       pics/earthrot.ps
-
-analysis.pdf: $(ANALYSIS)
-
-analysis.ps: $(ANALYSIS)
+analysis.pdf: $(FILES)
+analysis.tgz: $(FILES)
 
 include ../Makefile.Common
Index: /trunk/doc/release.2015/ps1.analysis/analysis.tex
===================================================================
--- /trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 39867)
+++ /trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 39868)
@@ -1,11 +1,6 @@
 \documentclass[iop,floatfix]{emulateapj}
-% \documentclass[iop,floatfix,onecolumn]{emulateapj}
+
 % \pdfoutput=1
 
-% see latex.readme.txt for notes on using the PS1 template
-%\documentclass[12pt,preprint]{aastex}
-%\documentclass[manuscript]{aastex}
-%\documentclass[preprint2]{aastex}
-%\documentclass[preprint2,longabstract]{aastex}
 \RequirePackage{color}
 \RequirePackage{code}
@@ -18,4 +13,5 @@
 %\def\plotext{pdf}
 \def\plotext{ps}
+\def\plottype{eps}
 
 %\def\picdir{/home/eugene/chipresid.20140404}
@@ -33,14 +29,12 @@
 % list and (2) re-order the list at the bottom (and comment-out as needed)
 \def\IfA{1}
+\def\Princeton{2}
+\def\DUR{3}
 \def\CfA{2}
-\def\MPIA{3}
-\def\Princeton{2}
-\def\USNO{4}
-\def\JHU{1}
 
 % This example has a first author from UH:
 \author{
 Eugene A. Magnier,\altaffilmark{\IfA}
-R. H. Lupton,\altaffilmark{\Princeton}
+% R. H. Lupton,\altaffilmark{\Princeton}
 W.~E. Sweeney,\altaffilmark{\IfA}
 K.~C. Chambers,\altaffilmark{\IfA} 
@@ -49,36 +43,31 @@
 P.~A. Price,\altaffilmark{\Princeton}
 C. Z. Waters,\altaffilmark{\IfA}
-PS1 Builders
+% PS1 Builders
+L. Denneau,\altaffilmark{\IfA}
+P. Draper,\altaffilmark{\DUR}
+R. Jedicke,\altaffilmark{\IfA}
+K. W. Hodapp,\altaffilmark{\IfA}
+R.-P. Kudritzki,\altaffilmark{\IfA}
+N. Metcalfe,\altaffilmark{\DUR}
+C.~W. Stubbs,\altaffilmark{\CfA}
 % W.~S. Burgett,\altaffilmark{\IfA}
-% K.~C. Chambers,\altaffilmark{\IfA} 
-% L. Denneau,\altaffilmark{\IfA}
-% P. Draper,\altaffilmark{\DUR}
-% H.~A. Flewelling,\altaffilmark{\IfA}
 % T. Grav,\altaffilmark{\IfA}
 % J. N. Heasley,\altaffilmark{\IfA}
-% K. W. Hodapp,\altaffilmark{\IfA}
-% M. E. Huber,\altaffilmark{\IfA}
-% R. Jedicke,\altaffilmark{\IfA}
 % N. Kaiser,\altaffilmark{\IfA}
-% R.-P. Kudritzki,\altaffilmark{\IfA}
 % G. A. Luppino,\altaffilmark{\IfA}
 % R. H. Lupton,\altaffilmark{\Princeton}
 % E. A. Magnier,\altaffilmark{\IfA}
-% N. Metcalfe,\altaffilmark{\DUH}
 % D. G. Monet,\altaffilmark{\USNO}
 % J.~S. Morgan,\altaffilmark{\IfA}
 % P. M. Onaka,\altaffilmark{\IfA}
-% P.~A. Price,\altaffilmark{\Princeton}
-% C.~W. Stubbs,\altaffilmark{\CfA}
-% W.~E. Sweeney,\altaffilmark{\IfA}
 % J.~L. Tonry, \altaffilmark{\IfA}
-% R. J. Wainscoat,\altaffilmark{\IfA} and 
-% C. Z. Waters,\altaffilmark{\IfA}
+R. J. Wainscoat\altaffilmark{\IfA}
 } % this bracket terminates author list
 
 % The ordering here should be sequential, matching the sequence in the list of authors:
 \altaffiltext{\IfA}{Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu HI 96822}
-% \altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
 \altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA}
+\altaffiltext{\DUR}{Department of Physics, Durham University, South Road, Durham DH1 3LE, UK}
+\altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
 % \altaffiltext{\USNO}{US Naval Observatory, Flagstaff Station, Flagstaff, AZ 86001, USA}
 % \altaffiltext{\JHU}{Department of Physics and Astronomy, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218, USA}
@@ -157,4 +146,14 @@
 described in detail in \cite{2012ApJ...750...99T}.
 
+{\color{red} {\em Note: These papers are being placed on arXiv.org to
+    provide crucial support information at the time of the public
+    release of Data Release 1 (DR1). We expect the arXiv versions to
+    be updated prior to submission to the Astrophysical Journal in
+    January 2017. Feedback and suggestions for additional information
+    from early users of the data products are welcome during the
+    submission and refereeing process.}}
+
+\section{Background}
+
 The photometric and astrometric precision goals for the Pan-STARRS\,1
 surveys were quite stringent: photmetric accuracy of 10
@@ -183,6 +182,4 @@
 astrometry.
 
-\subsection{Comparable Programs}
-
 A variety of astronomical software packages perform the basic object
 detection, measurement, and classification tasks needed by the
@@ -198,25 +195,22 @@
   pro: well-tested, stable code.  con: limited range of models,
   algorithm converges slowly to a PSF model, limited tests of PSF
-  validity, inflexible code base, fortran (P. Schechter)
+  validity, inflexible code base, fortran \citep{1993PASP..105.1342S}.
 
 \item DAOPhot : Pixel-map PSF model with analytical component.  pro:
   well-tested, high-quality photometry.  con: Difficult to use in an
-  automated fashion, does it handle 2D variations well? (P. Stetson)
+  automated fashion, does it handle 2D variations well? \citep{1987PASP...99..191S}.
 
 \item Sextractor : pure aperture measurement with rudimentary object
   subtraction.  pro: fast, widely used, easy to automate.  con: poor
   object separation in crowded regions, PSF-modeling was only in beta,
-  not widely used at the time. (E. Bertin)
-
-\item apphot : IRAF-based aperture photometry.  pro: widely used.
-  con: IRAF-based, aperture photometry. (???)
+  not widely used at the time \citep{sextractor}.
 
 \item galfit : detailed galaxy modeling.  not a multi-object PSF
   analysis tool.  con: does not provide a PSF model, not easily
   automated.  very detailed results in very slow processing.  only a
-  galaxy analysis program. (C. Impey)
+  galaxy analysis program \citep{2002AJ....124..266P}.
 
 \item SDSS phot : con: tightly integrated into the SDSS software
-  environment.  (R. Lupton)
+  environment \citep{2001ASPC..238..269L}.
 
 \end{itemize}
@@ -425,6 +419,6 @@
 subtracted might be useful for detection or even analysis of brighter
 sources.  Table~\ref{tab:mask_values} lists the 16 bit values used for
-PS1 mask images, along with their description (see \note{Waters et
-  al. paper} for additional information).
+PS1 mask images, along with their description \citep[see][for
+  additional information]{waters2017}.
 
 \begin{table*}
@@ -495,5 +489,5 @@
 which the values of \code{SKY} and \code{SKY_SIGMA} are calculated for
 each object in the output catalog.  See also the discussion in
-\note{Waters et al REF}.
+\cite{waters2017}.
 
 \subsection{Initial Object Detection}
@@ -580,6 +574,8 @@
 \begin{figure}[htbp]
   \begin{center}
-  \includegraphics[width=\hsize,angle=0,clip]{peaks.ps}
-  \caption{Illustration of peak finding and culling peaks within a
+%  \includegraphics[type=\plottype,ext=.\plotext,width=3.5in,height=2.5in,viewport=60 60 560 310]{peaks}
+% \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=1in,viewport=60 60 560 310,clip]{peaks}
+  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=0.5\hsize,viewport=60 60 560 310,clip]{peaks}
+  \caption{\label{fig:peaks} Illustration of peak finding and culling peaks within a
     footprint.  Insignificant peaks within the footprint of a brighter
     peak are ignored in further processing. }
@@ -608,18 +604,20 @@
 \code{FOOTPRINT_CULL_NSIGMA_DELTA} (4.0) sigmas below the peak of
 interest, the peak is considered to be {\em locally insignificant} and
-removed from the list of possible detections.  In the vicinity of a
-saturated star, the rule is somewhat more agressive as the flat-topped
-or structured saturated top of a bright star may appear as multiple
-peaks with highly significant cols between them.  However, this is an
-artifact of the proximity to saturation.  In this regime, we require
-the col to also be a fixed fraction (5\%) of the saturation below the
-peak to avoid being marked as locally insignificant.
+removed from the list of possible detections (see
+Figure~\ref{fig:peaks}).  In the vicinity of a saturated star, the
+rule is somewhat more agressive as the flat-topped or structured
+saturated top of a bright star may appear as multiple peaks with
+highly significant cols between them.  However, this is an artifact of
+the proximity to saturation.  In this regime, we require the col to
+also be a fixed fraction (5\%) of the saturation below the peak to
+avoid being marked as locally insignificant.
 
 \subsubsection{Centroid and higher-order Moments}
+\label{sec:moments}
 
 \begin{figure}[htbp]
   \begin{center}
-  \includegraphics[width=\hsize,angle=0,clip]{FWHM.smooth.trend.ps1.ps}
-  \caption{Example of the biases encountered when measuring the second
+  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=2.0\hsize,viewport=60 60 413 760]{FWHM.smooth.trend.ps1}
+  \caption{\label{fig:moments.window} Example of the biases encountered when measuring the second
     moments.  A simulated image was generated using the PS1 PSF
     profile.  Each panel corresponds to a different value of
@@ -656,5 +654,5 @@
 signal-to-noise of the object.  
 
-These effects are illustrated in Figure~\ref{fig:moment.window} using
+These effects are illustrated in Figure~\ref{fig:moments.window} using
 simulated data.  An image was generated with a PSF model matching the
 radial profile of the PS1 PSF model with a FWHM of 1.4 arcseconds.  As
@@ -736,15 +734,16 @@
 these moments. 
 
-The Kron radius is defined the be 2.5$\times$ the first radial moment.
-The Kron flux is the sum of (sky-subtracted) pixel fluxes within the
-Kron radius.  We also calculate the flux in two related annular
-apertures: the Kron inner flux is the sum of pixel values for the
-annulus $R_1 < r < 2.5 R_1$, while the Kron outer flux is the sum of
-pixel values for $2.5 R_1 < r < 4 R_1$.  The first radial moment is
-limited at the low and high ends by $R_{\rm min} < M_r < R_{\rm max}$
-where $R_{\rm min}$ is the first radial moment of the PSF stars, or
-0.75$\times$ \code{MOMENTS_GAUSS_SIGMA} if that cannot be
-determined.  $R_{\rm max}$ is set to \code{PSF_MOMENTS_RADIUS}, the
-size of the moments aperture.
+The Kron radius \citep{1980ApJS...43..305K} is defined the be
+2.5$\times$ the first radial moment.  The Kron flux is the sum of
+(sky-subtracted) pixel fluxes within the Kron radius.  We also
+calculate the flux in two related annular apertures: the Kron inner
+flux is the sum of pixel values for the annulus $R_1 < r < 2.5 R_1$,
+while the Kron outer flux is the sum of pixel values for $2.5 R_1 < r
+< 4 R_1$.  The first radial moment is limited at the low and high ends
+by $R_{\rm min} < M_r < R_{\rm max}$ where $R_{\rm min}$ is the first
+radial moment of the PSF stars, or 0.75$\times$
+\code{MOMENTS_GAUSS_SIGMA} if that cannot be determined.  $R_{\rm
+  max}$ is set to \code{PSF_MOMENTS_RADIUS}, the size of the moments
+aperture.
 
 \subsection{PSF Determination}
@@ -906,5 +905,5 @@
 \begin{figure}[htbp]
   \begin{center}
-  \includegraphics[width=\hsize,angle=0,clip]{moment.class.ps}
+  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=\hsize,viewport=60 60 560 560]{moment.class}
   \caption{\label{fig:moment.class} Illustration of PSF star selection using the FWHM derived
     from the second moments in $X_{\rm ccd}$ and $Y_{\rm ccd}$
@@ -919,8 +918,10 @@
 \subsubsection{PSF Candidate Object Model Fits}
 
+% \note{link to psLibADD}
+
 All candidate PSF objects are then fitted with the selected object
 model, allowing all of the parameters (PSF and independent) to vary in
 the fit.  PSPhot uses the Levenberg-Marquardt minimization technique
-\note{link to psLibADD} for the non-linear fitting.  Non-linear
+for the non-linear fitting.  Non-linear
 fitting can be very computationally intensive, particularly for if the
 starting parameters are far from the minimization values.  PSPhot uses
@@ -1012,14 +1013,14 @@
 \subsubsection{PSF Model applied to detected objects}
 
-\note{review the discussion below}
+% \note{review the discussion below}
 
 Once a PSF model has been selected for an image, PSPhot attempts to
 fit all of the detected objects, above a user-defined signal-to-noise
-ratio (\note{KEYWORD}) with the PSF model.  For these fits, the
-dependent parameters are fixed by the PSF model and only the 4
-independent object model parameters are allowed to vary in the fit.
-PSPhot again uses Levenberg-Marquardt minimization for the non-linear
-fitting.  The objects are fitted in their S/N order, starting with the
-brightest and working down to the user-specified limit.
+ratio with the PSF model.  For these fits, the dependent parameters
+are fixed by the PSF model and only the 4 independent object model
+parameters are allowed to vary in the fit.  PSPhot again uses
+Levenberg-Marquardt minimization for the non-linear fitting.  The
+objects are fitted in their S/N order, starting with the brightest and
+working down to the user-specified limit.
 
 Once a solution has been achieved for an object, PSPhot attempts to
@@ -1108,4 +1109,5 @@
 
 \subsubsection{Source Size Assessment}
+\label{sec:source.size}
 
 After the PSF model has been fitted to all sources, and the Kron flux
@@ -1294,10 +1296,14 @@
 \frac{y^2}{2\sigma_y^2} + \sigma_{\rm xy} x y $).  The Pseudo-Gaussian
 is a Taylor expansion of the Gaussian and is used by Dophot
-\citep{dophot}.  The latter profiles are similar to the Moffat profile
-form \citep{moffat,buonanno}, with small differences.  For the PS1
-GPC1 analysis, we used the \code{PS1_V1} model, which we found by
-experimentation to match well to the observed profiles generated by
-PS1.  Using a fixed power-law exponent results in somewhat faster
-profile fitting compared to the variable power-law exponent model.
+\citep{1993PASP..105.1342S}.  The latter profiles are similar to the
+Moffat profile form \citep{1969AA.....3..455M,1983AA...126..278B},
+with small differences.  For the PS1 GPC1 analysis, we used the
+\code{PS1_V1} model, which we found by experimentation to match well
+to the observed profiles generated by PS1.
+Figure~\ref{fig:radial.profiles} shows example radial profiles for
+moderately bright stars in fairly good (0.9 arcsec) and poor (2.2
+arcsec) seeing.  Using a fixed power-law exponent results in somewhat
+faster profile fitting compared to the variable power-law exponent
+model.
 
 % moffat : 1969A&A.....3..455M
@@ -1306,6 +1312,6 @@
 \begin{figure}[htbp]
   \begin{center}
-  \includegraphics[width=\hsize,angle=0,clip]{radial.profiles.ps}
-  \caption{Radial profiles of stellar images from PS1.  These two
+  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=\hsize,viewport=60 60 560 560]{radial.profiles}
+  \caption{\label{fig:radial.profiles} Radial profiles of stellar images from PS1.  These two
     profiles illustrate the radial trend of the PS1 PSFs for a star
     with FWHM 0.9 arcsec (red) and 2.2 arcsec (blue).  The black line
@@ -1372,15 +1378,15 @@
 \code{RMAX_NN}).
 
-\note{these profiles are not saved in PSPS}
+% \note{these profiles are not saved in PSPS}
 
 \subsection{Petrosian Radii and Magnitudes}
 
-Petrosian (REF) defined an adaptive aperture based on a ratio of
-surface brightnesses.  The motivation is to define an aperture which
-can be determined for galaxies without significant biases as a
-function of distance.  Since surface brightness in a resolved object
-is conserved, using a ratio of surface brightness to define a spatial
-scale results in a spatial scale which is constant regardless of
-galaxy distance.  
+\cite{1976ApJ...209L...1P} defined an adaptive aperture based on a
+ratio of surface brightnesses.  The motivation is to define an
+aperture which can be determined for galaxies without significant
+biases as a function of distance.  Since surface brightness in a
+resolved object is conserved, using a ratio of surface brightness to
+define a spatial scale results in a spatial scale which is constant
+regardless of galaxy distance.
 
 To measure the Petrosian radius and flux, we start by defining a
@@ -1428,30 +1434,30 @@
 median) flux in the annulus is within 1 $\sigma$ of the local sky
 level.  If this limit is not reached before the slope of the flux from
-one annulus to the next is less that \note{SOMETHING,
-  psphotRadialProfileWings.c}, then the annulus at which the slope
-reaches this limit is used to define the sky radius.  These values are
-saved in the output smf / cmf files, but not sent to the PSPS.  The
-sky radius value is used below in the calculation of the kron magnitude.
+one annulus to the next is less than a user-defined limit, then the
+annulus at which the slope reaches this limit is used to define the
+sky radius.  These values are saved in the output smf / cmf files, but
+not sent to the PSPS.  The sky radius value is used below in the
+calculation of the kron magnitude.
 
 \subsection{Kron Magnitudes}
 
-Preliminary Kron radius and flux values are calculated soon after
-sources are detected (\ref{sec:moments}).  However, these preliminary
-values are not accurate due to the window-functions applied.  After
-sources have been characterized and the PSF model is well-determined,
-the Kron parameters are re-calculated more carefully.  In this version
-of the calculation, the image is first smoothed by Gaussian kernel
-with $\sigma = 1.7$ pixels, corresponding to a FWHM of 1.0\arcsec in
-the PS1 stack images.  Next, the Kron radius is determined in an
-iterative process: the first radial moment is measured using the pixels in an
-aperture 6$\times$ the first radial moment from the previous
-iteration.  On the first iteration, the sky radius is used in place of
-the first radial moment.  By default, 2 iterations are performed.  The
-Kron radius is defined the be 2.5$\times$ the first radial moment.
-The Kron flux is the sum of pixel fluxes within the Kron radius.  We
-also calculate the flux in two related annular apertures: the Kron
-inner flux is the sum of pixel values for the annulus $R_1 < r < 2.5
-R_1$, while the Kron outer flux is the sum of pixel values for $2.5
-R_1 < r < 4 R_1$.  
+Preliminary Kron radius and flux values \citep{1980ApJS...43..305K}
+are calculated soon after sources are detected (Section~\ref{sec:moments}).
+However, these preliminary values are not accurate due to the
+window-functions applied.  After sources have been characterized and
+the PSF model is well-determined, the Kron parameters are
+re-calculated more carefully.  In this version of the calculation, the
+image is first smoothed by Gaussian kernel with $\sigma = 1.7$ pixels,
+corresponding to a FWHM of 1.0\arcsec\ in the PS1 stack images.  Next,
+the Kron radius is determined in an iterative process: the first
+radial moment is measured using the pixels in an aperture 6$\times$
+the first radial moment from the previous iteration.  On the first
+iteration, the sky radius is used in place of the first radial moment.
+By default, 2 iterations are performed.  The Kron radius is defined
+the be 2.5$\times$ the first radial moment.  The Kron flux is the sum
+of pixel fluxes within the Kron radius.  We also calculate the flux in
+two related annular apertures: the Kron inner flux is the sum of pixel
+values for the annulus $R_1 < r < 2.5 R_1$, while the Kron outer flux
+is the sum of pixel values for $2.5 R_1 < r < 4 R_1$.
 
 Two details in the calculation above should be noted.  First, for
@@ -1460,5 +1466,5 @@
 calculations.  The window used for the calculations is constrained to
 be at least the size of the aperture based on the PSF stars
-(\ref{sec:moments}).  At the other extreme, noise may make the radius
+(Section~\ref{sec:moments}).  At the other extreme, noise may make the radius
 grow excessively, resulting in an unrealistically low effective
 surface brightness.  The aperture is constrained to be less than a
@@ -1471,5 +1477,5 @@
 opposites sides of the central pixel are considered together.  The
 geometric mean of the two fluxes is used to replace the flux values.
-If the object has 180\degree symmetry, this operation has no impact.
+If the object has 180\degree\ symmetry, this operation has no impact.
 However, if one of the two pixels is unusually high, the value will be
 surpressed by the matched pixel on the other side.  This trick has the
@@ -1480,10 +1486,11 @@
 
 In the galaxy model fittting stage, sources which meet certain
-criteria are fitted with analytical models for galaxies.  The
-three models used for the PV3 analysis have similar form:
+criteria are fitted with analytical models for galaxies.  Three
+traditional analytical galaxy models are implemented in \code{psphot}
+and used in the PV3 analysis:
 \begin{itemize}
 \item Exponential profile : $f = I_0 e^{-\rho}$
-\item DeVaucouleur profile : $f = I_0 e^{-\rho^{1/4}}$
-\item Sersic : $f = I_0 e^{-\rho^{1/n}}$
+\item DeVaucouleur profile \citep{1948AnAp...11..247D}: $f = I_0 e^{-\rho^{1/4}}$
+\item Sersic \citep{1963BAAA....6...41S} : $f = I_0 e^{-\rho^{1/n}}$
 \end{itemize}
 where $\rho$ is a normalized radial term: $\rho =
@@ -1500,16 +1507,20 @@
 our best guess for the PSF model at the location of the galaxy.  For
 the PV3 analysis, all sources detected in the 'bright source' analysis
-step ($S/N > 20 ?$) were fitted with all three galaxy models, unless
-(a) the morphological test identified the source as a likely cosmic
-ray (\ref{CR}) or (b) the peak of the PSF profile was above the
-saturation limit for the chip \note{(link to the handling of
-  saturation in detrend paper)}.  Sources in the denser portions of
-the Galactic plane and bulge were not included in the analysis.  This
-restriction limited the total time spent on the galaxy modeling
-analysis at the expense of galaxy photometry in the plane (though Kron
-photometry is available for those objects).  The Galactic Plane region
-was defined by $|b| > b_{\rm min}$ where $b_{\rm min} = b_0 + r_b
-e^{\frac{-l^2}{2 \sigma_b^2}}$.  For the PV3 analysis, $b_0 = XX$,
-$r_b = XX$, $\sigma_b = XX$.
+step ($S/N > 20$) were fitted with all three galaxy models, unless (a)
+the morphological test identified the source as a likely cosmic ray
+(Section~\ref{sec:source.size}) or (b) the peak of the PSF profile was
+above the saturation limit for the chip \citep[see the discussion in
+][ regarding the masking of saturated pixels]{waters2017}.  Sources in
+the denser portions of the Galactic plane and bulge were not included
+in the analysis.  This restriction limited the total time spent on the
+galaxy modeling analysis at the expense of galaxy photometry in the
+plane (though Kron photometry is available for those objects).  The
+Galactic Plane region was defined by $|b| > b_{\rm min}$ where $b_{\rm
+  min} = b_0 + r_b e^{\frac{-l^2}{2 \sigma_b^2}}$.  For the PV3
+analysis, $b_0 = $20\degree, $r_b = $15\degree, $\sigma_b = $50\degree.
+
+%  \note{need a discussion of the detector saturation behavior
+
+% \note{more detail below?}  
 
 Before the non-linear fitting may be performed, it is necessary to
@@ -1521,5 +1532,5 @@
 ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values; it was found that such a guess
 tended to be too small and resulted in more iterations rather than
-fewer. \note{more detail on that?}  The 1st radial moment (see
+fewer. The 1st radial moment (see
 \ref{sec:moments}) is used to estimate the effective radius of the
 model based on the results of Graham \& Driver (2005, Table 1).  They
@@ -1606,5 +1617,7 @@
 For the small size of the PSF model used to convolve the galaxy model
 images, it was found that this direct convolution was faster than
-using an FFT-based convolution \note{(examples?)}
+using an FFT-based convolution.
+
+% \note{(examples?)}
 
 For the Exponential and DeVaucouleur fits, all parameters are fitted
@@ -1656,5 +1669,8 @@
 for all 5 filters.  In this analysis, the best model for each object
 is subtracted from the image pixels for all objects excluding the
-object in consideration.  The 'best model' is \note{TBD}.  
+object in consideration.  The 'best model' is determined based on the
+minimum $\chi^2$ value for the model fits.
+
+% \note{more discussion of the selection of the best model}.  
 
 In addition to the raw radial apertures, the stack images are each
@@ -1667,5 +1683,29 @@
 procedure is then repeated with a target FWHM of 8\arcsec.  
 
-\note{is the first convolution done with the Alard-Lupton technique?}
+% \note{is the first convolution done with the Alard-Lupton technique?}
+
+\acknowledgments
+
+The Pan-STARRS1 Surveys (PS1) have been made possible through
+contributions of the Institute for Astronomy, the University of
+Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its
+participating institutes, the Max Planck Institute for Astronomy,
+Heidelberg and the Max Planck Institute for Extraterrestrial Physics,
+Garching, The Johns Hopkins University, Durham University, the
+University of Edinburgh, Queen's University Belfast, the
+Harvard-Smithsonian Center for Astrophysics, the Las Cumbres
+Observatory Global Telescope Network Incorporated, the National
+Central University of Taiwan, the Space Telescope Science Institute,
+the National Aeronautics and Space Administration under Grant
+No. NNX08AR22G issued through the Planetary Science Division of the
+NASA Science Mission Directorate, the National Science Foundation
+under Grant No. AST-1238877, the University of Maryland, and Eotvos
+Lorand University (ELTE) and the Los Alamos National Laboratory.
+
+\bibliographystyle{apj}
+% \bibliography{lib}{}
+\input{analysis.bbl}
+
+\end{document}
 
 \subsection{Forced Photometry : PSFs}
@@ -1675,7 +1715,7 @@
 \subsection{Output Options}
 
-\note{need to discuss tests}
-
-\note{need to discuss failings and holes}
+% \note{need to discuss tests}
+
+% \note{need to discuss failings and holes}
 
 \section{Alternative Scenarios}
@@ -1759,9 +1799,4 @@
 \end{verbatim}
 
-\bibliographystyle{apj}
-\bibliography{lib}{}
-
-\end{document}
-
 Figures Needed for this document:
 
@@ -1791,14 +1826,2 @@
 * put engineering docs (psLib, psModules) on public website 
 
-% example of 2 image figure:
-\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 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 \gps{} filter with exposure times of 43s}
-\end{figure}
-
Index: /trunk/doc/release.2015/ps1.calibration/Makefile
===================================================================
--- /trunk/doc/release.2015/ps1.calibration/Makefile	(revision 39867)
+++ /trunk/doc/release.2015/ps1.calibration/Makefile	(revision 39868)
@@ -1,3 +1,6 @@
 # $Id: Makefile,v 1.16 2006-01-16 01:11:40 eugene Exp $
+
+DO_PDFLATEX = 0
+DO_BIBTEX = 1
 
 help:
@@ -5,15 +8,18 @@
 	@echo "  targets:  all calibration"
 
-all: calibration.pdf
-calibration: calibration.pdf
+all: pdf tgz 
+pdf: calibration.pdf
+tgz: calibration.tgz
 
-CALIBRATION = calibration.tex 
+FILES = \
+../inputs/astro.sty \
+../inputs/code.sty \
+../inputs/apj.bst \
+../inputs/lib.bib \
+calibration.tex \
+calibration.bbl
 
-#       pics/Metadata.ps 
-#       pics/earthrot.ps
-
-calibration.pdf: $(CALIBRATION)
-
-calibration.ps: $(CALIBRATION)
+calibration.pdf: $(FILES)
+calibration.tgz: $(FILES)
 
 include ../Makefile.Common
Index: /trunk/doc/release.2015/ps1.calibration/calibration.tex
===================================================================
--- /trunk/doc/release.2015/ps1.calibration/calibration.tex	(revision 39867)
+++ /trunk/doc/release.2015/ps1.calibration/calibration.tex	(revision 39868)
@@ -1,7 +1,7 @@
-% \documentclass[iop,floatfix]{emulateapj}
+\documentclass[iop,floatfix]{emulateapj}
 % \pdfoutput=1
 
 % see latex.readme.txt for notes on using the PS1 template
-\documentclass[12pt,preprint]{aastex}
+%\documentclass[12pt,preprint]{aastex}
 %\documentclass[manuscript]{aastex}
 %\documentclass[preprint2]{aastex}
@@ -32,24 +32,41 @@
 % list and (2) re-order the list at the bottom (and comment-out as needed)
 \def\IfA{1}
-\def\CfA{2}
-\def\MPIA{3}
-\def\Princeton{3}
-\def\USNO{4}
-\def\JHU{1}
+\def\LBL{2}
+\def\Hubble{3}
+\def\ITC{4}
+\def\Harvard{5}
+\def\MPIA{6}
+\def\ARI{7}
+\def\Princeton{8}
+\def\DUR{9}
+\def\CfA{10}
 
 % This example has a first author from UH:
 \author{
-Eugene A. Magnier,\altaffilmark{\IfA}
-IPP Team,
-%PS Builder List
+Eugene. A. Magnier,\altaffilmark{\IfA}
+Edward. F. Schlafly,\altaffilmark{\LBL,\Hubble}
+Douglas P. Finkbeiner,\altaffilmark{\ITC,\Harvard}
+J.~L. Tonry,\altaffilmark{\IfA}
+B. Goldman,\altaffilmark{\MPIA}
+S. R\"oser,\altaffilmark{\ARI}
+E. Schilbach,\altaffilmark{\ARI}
+K.~C. Chambers,\altaffilmark{\IfA} 
+H.~A. Flewelling,\altaffilmark{\IfA}
+M. E. Huber,\altaffilmark{\IfA}
+P.~A. Price,\altaffilmark{\Princeton}
+W.~E. Sweeney,\altaffilmark{\IfA}
+C. Z. Waters,\altaffilmark{\IfA}
+% PS1 Builders
+L. Denneau,\altaffilmark{\IfA}
+P. Draper,\altaffilmark{\DUR}
+K. W. Hodapp,\altaffilmark{\IfA}
+R. Jedicke,\altaffilmark{\IfA}
+R.-P. Kudritzki,\altaffilmark{\IfA}
+N. Metcalfe,\altaffilmark{\DUR}
+C.~W. Stubbs,\altaffilmark{\CfA}
 % W.~S. Burgett,\altaffilmark{\IfA}
-% K.~C. Chambers,\altaffilmark{\IfA} 
 % T. Grav,\altaffilmark{\IfA}
 % J. N. Heasley,\altaffilmark{\IfA}
-% K. W. Hodapp,\altaffilmark{\IfA}
-% R. Jedicke,\altaffilmark{\IfA}
-% H.~A. Flewelling,\altaffilmark{\IfA}
 % N. Kaiser,\altaffilmark{\IfA}
-% R.-P. Kudritzki,\altaffilmark{\IfA}
 % G. A. Luppino,\altaffilmark{\IfA}
 % R. H. Lupton,\altaffilmark{\Princeton}
@@ -57,37 +74,96 @@
 % J.~S. Morgan,\altaffilmark{\IfA}
 % P. M. Onaka,\altaffilmark{\IfA}
-% P.~A. Price,\altaffilmark{\Princeton}
-% W.~E. Sweeney,\altaffilmark{\IfA}
-% C.~W. Stubbs,\altaffilmark{\CfA}
-% J.~L. Tonry, \altaffilmark{\IfA}
-% R. J. Wainscoat,\altaffilmark{\IfA} and 
+R. J. Wainscoat\altaffilmark{\IfA}
 % M. F. Waterson,\altaffilmark{\IfA} 
 } % this bracket terminates author list
 
+\altaffiltext{\IfA}{Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu HI 96822}
+\altaffiltext{\LBL}{Lawrence Berkeley National Laboratory, One Cyclotron Road, Berkeley, CA 94720, USA}
+\altaffiltext{\Hubble}{Hubble Fellow}
+\altaffiltext{\ITC}{Institute for Theory and Computation, Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, MS-51, Cambridge, MA 02138 USA}
+\altaffiltext{\Harvard}{Department of Physics, Harvard University, Cambridge, MA 02138 USA}
+\altaffiltext{\MPIA}{Max Planck Institute for Astronomy, K\"onigstuhl 17, D-69117 Heidelberg, Germany}
+\altaffiltext{\ARI}{Astronomisches Rechen-Institut, Zentrum f\"ur Astronomie der Universit\"at Heidelberg, M\"ochhofstrasse 12-14, D-69120 Heidelberg, Germany}
+\altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA}
+\altaffiltext{\DUR}{Department of Physics, Durham University, South Road, Durham DH1 3LE, UK}
+\altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
+
 % The ordering here should be sequential, matching the sequence in the list of authors:
-\altaffiltext{\IfA}{Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu HI 96822}
-% \altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
-% \altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA}
 % \altaffiltext{\USNO}{US Naval Observatory, Flagstaff Station, Flagstaff, AZ 86001, USA}
 % \altaffiltext{\JHU}{Department of Physics and Astronomy, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218, USA}
-% \altaffiltext{\MPIA}{Max Planck Institute for Astronomy, K\"onigstuhl 17, D-69117 Heidelberg, Germany}
+
+% \altaffiltext{\Strassborg}{
+
 \begin{abstract}
 
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
-bibendum nisi id tristique posuere. Duis eu mollis nulla. Maecenas est
-turpis, mattis tempor urna vitae, placerat rhoncus sem. Lorem ipsum
-dolor sit amet, consectetur adipiscing elit. Sed quis velit
-nisl. Aliquam erat volutpat. Cras lacinia, nisl tristique auctor
-molestie, dolor nulla rhoncus purus, ac accumsan nunc nunc ac
-nibh. Maecenas vitae mollis mauris. Ut sollicitudin pulvinar purus,
-eget luctus lorem tincidunt vitae. Vestibulum eu mattis neque. Nulla
-in tortor id urna dapibus gravida a vel leo.
+The Pan-STARRS\,1 $3\pi$ survey has produced photometry and astrometry
+covering the \approx 30,000 square degrees $\delta > -30$\degrees.  
+This article describes the photometric and astrometric calibration of this survey.
 
 \end{abstract}
 
 % insert additional keywords as appropriate:
-%\keywords{Surveys:\PSONE }
+\keywords{Surveys:\PSONE }
 
 \section{Introduction}\label{sec:intro}
+
+This is the fifth in a series of seven papers describing the
+Pan-STARRS1 Surveys, the data reduction techiques and the resulting
+data products.  This paper (Paper V) describes the final calibration
+process, and the resulting photometric and astrometric quality.
+
+%Chambers et al. 2017 (Paper I)
+%The Pan-STARRS\,1 Surveys
+\citet[][Paper I]{chambers2017}
+provides an overview of the Pan-STARRS System, the design and
+execution of the Surveys, the resulting image and catalog data
+products, a discussion of the overall data quality and basic
+characteristics, and a brief summary of important results.
+
+%Magnier et al. 2017 (Paper II)
+%Pan-STARRS Data Processing Stages
+\citet[][Paper II]{magnier2017c}
+describes how the various data processing stages are organised and implemented
+in the Imaging Processing Pipeline (IPP), including details of the 
+the processing database which is a critical element in the IPP infrastructure . 
+
+%Waters et al. 2017 (Paper III) 
+%Pan-STARRS Pixel Processing : Detrending, Warping, Stacking
+\citet[][Paper III]{waters2017}
+describes the details of the pixel processing algorithms, including detrending, warping, and adding (to create stacked images) and subtracting (to create difference images) and resulting image products and their properties. 
+
+
+%Magnier et al. 2017 (Paper IV) 
+%Pan-STARRS Pixel Analysis : Source Detection 
+\citet[][Paper IV]{magnier2017a}
+describes the details of the source detection and photometry, including point-spread-function and extended source fitting models, and the techniques for ``forced" photometry measurements. 
+
+%Magnier et al. 2017 (Paper V) 
+%Pan-STARRS Photometric and Astrometric Calibration
+%\citet[][Paper V]{magnier2017b}
+%describes the final calibration process, and the resulting photometric and astrometric quality.  
+
+
+%Flewelling et al. 2017 (Paper VI)
+%Pan-STARRS 1 Database and Data Products
+\citet[][Paper VI]{flewelling2017}
+describes  the details of the resulting catalog data and its organization in the Pan-STARRS database. 
+%
+%
+\citet[][Paper VII]{huber2017}
+%Huber et al. 2017 (Paper VII)
+describes the Medium Deep Survey in detail, including the unique issues and data products specific to that survey. The Medium Deep Survey is not part of Data Release 1. (DR1) 
+
+%
+The Pan-STARRS1 filters and photometric system have already been
+described in detail in \cite{2012ApJ...750...99T}.
+
+{\color{red} {\em Note: These papers are being placed on arXiv.org to
+    provide crucial support information at the time of the public
+    release of Data Release 1 (DR1). We expect the arXiv versions to
+    be updated prior to submission to the Astrophysical Journal in
+    January 2017. Feedback and suggestions for additional information
+    from early users of the data products are welcome during the
+    submission and refereeing process.}}
 
 \section{Pan-STARRS\,1} 
@@ -103,17 +179,18 @@
 The wide-field \PSONE\ telescope consists of a 1.8~meter diameter
 $f$/4.4 primary mirror with an 0.9~m secondary, producing a 3.3 degree
-field of view \citep{PS1.optics}.  The optical design yields low
+field of view \citep{2004SPIE.5489..667H}.  The optical design yields low
 distortion and minimal vignetting even at the edges of the illuminated
 region.  The optics, in combination with the natural seeing, result in
-generally good image quality: 75\% of the images have full-width
-half-max values less than \note{(1.X, 1.X, 1.X, 1.X, 1.X), update}
-arcseconds for (\grizy), with a floor of $\sim 0.7$ \note{update}
-arcseconds.  The \PSONE\ camera \citep{PS1.GPCA} is a mosaic of 60
-edge-abutted $4800\times4800$ pixel back-illuminated \note{name} CCDs
-manufactured by Lincoln Laboratory.  The CCDs have 10~$\mu$m pixels
-subtending 0.258~arcsec and are \note{70um} thick.  The detectors are
-read out using a StarGrasp CCD controller, with a readout time of 7
-seconds for a full unbinned image \citep{PS1.GPCB}.  The active,
-usable pixels cover $\sim 80$\% of the FOV.
+generally good image quality: the median image quality for the 3$\pi$
+survey is FWHM = (1.31, 1.19, 1.11, 1.07, 1.02) arcseconds for
+(\grizy), with a floor of $\sim0.7$ arcseconds.  The \PSONE\ camera
+\citep{PS1.GPCA} is a mosaic of 60 edge-abutted $4800\times4800$ pixel
+back-illuminated CCID58 Orthogonal Transfer Arrays manufactured by
+Lincoln Laboratory \citep{2006amos.confE..47T,2008SPIE.7021E..05T}.
+The CCDs have 10~$\mu$m pixels subtending 0.258~arcsec and are
+70$\mu$m thick.  The detectors are read out using a StarGrasp CCD
+controller, with a readout time of 7 seconds for a full unbinned image
+\citep{2008SPIE.7014E..0DO}.  The active, usable pixels cover $\sim
+80$\% of the FOV.
 
 Nightly observations are conducted remotely from the Advanced
@@ -127,5 +204,5 @@
 
 Images obtained by \PSONE\ are automatically processed in real time by
-the \PSONE\ Image Processing Pipeline \citep[IPP,][]{PS1.IPP}.
+the \PSONE\ Image Processing Pipeline \citep[IPP,][]{magnier2017a}.
 Real-time analysis goals are aimed at feeding the discovery pipelines
 of the asteroid search and supernova search teams.  The data obtained
@@ -196,9 +273,12 @@
 \section{Astrometric Models} 
 
+% \note{include projection math?}  
+% \note{reference discussion somewhere on cell vs chip}
+
 Three somewhat distinct astrometric models are employed within the IPP
 at different stages.  The simplest model is defined independently for
 each chip: a simple TAN projection (Calabretta \& Griesen REF) is used
 to relate sky coordinates to a cartesian tangent-plane coordinate
-system.  \note{include projection math?}  A pair of low-order
+system.  A pair of low-order
 polynomials are used to relate the chip pixel coordinates to this
 tangent-plane coordinate system.  The transforming polynomials are of
@@ -209,11 +289,11 @@
 \end{eqnarray}
 where $P,Q$ are the tangent plane coordinates, $X_{\rm chip}, Y_{\rm
-  chip}$ are the coordinates on the 60 GPC1 chips (\note{see
-  discussion somewhere on cell vs chip}), and $C^P_{i,j}, C^Q_{i,j}$
+  chip}$ are the coordinates on the 60 GPC1 chips, and $C^P_{i,j}, C^Q_{i,j}$
 are the polynomial coefficients for each order.  In the \code{psastro}
 analysis, $i + j <= N_{\rm order}$ where the order of the fit, $N_{\rm
   order}$, may be 1 to 3, under the restriction that sufficient stars
-are needed to constraint the order \note{describe a bit better: this
-  is automatically selected based on the number of stars}.  
+are needed to constrain the order.  
+
+% \note{describe a bit better: this is automatically selected based on the number of stars}
 
 A second form of astrometry model which yields somewhat higher
@@ -234,7 +314,5 @@
 code restricts the exponents with the rule $i + j <= N_{\rm order}$
 where the order of the fit, $N_{\rm order}$, may be 1 to 3, under the
-restriction that sufficient stars are needed to constraint the order
-\note{describe a bit better: this is automatically selected based on
-  the number of stars}.
+restriction that sufficient stars are needed to constrain the order
 For each chip, a second set of polynomials describes the
 transformation from the chip coordinate systems to the focal
@@ -270,20 +348,23 @@
   Q & = & \sum_{i,j} C^Q_{i,j} (X_{\rm chip} - X_0)^i (Y_{\rm chip} - Y_0)^j 
 \end{eqnarray}
-\note{need to complete this discussion of the WCS keywords, both
-  standard and non-standard, used to represent these polynomial
-  transformations}
-
-\begin{verbatim}
-Here is a table of the keywords and the related terms from Eqns above:
-CTYPE1,2 : RA---WRP, DEC--WRP & RA---DIS, DEC--DIS
-CRVAL1,2 : C^{L,M}_{0,0}
-CRPIX1,2 : X_0, Y_0
-PC001001 : C^{L}_{1,0}
-PC001002 : C^{L}_{0,1}
-PC002001 : C^{M}_{1,0}
-PC002002 : C^{M}_{0,1}
-PCA1XiYj : C^{L}_{i,j}
-PCA2XiYj : C^{M}_{i,j}
-\end{verbatim}
+
+%% \note{need to complete this discussion of the WCS keywords, both
+%%   standard and non-standard, used to represent these polynomial
+%%   transformations}
+
+%% \begin{verbatim}
+%% Here is a list of the keywords 
+%% and the related terms from Eqns above:
+%% CTYPE1,2 : RA---WRP, DEC--WRP
+%% CTYPE1,2 : RA---DIS, DEC--DIS
+%% CRVAL1,2 : C^{L,M}_{0,0}
+%% CRPIX1,2 : X_0, Y_0
+%% PC001001 : C^{L}_{1,0}
+%% PC001002 : C^{L}_{0,1}
+%% PC002001 : C^{M}_{1,0}
+%% PC002002 : C^{M}_{0,1}
+%% PCA1XiYj : C^{L}_{i,j}
+%% PCA2XiYj : C^{M}_{i,j}
+%% \end{verbatim}
 
 \section{Real-time Calibration}
@@ -318,5 +399,7 @@
 reference catalog generated from internal re-calibration of the PV0
 analysis of PS1 photometry and astrometry was used for the reference
-catalog.  \note{discuss history of the different refcats?}  
+catalog.  
+
+% \note{discuss history of the different refcats?}  
 
 Coordinates and calibrated magnitudes of stars from the reference
@@ -326,5 +409,5 @@
 position angle reported by the header.  Reference stars are selected
 from the full field of view of the GPC1 camera, padded by an
-additional \note{25\%} to ensure a match can be determined even in the
+additional 25\% to ensure a match can be determined even in the
 presence of substantial errors in the boresite coordinates.  It is
 important to choose an appropriate set of reference stars: if too few
@@ -366,5 +449,5 @@
 \end{eqnarray}
 are generated.  The collection of $\Delta X, \Delta Y$ values are
-collected in a 2D histogram with sampling of \note{XXX} pixels and the
+collected in a 2D histogram with sampling of 50 pixels and the
 peak pixel is identified.  If the astrometry guess were perfect, this
 peak pixel would be expected to lie at (0,0) and contain all of the
@@ -391,6 +474,5 @@
 astrometry guess for the chip.
 
-\note{option to downweight based on photometric inconsistency : not
-  used in PS1 analysis}
+%% \note{option to downweight based on photometric inconsistency : not used in PS1 analysis}
 
 \subsection{Chip Polynomial Fits}
@@ -435,36 +517,41 @@
 desired for the distortion fit.  The coefficients of the gradient fit
 are then used to determine the coefficients for the polynomials
-representing the distortion.  \note{write out the math of the gradients}
+representing the distortion.  
+
+%% \note{write out the math of the gradients}
 
 Once the common distortion coming from the optics and atmosphere have
 been modeled, \code{psastro} determines polynomial transformations
 from the 60 chips to the focal plane coordinate system.  In this
-stage, \note{NN} iterations of the chip fits are performed.  Before
-each iteration, the reference stars and detected objects are matched
-using the current best set of transformations.  These fits start with
-low order (1) and large matching radius (\note{XX}).  As the
-iterations proceed, the radius is reduced and the order is allowed to
-increaes, up to 3rd order for the final iterations.  \note{quality of
-  the fits as a result of this stage}.
+stage, 5 iterations of the chip fits are performed.  Before each
+iteration, the reference stars and detected objects are matched using
+the current best set of transformations.  These fits start with low
+order (1) and large matching radius.  As the iterations proceed, the
+radius is reduced and the order is allowed to increaes, up to 3rd
+order for the final iterations.  
+
+%% \note{quality of the fits as a result of this stage}.
 
 \subsection{Real-time Photometric Calibration}
+
+%% \note{define / describe the robust median}
 
 After the astrometric calibration has finished, the photometric
 calibration is performed by \code{psastro}.  When the reference stars
 are loaded, the apparent magnitude in the filter of interest is also
-loaded.   Stars for which the reference magnitude is brighter than
+loaded.  Stars for which the reference magnitude is brighter than
 (\grizy) = (19, 19, 18.5, 18.5, 17.5) are used to determine the zero
 points by comparison with the instrumental magnitudes.  For the PV3
-analysis, the robust median \note{defined where?} is used to measure
-the zero point. For early versions of the analysis, when the reference
-catalog used synthetic magnitudes, it was necessary to search for the
-blue edge of the distribution: the synthetic magnitude poorly 
-predicted the magnitudes of stars in the presence of significant
-extinction or for the very red stars, making the blue edge somewhat
-more reliable.  Note that we do not include an airmass correction in
-this zero point analysis: the airmass correction is folded into the
-observed zero point.  The zero point may be measured separately for
-each chip or as a single value for the entire exposure; the latter
-option was used for the PV3 analysis.
+analysis, an outlier-rejecting median is used to measure the zero
+point. For early versions of the analysis, when the reference catalog
+used synthetic magnitudes, it was necessary to search for the blue
+edge of the distribution: the synthetic magnitude poorly predicted the
+magnitudes of stars in the presence of significant extinction or for
+the very red stars, making the blue edge somewhat more reliable.  Note
+that we do not include an airmass correction in this zero point
+analysis: the airmass correction is folded into the observed zero
+point.  The zero point may be measured separately for each chip or as
+a single value for the entire exposure; the latter option was used for
+the PV3 analysis.
 
 \subsection{Real-time outputs}
@@ -483,7 +570,6 @@
 chip-level keywords (e.g., \code{DATE-OBS}).  The astrometric
 transformation information for each chip is saved in the corresponding
-header using standard (and some non-standard) WCS keywords.
-\note{combine this discussion with the above?}.  For the two-level
-astrometric model, the PHU header carries the astrometric
+header using standard (and some non-standard) WCS keywords.  For the
+two-level astrometric model, the PHU header carries the astrometric
 transformation related to the projection and the camera-wide
 distortions.  Photometric calibrations are written as a set of
@@ -507,8 +593,8 @@
 \subsection{Ubercal Analysis}
 
-\note{clean up and re-word the pieces below}
+% \note{clean up and re-word the pieces below}
 
 The photometric calibration of the DVO database starts with the
-``ubercal'' analysis technique as described by \cite{PS1.ubercal}.
+``ubercal'' analysis technique as described by \cite{2012ApJ...756..158S}.
 This analysis is performed by the group at Harvard, loading data from
 the \code{smf} files into their instance of the Large Scale Database
@@ -517,15 +603,15 @@
 
 Photometric nights are selected and all other exposures are ignored.
-Each night \note{shorter time?} is allowed to have a single fitted
-zero point and a single fitted value for the airmass extinction
-coefficient per filter.  The zero points and extinction terms are
-determined as a least squares minimization process using the repeated
-measurements of the same stars from different nights to tie nights
-together.  Flat-field corrections are also determined as part of the
-minimization process.  In the original (PV1) ubercal analysis,
-\cite{PS1.ubercal} determined flat-field corrections for $2\times 2$
-sub-regions of each chip in the camera and four distinct time periods
-(``seasons'').  Later analysis (PV2) used an $8\times8$ grid of
-flat-field corrections to good effect.
+Each night is allowed to have a single fitted zero point and a single
+fitted value for the airmass extinction coefficient per filter.  The
+zero points and extinction terms are determined as a least squares
+minimization process using the repeated measurements of the same stars
+from different nights to tie nights together.  Flat-field corrections
+are also determined as part of the minimization process.  In the
+original (PV1) ubercal analysis, \cite{2012ApJ...756..158S} determined
+flat-field corrections for $2\times 2$ sub-regions of each chip in the
+camera and four distinct time periods (``seasons'').  Later analysis
+(PV2) used an $8\times8$ grid of flat-field corrections to good
+effect.
 
 The ubercal analysis was re-run for PV3 by the Harvard group.  For the
@@ -536,5 +622,7 @@
 was also included for PV3.  In retrospect, as we show below, the data
 from the latter part of the survey would probably benefit from
-additional flat-field seasons.  \note{something for PV4}.
+additional flat-field seasons. 
+
+%% \note{something for PV4}.
 
 By excluding non-photometric data and only fitting 2 parameters for
@@ -545,23 +633,27 @@
 every night, helping to tie down overall variations of the system
 throughput and acting as internal standard star fields.  The resulting
-photometric system is shown by \cite{PS1.ubercal} to have reliability
+photometric system is shown by \cite{2012ApJ...756..158S} to have reliability
 across the survey region at the level of (8.0, 7.0, 9.0, 10.7, 12.4)
 millimags in (\grizy).  As we discuss below, this conclusion is
-reinforced by our external comparison.  \note{do I have a measurement
-  of the bright end stability in PV3?  basically, what is the scatter
-  per star as a function of position in the camera and magnitude?}
+reinforced by our external comparison.  
+
+%% \note{do I have a measurement
+%% of the bright end stability in PV3?  basically, what is the scatter
+%% per star as a function of position in the camera and magnitude?}
 
 The overall zero point for each filter is not naturally determined by
 the Ubercal analysis; an external constraint on the overall
-photometric system is required for each filter.  \cite{PS1.ubercal}
-used photometry of the MD09 Medium Deep field to match the photometry
-measured by \cite{JTphoto} on the reference photometric night of MJD
-55744 (UT 02 July 2011).  \note{Scolnic et al REF} have re-examined
-the photometry of Calspec standards as observed by PS1.  They reject 2
-of the \note{XX} stars used by \cite{JTphoto} and add photometry of
-\note{XX} additional stars.  The calspec spectrophotometry values have
-also been re-examined by XX; using these new measurements, Scolnic et
-al determine new zero points for the PS1 system, which we have applied
-(see below).
+photometric system is required for each filter.
+\cite{2012ApJ...756..158S} used photometry of the MD09 Medium Deep
+field to match the photometry measured by \cite{2012ApJ...750...99T}
+on the reference photometric night of MJD 55744 (UT 02 July 2011).
+\cite{2015ApJ...815..117S} have re-examined the photometry of Calspec
+standards as observed by PS1.  They reject 2 of the 5 stars used by
+\cite{2012ApJ...750...99T} and add photometry of 2 additional stars.
+
+%% \note{The calspec spectrophotometry values have also been re-examined
+%%   by REF; using these new measurements, \cite{2015ApJ...815..117S}
+%%   determine new zero points for the PS1 system, which we have applied
+%%   (see below).}
 
 \subsection{Applying the Ubercal Zero Points : Setphot}
@@ -585,19 +677,19 @@
 each filter representing respectively the nominal zero point and the
 slope of the trend with respect to the airmass ($\zeta$) for each
-filter.  \note{the image zero point does not incorporate the airmass,
-  only the measurement zero point}.  These static values are listed in
-Table~\ref{tab:zpts}.  When \code{setphot} was run, these static zero
-points have been adjusted by the calspec offsets listed in
-Table~\ref{tab:zpts} based on the analysis of CALSPEC standards by
-Scolnic et al REF.  These offsets bring the photometric system defined
-by the ubercal analysis into alignment with the Scolnic analysis of
-the PS1 observations of XXX calspec standard stars.  The value
-$M_{cal}$ is the offset needed by each exposure to match the ubercal
-value, or to bring the non-ubercal exposures into agreement with the
-rest of the exposures, as discussed below.  The flat-field information
-is encoded in a table of flat-field offsets as a function of time,
-filter, and camera position.  Each image which is part of the ubercal
-subset is marked with a bit in the field \code{Image.flags}:
-\code{ID_IMAGE_PHOTOM_UBERCAL = 0x00000200}
+filter.  These static values are listed in Table~\ref{tab:zpts}.  When
+\code{setphot} was run, these static zero points have been adjusted by
+the calspec offsets listed in Table~\ref{tab:zpts} based on the
+analysis of CALSPEC standards by Scolnic et al REF.  These offsets
+bring the photometric system defined by the ubercal analysis into
+alignment with the Scolnic analysis of the PS1 observations of XXX
+calspec standard stars.  The value $M_{cal}$ is the offset needed by
+each exposure to match the ubercal value, or to bring the non-ubercal
+exposures into agreement with the rest of the exposures, as discussed
+below.  The flat-field information is encoded in a table of flat-field
+offsets as a function of time, filter, and camera position.  Each
+image which is part of the ubercal subset is marked with a bit in the
+field \code{Image.flags}: \code{ID_IMAGE_PHOTOM_UBERCAL = 0x00000200}
+
+%% \note{give airmass formula for completeness?}.
 
 When \code{setphot} applies the ubercal information to the image
@@ -611,11 +703,10 @@
 with the airmass for the measurement, calculated using the altitude of
 the individual detection as determined from the Right Ascension,
-Declination, the observatory latitude, and the sidereal time.
-\note{give formula for completeness?}.  For a camera with the field of
-view of the PS1 GPC1, the airmass may vary significantly within the
-field of view, especially at low elevations.  In the worst cases, at
-the celestial pole, the airmass range within a single exposure is XXX
-- XXX.  The complete calibrated (`relative') magnitude is determined
-from the stored database values as:
+Declination, the observatory latitude, and the sidereal time.  For a
+camera with the field of view of the PS1 GPC1, the airmass may vary
+significantly within the field of view, especially at low elevations.
+In the worst cases, at the celestial pole, the airmass range within a
+single exposure is XXX - XXX.  The complete calibrated (`relative')
+magnitude is determined from the stored database values as:
 \[
 M_{\rm rel} = M_{\rm inst} - 25.0 + zp_{\rm ref} + M_{\rm cal} + M_{\rm flat} + K_\lambda (sec \zeta - 1).
@@ -643,7 +734,8 @@
 \subsection{Relphot Analysis}
 
+%% \note{how many exposures are not in ubercal?}
+
 Relative photometry is used to determine the zero points of the
-exposures which were not included in the ubercal analysis \note{how
-  many?}.  The relative photometry analysis has been desribed in the
+exposures which were not included in the ubercal analysis.  The relative photometry analysis has been desribed in the
 past in Magnier et al 2013 REF.  We review that analysis here, along
 with specific updates for PV3.  
@@ -660,9 +752,11 @@
 \[ M_{ave} = \frac{\sum_i M_{rel,i} w_i}{\sum_i w_i} \]
 We find that the color difference of the different chips can be
-ignored \note{level of this effect?}, and set the value of $A$ to 0.0.
+ignored, and set the value of $A$ to 0.0.
 Note that we only use a single mean airmass extinction term for all
 exposures -- the difference between the mean and the specific value
 for a given night is taken up as an additional element of the
 atmospheric attenuation.
+
+%% \note{color-color terms between chips?}
 
 We write a global $\chi^2$ equation which we attempt to minimize by
@@ -681,10 +775,9 @@
 Only brighter, high quality measurements are used in the relative
 photometry analysis of the exposure zero points.  We use only the
-brighter objects \note{mag limit}, limiting the density to a maximum
-of \note{actual max density?} 2500 or 3000 objects per square degree
-(lower in areas where we have more observations).  When limiting the
-density, we prefer objects which are brighter (but not saturated), and
-those with the most measurements (to ensure better coverage over the
-available images).
+brighter objects, limiting the density to a maximum of 4000 objects
+per square degree (lower in areas where we have more observations).
+When limiting the density, we prefer objects which are brighter (but
+not saturated), and those with the most measurements (to ensure better
+coverage over the available images).
 
 There are a few classes of outliers which we need to be careful to
@@ -694,10 +787,11 @@
 We attempt to exclude these poor measurements in advance by rejecting
 measurements which the photometric analysis has flagged the result as
-suspcious.  \note{bad and poor psphot bits?}  We reject detections
-which are excessively masked ({\tt PSF\_QF} $<$ 0.85, see Magnier et
-al PSPHOT REF); these include detections which are too close to other
-bright objects, diffraction spikes, ghost images, or the detector
-edges.  However, these rejections do not catch all cases of bad
-measurements.  
+suspcious.  We reject detections which are excessively masked; these include
+detections which are too close to other bright objects, diffraction
+spikes, ghost images, or the detector edges.  However, these
+rejections do not catch all cases of bad measurements.
+
+%% \citep[\code{PSF_QF} $< 0.85$, see][]{magnier2017b}; 
+%% \note{refer to the PSPHOT bad and poor psphot bits?}  
 
 After the initial iterations, we also perform outlier rejections based
@@ -713,7 +807,8 @@
 with reduced $\chi^2$ values more than 20.0, or more than 2$\times$
 the median, whichever is larger.  We also exclude stars with standard
-deviation (of the measurements used for the mean) greater than
-\note{is this true?} 0.005 mags or 2$\times$ the median standard
-deviation, whichever is greater.  
+deviation (of the measurements used for the mean) greater than 0.005
+mags or 2$\times$ the median standard deviation, whichever is greater.
+
+%% \note{is this true?} 
 
 Similarly for images, we exclude those with more than 2 magnitudes of
@@ -734,6 +829,7 @@
 calculation of the formal error on the mean magnitudes propagates this
 additional weight, so that the errors on the Ubercal observations
-dominates where they are present. \note{do we drop this when
-  calculating the final mean mags?}
+dominates where they are present. 
+
+% \note{do we drop this when calculating the final mean mags?}
 % \note{do I need to present the math?}
 \[ \mu = \frac{\sum m_i w_i \sigma_i^{-2}}{\sum w_i \sigma_i^{-2}} \]
@@ -802,5 +898,5 @@
 analysis.
 
-\note{need to discuss the process of setting the final mean magnitudes}
+%% \note{need to discuss the process of setting the final mean magnitudes}
 
 For PV3, the relphot analysis was performed two times.  The first
@@ -812,10 +908,11 @@
 data in DVO after the initial relphot calibration to measure the
 flat-field residual with much finer resolution: 124 x 124 flat-field
-values for each GPC1 chip (40x40 pixels per point).  \note{show the
-  flat-field residual images, discuss the features?}.  We then used
+values for each GPC1 chip (40x40 pixels per point).  We then used
 \code{setphot} to apply this new flat-field correction, as well as the
 ubercal flat-field corrections, to the data in the database.  At this
 point, we re-ran the entire relphot analysis to determine zero points
 and to set the average magnitudes.
+
+%% \note{show the flat-field residual images, discuss the features?}.  
 
 For stacks and warps, the image calibrations were determined after the
@@ -831,5 +928,7 @@
 appropriate for a given warp.  This latter effect is one of several
 which degrade the warp photometry compared to the chip photometry at
-the bright end.  \note{recommendation}
+the bright end.  
+
+%% \note{recommendation}
 
 \subsection{Calculation of Object Photometry}
@@ -859,6 +958,5 @@
 the master DVO database.
 
-\note{need to describe the assignment of flags, etc, for the external
-  data sources}.
+%% \note{need to describe the assignment of flags, etc, for the external data sources}.
 
 \section{Astrometry Analysis}
@@ -915,10 +1013,11 @@
 contaminated by the effect.  
 
+% \note{was there is significant difference using a surface brightness version?}  
+
 We measured the Koppenh\"offer Effect by accumulating the residual
-astrometry statistics for \note{how many} stars.  For each chip, we
+astrometry statistics for stars in the database.  For each chip, we
 measured the mean X and Y displacements of the astrometric residuals
 as function of the instrumental magnitude of the star divided by the
-FWHM$^2$.  \note{was there is significant difference using a surface
-  brightness version?}  We measured the trend for all chips in a
+FWHM$^2$.  We measured the trend for all chips in a
 number of different time ranges and found the effect to be quite
 stable, in the period where it was present.  The effect only appeared
@@ -964,8 +1063,8 @@
 DCR trend for the 5 filters \grizy, as well as the measured
 displacement in the direction perpendicular to the parallactic angle.
-We represent the trend with a spline fitted to this dataset.  The DCR
-trend has an amplitude of \note{XXX - XXX} in the five filters.  
-
-\note{write down the DCR formalae for reference}.
+We represent the trend with a spline fitted to this dataset.  
+
+%% The DCR trend has an amplitude of \note{XXX - XXX} in the five filters.  
+%% \note{write down the DCR formalae for reference}.
 
 \subsubsection{Astrometric Flat-field}
@@ -1017,5 +1116,6 @@
 similar to the ``tree rings'' reported by the DES team and others
 (G. Berstein REF \& REFS).  We explore these tree rings in detail in
-\note{SECTION or REF?}.
+
+% \note{SECTION or REF?}.
 
 After the initial analysis to measure the KE corrections, DCR
@@ -1091,11 +1191,11 @@
 performed SED fitting for 800M stars in the 3$\pi$ region using PV2
 data.  The goal of this work was to determine the 3D structure of the
-dust in the galaxy.  By fitting model SEDs to \note{all?} stars
-meeting a basic data quality cut \note{(describe)}, they determined
-the best spectral type, and thus $T_{\rm eff}$, absolute $r$-band
-magnitude, distance modulus, and extinction $A_V$ (the desired output
-and used to determine the dust extinction as a function of distance
-throughout the galaxy).  We use the distance modulus determined in
-this analysis to predict the proper motions.  
+dust in the galaxy.  By fitting model SEDs to stars meeting a basic
+data quality cut, they determined the best spectral type, and thus
+$T_{\rm eff}$, absolute $r$-band magnitude, distance modulus, and
+extinction $A_V$ (the desired output and used to determine the dust
+extinction as a function of distance throughout the galaxy).  We use
+the distance modulus determined in this analysis to predict the proper
+motions.
 
 To convert the distances to proper motions, we use the Galactic
@@ -1112,5 +1212,6 @@
 \end{eqnarray}
 where $d$ is the distance and $l,b$ are the Galactic coordintes of the
-star. \note{some reference?}  Note that the proper motion induced by
+star. Note that the proper motion induced by
+%% \note{some reference for this?}  
 the Galactic rotation is independent of distance while the reflex
 motion induced by the solar motion decreases with increasing
@@ -1126,5 +1227,5 @@
 value of 500pc.  
 
-\note{plots to show how well this worked for PV3 pre Gaia}
+%% \note{plots to show how well this worked for PV3 pre Gaia}
 
 \subsection{Gaia Constraint}
@@ -1136,8 +1237,8 @@
 motion and parallax solutions are in general saturated in the PS1
 observations.  Thus, we are limited to using the Gaia mean positions
-reported for the fainter stars.  We extracted all Gaia sources
-\note{not marked as a duplicate} from \note{where?} and generated a
-DVO database from this dataset.  We then merged the Gaia DVO into the
-PV3 master DVO database.  We re-ran the complete relative astrometry
+reported for the fainter stars.  We extracted all Gaia sources not
+marked as a duplicate from the Gaia archive and generated a DVO
+database from this dataset.  We then merged the Gaia DVO into the PV3
+master DVO database.  We re-ran the complete relative astrometry
 analysis using Gaia as an additional measurement.  We applied the
 analysis described above, applying the estimated distances to
@@ -1154,5 +1255,5 @@
 even at a lower weight, helps to tile over those gaps.
 
-\note{Figures showing the Gaia residuals}
+%% \note{Figures showing the Gaia residuals}
 
 \subsection{Calculation of Object Astrometry}
@@ -1165,4 +1266,28 @@
 
 \section{Conclusion}
+
+\acknowledgments
+
+The Pan-STARRS1 Surveys (PS1) have been made possible through
+contributions of the Institute for Astronomy, the University of
+Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its
+participating institutes, the Max Planck Institute for Astronomy,
+Heidelberg and the Max Planck Institute for Extraterrestrial Physics,
+Garching, The Johns Hopkins University, Durham University, the
+University of Edinburgh, Queen's University Belfast, the
+Harvard-Smithsonian Center for Astrophysics, the Las Cumbres
+Observatory Global Telescope Network Incorporated, the National
+Central University of Taiwan, the Space Telescope Science Institute,
+the National Aeronautics and Space Administration under Grant
+No. NNX08AR22G issued through the Planetary Science Division of the
+NASA Science Mission Directorate, the National Science Foundation
+under Grant No. AST-1238877, the University of Maryland, and Eotvos
+Lorand University (ELTE) and the Los Alamos National Laboratory.
+
+\bibliographystyle{apj}
+%\bibliography{lib}{}
+\input{calibration.bbl}
+
+\end{document}
 
 \begin{verbatim}
@@ -1184,3 +1309,2 @@
 \end{verbatim}
 
-\end{document}
Index: /trunk/doc/release.2015/ps1.datasystem/Makefile
===================================================================
--- /trunk/doc/release.2015/ps1.datasystem/Makefile	(revision 39867)
+++ /trunk/doc/release.2015/ps1.datasystem/Makefile	(revision 39868)
@@ -1,19 +1,25 @@
 # $Id: Makefile,v 1.16 2006-01-16 01:11:40 eugene Exp $
+
+DO_PDFLATEX = 1
+DO_BIBTEX = 1
 
 help:
 	@echo "USAGE: make (target)"
-	@echo "  targets:  all datasystem"
+	@echo "  targets:  all tgz pdf"
 
-all: datasystem.pdf
-datasystem: datasystem.pdf
+all: pdf tgz
+tgz: datasystem.tgz
+pdf: datasystem.pdf
 
-DATASYSTEM = datasystem.tex 
+FILES = \
+../inputs/astro.sty \
+../inputs/code.sty \
+../inputs/apj.bst \
+../inputs/lib.bib \
+datasystem.tex \
+datasystem.bbl 
 
-#       pics/Metadata.ps 
-#       pics/earthrot.ps
-
-datasystem.pdf: $(DATASYSTEM)
-
-datasystem.ps: $(DATASYSTEM)
+datasystem.pdf: $(FILES)
+datasystem.tgz: $(FILES)
 
 include ../Makefile.Common
Index: /trunk/doc/release.2015/ps1.datasystem/datasystem.tex
===================================================================
--- /trunk/doc/release.2015/ps1.datasystem/datasystem.tex	(revision 39867)
+++ /trunk/doc/release.2015/ps1.datasystem/datasystem.tex	(revision 39868)
@@ -1,5 +1,5 @@
-% \documentclass[iop,floatfix]{emulateapj}
+\documentclass[iop,floatfix]{emulateapj}
 % \documentclass[iop,floatfix,onecolumn]{emulateapj}
-\documentclass[12pt,preprint]{aastex}
+% \documentclass[12pt,preprint]{aastex}
 % \pdfoutput=1
 
@@ -29,45 +29,46 @@
 % list and (2) re-order the list at the bottom (and comment-out as needed)
 \def\IfA{1}
-\def\CfA{2}
-\def\MPIA{3}
+\def\LSST{2}
 \def\Princeton{3}
-\def\USNO{4}
-\def\JHU{1}
+\def\DUR{4}
+\def\CfA{5}
 
 % This example has a first author from UH:
 \author{
 Eugene A. Magnier,\altaffilmark{\IfA}
-IPP Team,
+K.~C. Chambers,\altaffilmark{\IfA} 
+H.~A. Flewelling,\altaffilmark{\IfA}
+J.~C. Hoblitt,\altaffilmark{\LSST}
+M. E. Huber,\altaffilmark{\IfA}
+% R. H. Lupton,\altaffilmark{\Princeton}
+P.~A. Price,\altaffilmark{\Princeton}
+W.~E. Sweeney,\altaffilmark{\IfA}
+C. Z. Waters,\altaffilmark{\IfA}
 %PS Builder List
+L. Denneau,\altaffilmark{\IfA}
+P. Draper,\altaffilmark{\DUR}
+K. W. Hodapp,\altaffilmark{\IfA}
+R. Jedicke,\altaffilmark{\IfA}
+R.-P. Kudritzki,\altaffilmark{\IfA}
+N. Metcalfe,\altaffilmark{\DUR}
+C.~W. Stubbs,\altaffilmark{\CfA}
 % W.~S. Burgett,\altaffilmark{\IfA}
-% K.~C. Chambers,\altaffilmark{\IfA} 
-% L. Denneau,\altaffilmark{\IfA}
-% P. Draper,\altaffilmark{\DUR}
-% H.~A. Flewelling,\altaffilmark{\IfA}
 % T. Grav,\altaffilmark{\IfA}
 % J. N. Heasley,\altaffilmark{\IfA}
-% K. W. Hodapp,\altaffilmark{\IfA}
-% M. E. Huber,\altaffilmark{\IfA}
-% R. Jedicke,\altaffilmark{\IfA}
 % N. Kaiser,\altaffilmark{\IfA}
-% R.-P. Kudritzki,\altaffilmark{\IfA}
 % G. A. Luppino,\altaffilmark{\IfA}
-% R. H. Lupton,\altaffilmark{\Princeton}
-% E. A. Magnier,\altaffilmark{\IfA}
-% N. Metcalfe,\altaffilmark{\DUH}
 % D. G. Monet,\altaffilmark{\USNO}
 % J.~S. Morgan,\altaffilmark{\IfA}
 % P. M. Onaka,\altaffilmark{\IfA}
-% P.~A. Price,\altaffilmark{\Princeton}
-% C.~W. Stubbs,\altaffilmark{\CfA}
-% W.~E. Sweeney,\altaffilmark{\IfA}
 % J.~L. Tonry, \altaffilmark{\IfA}
-% R. J. Wainscoat,\altaffilmark{\IfA} and 
-% C. Z. Waters,\altaffilmark{\IfA}
+R. J. Wainscoat\altaffilmark{\IfA}
 } % this bracket terminates author list
 
 % The ordering here should be sequential, matching the sequence in the list of authors:
 \altaffiltext{\IfA}{Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu HI 96822}
-% \altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
+\altaffiltext{\LSST}{LSST Project Management Office, Tucson, AZ, U.S.A}
+\altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA}
+\altaffiltext{\DUR}{Department of Physics, Durham University, South Road, Durham DH1 3LE, UK}
+\altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138}
 % \altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA}
 % \altaffiltext{\USNO}{US Naval Observatory, Flagstaff Station, Flagstaff, AZ 86001, USA}
@@ -76,13 +77,8 @@
 \begin{abstract}
 
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
-bibendum nisi id tristique posuere. Duis eu mollis nulla. Maecenas est
-turpis, mattis tempor urna vitae, placerat rhoncus sem. Lorem ipsum
-dolor sit amet, consectetur adipiscing elit. Sed quis velit
-nisl. Aliquam erat volutpat. Cras lacinia, nisl tristique auctor
-molestie, dolor nulla rhoncus purus, ac accumsan nunc nunc ac
-nibh. Maecenas vitae mollis mauris. Ut sollicitudin pulvinar purus,
-eget luctus lorem tincidunt vitae. Vestibulum eu mattis neque. Nulla
-in tortor id urna dapibus gravida a vel leo.
+The Pan-STARRS Image Processing Pipeline performs the processing
+needed to downloaded, archive, and process all images obtained by the
+Pan-STARRS telescopes.  This article describes the overall data
+analysis system.
 
 \end{abstract}
@@ -91,5 +87,66 @@
 \keywords{Surveys:\PSONE }
 
-% \section{INTRODUCTION}\label{sec:intro}
+\section{INTRODUCTION}\label{sec:intro}
+
+This is the second in a series of seven papers describing the
+Pan-STARRS1 Surveys, the data reduction techiques and the resulting
+data products.  This paper (Paper II) describes how the various data
+processing stages are organised and implemented in the Imaging
+Processing Pipeline (IPP), including details of the the processing
+database which is a critical element in the IPP infrastructure .
+
+%Chambers et al. 2017 (Paper I)
+%The Pan-STARRS\,1 Surveys
+\citet[][Paper I]{chambers2017}
+provides an overview of the Pan-STARRS System, the design and
+execution of the Surveys, the resulting image and catalog data
+products, a discussion of the overall data quality and basic
+characteristics, and a brief summary of important results.
+
+%Magnier et al. 2017 (Paper II)
+%Pan-STARRS Data Processing Stages
+%\citet[][Paper II]{magnier2017c}
+%describes how the various data processing stages are organised and implemented
+%in the Imaging Processing Pipeline (IPP), including details of the 
+%the processing database which is a critical element in the IPP infrastructure . 
+
+%Waters et al. 2017 (Paper III) 
+%Pan-STARRS Pixel Processing : Detrending, Warping, Stacking
+\citet[][Paper III]{waters2017}
+describes the details of the pixel processing algorithms, including detrending, warping, and adding (to create stacked images) and subtracting (to create difference images) and resulting image products and their properties. 
+
+
+%Magnier et al. 2017 (Paper IV) 
+%Pan-STARRS Pixel Analysis : Source Detection 
+\citet[][Paper IV]{magnier2017a}
+describes the details of the source detection and photometry, including point-spread-function and extended source fitting models, and the techniques for ``forced" photometry measurements. 
+
+%Magnier et al. 2017 (Paper V) 
+%Pan-STARRS Photometric and Astrometric Calibration
+\citet[][Paper V]{magnier2017b}
+describes the final calibration process, and the resulting photometric and astrometric quality.  
+
+
+%Flewelling et al. 2017 (Paper VI)
+%Pan-STARRS 1 Database and Data Products
+\citet[][Paper VI]{flewelling2017}
+describes  the details of the resulting catalog data and its organization in the Pan-STARRS database. 
+%
+%
+\citet[][Paper VII]{huber2017}
+%Huber et al. 2017 (Paper VII)
+describes the Medium Deep Survey in detail, including the unique issues and data products specific to that survey. The Medium Deep Survey is not part of Data Release 1. (DR1) 
+
+%
+The Pan-STARRS1 filters and photometric system have already been
+described in detail in \cite{2012ApJ...750...99T}.
+
+{\color{red} {\em Note: These papers are being placed on arXiv.org to
+    provide crucial support information at the time of the public
+    release of Data Release 1 (DR1). We expect the arXiv versions to
+    be updated prior to submission to the Astrophysical Journal in
+    January 2017. Feedback and suggestions for additional information
+    from early users of the data products are welcome during the
+    submission and refereeing process.}}
 
 \section{IPP Software Subsystems}
@@ -852,4 +909,26 @@
 \subsection{UH Cray Cluster} 
 
+\acknowledgments
+
+The Pan-STARRS1 Surveys (PS1) have been made possible through
+contributions of the Institute for Astronomy, the University of
+Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its
+participating institutes, the Max Planck Institute for Astronomy,
+Heidelberg and the Max Planck Institute for Extraterrestrial Physics,
+Garching, The Johns Hopkins University, Durham University, the
+University of Edinburgh, Queen's University Belfast, the
+Harvard-Smithsonian Center for Astrophysics, the Las Cumbres
+Observatory Global Telescope Network Incorporated, the National
+Central University of Taiwan, the Space Telescope Science Institute,
+the National Aeronautics and Space Administration under Grant
+No. NNX08AR22G issued through the Planetary Science Division of the
+NASA Science Mission Directorate, the National Science Foundation
+under Grant No. AST-1238877, the University of Maryland, and Eotvos
+Lorand University (ELTE) and the Los Alamos National Laboratory.
+
+\bibliographystyle{apj}
+% \bibliography{lib}{}
+\input{datasystem.bbl}
+
 \end{document}
 
