IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40634


Ignore:
Timestamp:
Mar 5, 2019, 4:12:58 PM (7 years ago)
Author:
eugene
Message:

reorg of the sections, cleanup Gaia discusions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/ps1.calibration/calibration.tex

    r40632 r40634  
    170170 see][]{magnier2017.datasystem} were used internally for pipeline
    171171optimization and the development of the initial photometric and
    172 astrometric reference catalog \citep{magnier2017.calibration}.  The
     172astrometric reference catalog.  The
    173173products from these reductions were not publicly released, but have
    174174been used to produce a wide range of scientific papers from the
     
    265265
    266266Images obtained by \PSONE\ are automatically processed in real time by
    267 the \PSONE\ Image Processing Pipeline \citep[IPP,][]{magnier2017.datasystem}.
    268 Real-time analysis goals are aimed at feeding the discovery pipelines
    269 of the asteroid search and supernova search teams.  The data obtained
    270 for the \PSONE\ Science Survey has also been used in three additional
    271 complete re-processing of the data: Processing Versions 1, 2, and 3
    272 (PV1, PV2, and PV3).  The real-time processing of the data is
    273 considered ``PV0''.  Except as otherwise noted, this article describes
    274 the calibration of the PV3 analysis of the data.  Between the first
    275 (DR1) and second (DR2) data releases, improvements were made to the
    276 calibration of both the photometry and astrometry, as described in
    277 this article.
    278 
    279 The pipeline data processing steps are described in detail by
    280 \cite{waters2017} and
    281 \cite{magnier2017.datasystem,magnier2017.analysis}.  In summary,
    282 individual images are detrended: non-linearity and bias corrections
    283 are applied, a dark current model is subtracted and flat-field
    284 corrections are applied.  The \yps-band images are also corrected for
    285 fringing: a master fringe pattern is scaled to match the observed
    286 fringing and subtracted.  Mask and variance image arrays are generated
    287 with the detrend analysis and carried forward at each stage of the IPP
    288 processing.  Source detection and photometry are performed for each
    289 chip independently.  As discussed below, preliminary astrometric and
    290 photometric calibrations are performed for all chips in a single
    291 exposure in a single analysis.  We refer to these measurements as the
    292 ``chip'' photometry and astrometry products.
     267the \PSONE\ Image Processing Pipeline (IPP, see Paper II).  Real-time
     268analysis goals are aimed at feeding the discovery pipelines of the
     269asteroid search and supernova search teams.  The data obtained for the
     270\PSONE\ Science Survey has also been used in three additional complete
     271re-processing of the data: Processing Versions 1, 2, and 3 (PV1, PV2,
     272and PV3).  The real-time processing of the data is considered ``PV0''.
     273Except as otherwise noted, this article describes the calibration of
     274the PV3 analysis of the data.  Between the first (DR1) and second
     275(DR2) data releases, improvements were made to the calibration of both
     276the photometry and astrometry, as described in this article.
     277
     278The pipeline data processing steps are described in detail in Papers
     279II, III, and IV.  In summary, individual images are detrended:
     280non-linearity and bias corrections are applied, a dark current model
     281is subtracted and flat-field corrections are applied.  The \yps-band
     282images are also corrected for fringing: a master fringe pattern is
     283scaled to match the observed fringing and subtracted.  Mask and
     284variance image arrays are generated with the detrend analysis and
     285carried forward at each stage of the IPP processing.  Source detection
     286and photometry are performed for each chip independently.  As
     287discussed below, preliminary astrometric and photometric calibrations
     288are performed for all chips in a single exposure in a single analysis.
     289We refer to these measurements as the ``chip'' photometry and
     290astrometry products.
    293291
    294292Chip images are geometrically transformed based on the astrometric
     
    308306Astronomical objects are detected and characterized in the stack
    309307images.  The details of the analysis of the sources in the stack
    310 images are discussed in \cite{magnier2017.analysis}, but in brief
     308images are discussed in Paper IV, but in brief
    311309these include PSF photometry, along with a range of measurements
    312310driven by the goals of understanding the galaxies in the images.
     
    333331fluxes from the individual warp images are averaged, a reliable
    334332measurement of the faint source flux is determined.  The details of
    335 this analysis are described in detail in \cite{magnier2017.analysis}.
     333this analysis are described in detail in Paper IV.
    336334
    337335The data products from the chip photometry, stack photometry, and
    338336forced-warp photometry analysis stages are ingested into the internal
    339337calibration database called the Desktop Virtual Observatory, or DVO
    340 \citep[see Section~4 in][]{magnier2017.datasystem} and used for
    341 photometric and astrometric calibrations.  In this article, we discuss
    342 the photometric calibration of the individual exposures, the stacks,
    343 and the warp images.  We also discuss the astrometric calibration of
    344 the individual exposures and the stack images.
     338(see Section~4 in Paper II) and used for photometric and astrometric
     339calibrations.  In this article, we discuss the photometric calibration
     340of the individual exposures, the stacks, and the warp images.  We also
     341discuss the astrometric calibration of the individual exposures and
     342the stack images.
    345343
    346344\section{Pipeline Calibration}
     
    380378
    381379Coordinates and calibrated magnitudes of stars from the reference
    382 database are loaded by \code{pasastro}.  A model for the positions of
     380database are loaded by \ippprog{pasastro}.  A model for the positions of
    383381the 60 chips in the focal plane is used to determine the expected
    384382astrometry for each chip based on the boresite coordinates and
     
    422420tangent-plane coordinate system.  The transforming polynomials are of
    423421the form:
     422% P & = & \sum_{i,j} C^P_{i,j} X^i_{\rm chip} Y^j_{\rm chip} \\
     423% Q & = & \sum_{i,j} C^Q_{i,j} X^i_{\rm chip} Y^j_{\rm chip}
    424424\begin{eqnarray}
    425 P & = & \sum_{i,j} C^P_{i,j} X^i_{\rm chip} Y^j_{\rm chip} \\
    426 Q & = & \sum_{i,j} C^Q_{i,j} X^i_{\rm chip} Y^j_{\rm chip}
     425P & = & \sum_{i,j} C^P_{i,j} X^i Y^j \\
     426Q & = & \sum_{i,j} C^Q_{i,j} X^i Y^j
    427427\end{eqnarray}
    428 where $P,Q$ are the tangent plane coordinates, $X_{\rm chip}, Y_{\rm
    429   chip}$ are the coordinates on the 60 GPC1 chips, and $C^P_{i,j}, C^Q_{i,j}$
    430 are the polynomial coefficients for each order.  In the \ippprog{psastro}
    431 analysis, $i + j <= N_{\rm order}$ where the order of the fit, $N_{\rm
    432   order}$, may be 1 to 3, under the restriction that sufficient stars
    433 are needed to constrain the order. 
     428where $P,Q$ are the tangent plane coordinates, $X, Y$ are the
     429coordinates on the 60 GPC1 chips, and $C^P_{i,j}, C^Q_{i,j}$ are the
     430polynomial coefficients for each order $i, j$.  In the
     431\ippprog{psastro} analysis, $i + j <= N_{\rm order}$ where the order
     432of the fit, $N_{\rm order}$, may be 1 to 3, under the restriction that
     433sufficient stars are needed to constrain the order.
    434434
    435435A second form of astrometry model which yields somewhat higher
     
    455455coordinate system:
    456456\begin{eqnarray}
    457 L & = & \sum_{i,j} C^L_{i,j} X^i_{\rm chip} Y^j_{\rm chip} \\
    458 M & = & \sum_{i,j} C^M_{i,j} X^i_{\rm chip} Y^j_{\rm chip}
     457L & = & \sum_{i,j} C^L_{i,j} X^i Y^j \\
     458M & = & \sum_{i,j} C^M_{i,j} X^i Y^j
    459459\end{eqnarray}
    460460
     
    472472transformation may be written as:
    473473\begin{eqnarray}
    474   L & = & C^L_{0,0} + C^L_{1,0} X_{\rm chip} + C^L_{0,1} Y_{\rm chip} + \delta L(X_{\rm chip}, Y_{\rm chip}) \\
    475   M & = & C^M_{0,0} + C^M_{1,0} X_{\rm chip} + C^M_{0,1} Y_{\rm chip} + \delta M(X_{\rm chip}, Y_{\rm chip})
     474  L & = & C^L_{0,0} + C^L_{1,0} X + C^L_{0,1} Y + \delta L(X, Y) \\
     475  M & = & C^M_{0,0} + C^M_{1,0} X + C^M_{0,1} Y + \delta M(X, Y)
    476476\end{eqnarray}
    477477
     
    511511the reference stars and the detected objects.  \ippprog{psastro} uses 2D
    512512cross correlation to search for the match.  The guess astrometry
    513 calibration is used to define a predicted set of $X^{\rm ref}_{\rm
    514   chip}, Y^{\rm ref}_{\rm chip}$ values for the reference catalog
     513calibration is used to define a predicted set of $X^{\rm ref}, Y^{\rm ref}$ values for the reference catalog
    515514stars.  For all possible pairs between the two lists, the values of
    516515\begin{eqnarray}
    517 \Delta X & = & X^{\rm ref}_{\rm chip} - X^{\rm obs}_{\rm chip}\\
    518 \Delta Y & = & Y^{\rm ref}_{\rm chip} - Y^{\rm obs}_{\rm chip}
     516\Delta X & = & X^{\rm ref} - X^{\rm obs}\\
     517\Delta Y & = & Y^{\rm ref} - Y^{\rm obs}
    519518\end{eqnarray}
    520519are generated.  The collection of $\Delta X, \Delta Y$ values are
     
    546545%% \note{option to downweight based on photometric inconsistency : not used in PS1 analysis}
    547546
    548 \subsection{Chip Polynomial Fits}
     547\subsection{Pipeline Astrometric Calibration}
    549548
    550549The astrometry solution from the cross correlation step above is again
    551 used to select matches between the reference stars and observed
    552 stars in the image.  The matching radius starts off quite large, and a
     550used to select matches between the reference stars and observed stars
     551in the image.  The matching radius starts off quite large, and a
    553552series of fits is performed to generate the transformation between
    554553chip and tangent plane coordinates.  Three clipping iterations are
     
    556555here $\sigma$ is determined from the distribution of the residuals in
    557556each dimension (X,Y) independently.  After each fit cycle, the matches
    558 are redetermined using a smaller radius and the fit re-tried. 
    559 
    560 \subsection{Mosaic Astrometry Polynomial Fits}
     557are redetermined using a smaller radius and the fit re-tried.
    561558
    562559The astrometry solutions from the independent chip fits are used to
     
    686683%
    687684Table~\ref{tab:measure_mask_values} lists the flags specific to
    688 individual measurements.  These values are stored in the DVO database in the
    689 field \code{Measure.dbFlags} and exposed in the public database \citep[PSPS][]{flewelling2017}
    690 in the fields \code{Detection.infoFlag3},
    691 \code{StackObjectThin.XinfoFlag3} (where \code{X} is one of
    692      {$grizy$}), and \code{ForcedWarpMeasurement.FinfoFlag3}.
     685individual measurements.  These values are stored in the DVO database
     686in the field \ippdbtable{Measure}\ippdbcolumn{.dbFlags} and exposed in
     687the public database (PSPS, Paper VI) in the fields
     688\ippdbtable{Detection}\ippdbcolumn{.infoFlag3},
     689\ippdbtable{StackObjectThin}{\ippdbcolumn.XinfoFlag3} (where
     690\ippdbcolumn{X} is one of {$grizy$}), and
     691\ippdbtable{ForcedWarpMeasurement}\ippdbcolumn{.FinfoFlag3}.
    693692%
    694693Table~\ref{tab:secf_mask_values} lists the flags which are set for
    695694each filter for individual objects in the database.  These values are
    696 recorded in the DVO database field \code{SecFilt.flags} and are
     695recorded in the DVO database field \ippdbtable{SecFilt}\ippdbcolumn{.flags} and are
    697696exposed in PSPS in the fields
    698 \code{MeanObject.XFlags} and \code{StackObjectThin.XinfoFlag4}, where
    699 \code{X} in both cases is one of {$grizy$}.
     697\ippdbtable{MeanObject}\ippdbcolumn{.XFlags} and \ippdbtable{StackObjectThin}\ippdbcolumn{.XinfoFlag4}, where
     698\ippdbcolumn{X} in both cases is one of {$grizy$}.
    700699%
    701700Table~\ref{tab:object_mask_values} lists the flags specific to an
    702701object as a whole.  These values are stored in the DVO database field
    703 \code{Average.flags} and are exposed in PSPS in
    704 the field \code{MeanObject.objInfoFlag}.
     702\ippdbtable{Average}\ippdbcolumn{.flags} and are exposed in PSPS in
     703the field \ippdbtable{MeanObject}\ippdbcolumn{.objInfoFlag}.
    705704%
    706705Table~\ref{tab:image_mask_values} lists the flags raised for images.
    707 These flags are stored in the DVO database field \code{Image.flags}
    708 and are exposed in PSPS in the field \code{ImageMeta.qaFlags}.
     706These flags are stored in the DVO database field \ippdbtable{Image}\ippdbcolumn{.flags}
     707and are exposed in PSPS in the field \ippdbtable{ImageMeta}\ippdbcolumn{.qaFlags}.
    709708%
    710709The type of conditions which are recorded by these bits range from
     
    886885Photometric nights are selected and all other exposures are ignored.
    887886Each night is allowed to have a single fitted zero point
    888 (corresponding to the sum $zp_{\rm nominal} + M_{cal}$ below) and a
     887(corresponding to the sum $zp_{\rm ref} + M_{cal}$ below) and a
    889888single fitted value for the airmass extinction coefficient ($K_{\rm
    890889  \lambda}$) per filter.  The zero points and extinction terms are
     
    948947
    949948The ubercal zero points and the flat-field correction data are loaded
    950 into the PV3 DVO database using the program \code{setphot}.  This
     949into the PV3 DVO database using the program \ippprog{setphot}.  This
    951950program converts the reported zero point and flat field values to the
    952951DVO internal representation in which the zero point of each image is
    953952split into three main components:
    954953\begin{equation}
    955 zp_{\rm total} = zp_{\rm nominal} + M_{cal} + K_{\rm \lambda}(\sec \zeta - 1)
     954zp_{\rm total} = zp_{\rm ref} + M_{cal} + K_{\rm \lambda}(\sec \zeta - 1)
    956955\end{equation}
    957 where $zp_{\rm nominal}$ and $K_{\rm \lambda}$ are static values for
    958 each filter representing respectively the nominal zero point and the
     956where $zp_{\rm ref}$ and $K_{\rm \lambda}$ are static values for
     957each filter representing respectively the nominal reference zero point and the
    959958slope of the trend with respect to the airmass ($\zeta$) for each
    960959filter.  These static values are listed in Table~\ref{tab:zpts}.  When
    961 \code{setphot} was run, these static zero points have been adjusted by
     960\ippprog{setphot} was run, these static zero points have been adjusted by
    962961the Calspec offsets listed in Table~\ref{tab:zpts} based on the
    963962analysis of Calspec standards by \cite{2015ApJ...815..117S}.  These
     
    969968in a table of flat-field offsets as a function of time, filter, and
    970969camera position.  Each image which is part of the ubercal subset is
    971 marked with a bit in the field \code{Image.flags}:
     970marked with a bit in the field \ippdbtable{Image}\ippdbcolumn{.flags}:
    972971\code{ID_IMAGE_PHOTOM_UBERCAL = 0x00000200}. 
    973972
     
    991990\end{table}
    992991
    993 When \code{setphot} applies the ubercal information to the image
     992When \ippprog{setphot} applies the ubercal information to the image
    994993tables, it also updates the individual measurements associated with
    995994those images.  In the DVO database schema, the normalized instrumental
    996 magnitude, $M_{\rm inst} = -2.5log_{10} (DN / sec)$ is stored
     995magnitude, $m_{\rm inst} = -2.5log_{10} (DN / sec)$ is stored
    997996for each measurement, with an arbitrary (but fixed)
    998997constant offset of 25 to place the modified instrumental magnitudes into
     
    10091008as:
    10101009\begin{equation}
    1011 M_{\rm rel} = M_{\rm inst} + zp_{\rm ref} + M_{\rm cal} + M_{\rm flat} + K_\lambda (sec \zeta - 1).
     1010M_{\rm rel} = m_{\rm inst} + zp_{\rm ref} + M_{\rm cal} + M_{\rm flat} + K_\lambda (sec \zeta - 1).
     1011\label{eqn:Mrel}
    10121012\end{equation}
    10131013The calibration offsets, $M_{\rm cal}$ and $M_{\rm flat}$, represent
     
    10241024
    10251025When the ubercal zero points and flat-field data are loaded,
    1026 \code{setphot} updates the $M_{\rm cal}$ values for all measurements
     1026\ippprog{setphot} updates the $M_{\rm cal}$ values for all measurements
    10271027which have been derived from the ubercal images.  These measurements
    1028 are also marked in the field \code{Measure.dbFlags} with the bit
     1028are also marked in the field \ippdbtable{Measure}\ippdbcolumn{.dbFlags} with the bit
    10291029\code{ID_MEAS_PHOTOM_UBERCAL = 0x00008000}.  At this stage,
    1030 \code{setphot} also updates the values of $M_{\rm flat}$ for all GPC1
     1030\ippprog{setphot} also updates the values of $M_{\rm flat}$ for all GPC1
    10311031measurements in the appropriate filters.
    10321032
     
    10431043As described above, the instrumental magnitude and the calibrated magnitude
    10441044are related by arithmetic magnitude offsets which account for effects
    1045 such as the instrumental variations and atmospheric attenuation
    1046 \begin{equation}
    1047 M_{rel} = m_{inst} + ZP + M_{cal}
    1048 \end{equation}
    1049 
     1045such as the instrumental variations and atmospheric attenuation (Eqn~\ref{eqn:Mrel}).
     1046%% \begin{equation}
     1047%% % M_{rel} = m_{inst} + zp_{\rm ref} + M_{cal}
     1048%% M_{\rm rel} = m_{\rm inst} + zp_{\rm ref} + M_{\rm cal} + M_{\rm flat} + K_\lambda (sec \zeta - 1).
     1049%% \end{equation}
    10501050From the collection of measurements, we can generate an average
    10511051magnitude for a single star (or other object):
     
    10651065$M_{\rm cal}$ offset for each exposure:
    10661066\begin{equation}
    1067   \chi^2 = \frac{\sum_{i,j} (m_{inst}[i,j] + ZP + K \zeta +
    1068     M_{clouds}[i] - M_{ave}[j]) w_{i,j}}{\sum_{i,j} w_{i,j}}
     1067  \chi^2 = \frac{\sum_{i,j} (M_{\rm rel}[i,j] - M_{\rm ave}[j]) w_{i,j}}{\sum_{i,j} w_{i,j}}
    10691068\end{equation}
    10701069
     
    12541253%% These extractions should be used for the paper (EAM 2019.02.15)
    12551254
    1256 \begin{figure*}[htbp]
    1257   \begin{center}
    1258 %width=\hsize
    1259  \includegraphics[height=\vsize,clip]{{pics/allsky.photom.v1}.png}
    1260   \caption{\label{fig:allsky.photom.sigma} Consistency of photometry
    1261     measurements across the sky.  Each panel shows a map of the
    1262     standard deviation of photometry residuals for stars in each
    1263     pixel.  The median value of the measure standard deviations across
    1264     the sky is $(\sigma_g, \sigma_r, \sigma_i, \sigma_z, \sigma_y) =
    1265     (14, 14, 15, 15, 18)$ millimags.  These values reflect the typical
    1266     single-measurement errors for bright stars.}
    1267   \end{center}
    1268 \end{figure*}
    1269 
    12701255\subsubsection{Photometric Flat-field}
    12711256\label{sec:phot.flat}
     
    12801265flat-field residual with much finer resolution: 124 x 124 flat-field
    12811266values for each GPC1 chip (40x40 pixels per point).  We then used
    1282 \code{setphot} to apply this new flat-field correction, as well as the
     1267\ippprog{setphot} to apply this new flat-field correction, as well as the
    12831268ubercal flat-field corrections, to the data in the database.  At this
    12841269point, we re-ran the entire relphot analysis to determine zero points
     
    13271312to follow the changes in the PSF.
    13281313
     1314\subsubsection{Stack and Warp Photometric Calibration}
     1315\label{sec:phot.stack}
     1316
    13291317For stacks and warps, the image calibrations were determined after the
    13301318relative photometry was performed on the individual chips.  Each stack
    13311319and each warp was tied via relative photometry to the average
    1332 magnitudes from the chip photometry.  In this case, no flat-field
    1333 corrections were applied.  For the stacks, such a correction would not
    1334 be possible after the stack has been generated because multiple chip
    1335 coordinates contribute to each stack pixel coordinate.  For the warps,
    1336 it is in principle possible to map back to the corresponding chip, but
    1337 the information was not available in the DVO database, and thus it was
    1338 not possible at this time to determine the flat-field correction
    1339 appropriate for a given warp.  This latter effect is one of several
    1340 which degrade the warp photometry compared to the chip photometry at
    1341 the bright end.
     1320magnitudes from the chip photometry, as described below.  In this
     1321case, no flat-field corrections were applied.  For the stacks, such a
     1322correction would not be possible after the stack has been generated
     1323because multiple chip coordinates contribute to each stack pixel
     1324coordinate.  For the warps, it is in principle possible to map back to
     1325the corresponding chip, but the information was not available in the
     1326DVO database, and thus it was not possible at this time to determine
     1327the flat-field correction appropriate for a given warp.  This latter
     1328effect is one of several which degrade the warp photometry compared to
     1329the chip photometry at the bright end.
    13421330
    13431331For the stack calibration, we calculate two separate zero points: one
     
    13501338the PSF magnitudes to the average of the chip photometry PSF
    13511339magnitudes, but the aperture-like magnitudes are tied by equating the
    1352 stack Kron magnitudes to the average chip Kron magnitudes.  {\em Note
    1353   that for DR1, this split zero point calibration was {\bf not} used; instead
    1354   all stack photometry was tied to the average chip photometry via the
    1355   PSF magnitudes.}  The result of using a single zero point is that
    1356 the stack PSF magnitudes are consistent across the sky with the chip
    1357 PSF magnitudes, but the aperture-like magnitudes show significant
    1358 spatial variations.  Figure~\ref{fig:stack.bad.kron} illustrates the
    1359 impact of using a single PSF zero point for the stack photometry.
    1360 This split is not needed for the forced-warp photometry since the
    1361 individual warps have well-defined PSfs.
     1340stack Kron magnitudes to the average chip Kron magnitudes. 
    13621341
    13631342%% XXX generate a figure to illustrate the Kron vs PSF mags in stacks (DR1 & DR2)
    1364 
    1365 \subsection{Photometry Calibration Quality}
    1366 
    1367 Figure~\ref{fig:allsky.photom.sigma} shows the standard deviations of
    1368 the mean residual photometry for bright stars as a function of
    1369 position across the sky.  For each pixel in these images, we selected
    1370 all objects with (14.5, 14.5, 14.5, 14.0, 13.0) $<$ ($g,r,i,z,y$) $<$
    1371 (17, 17, 17, 16.5, 15.5), with at least 3 measurements in $i$-band (to
    1372 reject artifacts detected in a pair of exposures from the same night),
    1373 with \code{PSF_QF} $> 0.85$ (to reject excessively-masked objects),
    1374 and with $mag_{\rm PSF} - mag_{\rm Kron} < 0.1$ (to reject galaxies).
    1375 We then generated histograms of the difference between the average
    1376 magnitude and the apparent magnitude in an individual image for each
    1377 filter for all stars in a given pixel in the images.  From these
    1378 residual histograms, we can then determine the median and the 68\%-ile
    1379 range to calculate a robust standard deviation.  This represents the
    1380 bright-end systematic error floor for a measurement from a single
    1381 exposure.  The standard deviations are then plotted in
    1382 Figure~\ref{fig:allsky.photom.sigma}. 
    1383 
    1384 The 5 panels in Figure~\ref{fig:allsky.photom.sigma} show several
    1385 features.  The Galactic bulge is clearly seen in all five filters,
    1386 with the impact strongest in the reddest bands.  We attribute this to
    1387 the effects of crowding and contamination of the photometry by
    1388 neighbors.  Large-scale, roughly square features \approx 10 degrees on
    1389 a side in these images can be attributed to the vagaries of weather:
    1390 these patches correspond to the observing chunks.  These images
    1391 include both photometric and non-photometric exposures.  It seems
    1392 plausible that the non-photometric images from relatively poor quality
    1393 nights elevate the typical errors.  On small scales, there are
    1394 circular patterns \approx 3 degrees in diameter corresponding to
    1395 individual exposures; these represent residual flat-fields structures
    1396 not corrected by our stellar flat-fielding.  The median of the
    1397 standard deviations in the five filters are
    1398 $(\sigma_g,\sigma_r,\sigma_i,\sigma_z,\sigma_y) = (14, 14, 15, 15,
    1399 18)$ millimagnitudes.
    14001343
    14011344\subsection{Object Photometry}
     
    14371380\begin{itemize}
    14381381\item {\bf rank 0 :} perfect measurement (no quality concerns)
    1439 \item {\bf rank 1 :} PSF ``perfect pixel'' quality factor (\code{PSF_QF_PERFECT}) $< 0.85$.  \code{PSF_QF_PERFECT} measures the PSF-weighted fraction of pixels which are not masked \citep[see][]{magnier2017.analysis}.
     1382\item {\bf rank 1 :} PSF ``perfect pixel'' quality factor
     1383  (\code{PSF_QF_PERFECT}) $< 0.85$.  \code{PSF_QF_PERFECT} measures
     1384  the PSF-weighted fraction of pixels which are not masked (see Paper IV).
    14401385\item {\bf rank 2 :} Photometry analysis flag field (\code{photFlags}) has one of the ``poor quality'' bits raised.  These bits are listed below; OR-ed together they have the hexadecimal value \code{0xe0440130}
    14411386\begin{itemize}
     
    14601405  those pixels on ghosts, diffraction spikes, bright star bleeds, and
    14611406  the mildly-saturated cores of bright stars.  Suspect values may have
    1462   some use in measuring a flux, but with caution
    1463   \citep[see][]{magnier2017.analysis,waters2017}.
     1407  some use in measuring a flux, but with caution (see Papers II and
     1408  III).
    14641409\item {\bf rank 5 :} Photometric calibration of the GPC1 exposure is
    14651410  determined by relphot to be poor.  This situation occurs if there
     
    15351480Pan-STARRS\,1 detections have a relatively high rate of non-Gaussian
    15361481outliers, partly because of the wide range of instrumental features
    1537 affecting the data \citep[see][]{waters2017}.  We have used a
     1482affecting the data (see Paper III).  We have used a
    15381483technique called Iteratively Reweighted Least Squares (IRLS) fitting
    15391484to reduce the sensitivity of the fits to outlier measurements.  We
     
    18211766% from: /data/kukui.3/eugene/pv3.stats.20161202/
    18221767
    1823 \begin{figure*}[htbp]
    1824   \begin{center}
    1825  \includegraphics[width=\hsize,clip]{{pics/KHexample}.png}
    1826   \caption{\label{fig:KHexample} Illustration of the Koppenh\"ofer Effect
    1827     on OTA04.  {\bf Bottom left} X-direction before correction.  The solid line shows the measured
    1828     mean residual for stars detected on this chip as a function of the
    1829     instrumental magnitude / FWHM$^2$. 
    1830 {\bf Bottom right} Y-direction before correction. 
    1831 {\bf Top left} X-direction after correction. 
    1832 {\bf Top right} Y-direction after correction.  }
    1833   \end{center}
    1834 \end{figure*}
    1835 
    1836 % from: /data/kukui.3/eugene/pv3.stats.20161202/
    1837 
    1838 \begin{figure}[htbp]
    1839   \begin{center}
    1840  \includegraphics[width=\hsize,clip]{{pics/KHmap}.png}
    1841   \caption{\label{fig:KHmap} Map of the amplitude of the
    1842     Koppenh\"ofer Effect on chips across the focal plane.  In the
    1843     affected chips, bright stars are up to 0.2 arcsec deviant
    1844     from their expected positions. {\bf Bottom left} X-direction before
    1845     correction.  {\bf Bottom right} Y-direction before correction.  {\bf
    1846       Top left} X-direction after correction.  {\bf Top right}
    1847     Y-direction after correction.}
    1848   \end{center}
    1849 \end{figure}
    1850 
    18511768\subsubsection{Object Photometry Flags}
    18521769
     
    19091826\code{ID_OBJ_MOST_SOLSYS_DET} is set.
    19101827
     1828\subsection{Photometry Calibration Quality}
     1829
     1830\begin{figure*}[htbp]
     1831  \begin{center}
     1832%width=\hsize
     1833 \includegraphics[height=\vsize,clip]{{pics/allsky.photom.v1}.png}
     1834  \caption{\label{fig:allsky.photom.sigma} Consistency of photometry
     1835    measurements across the sky.  Each panel shows a map of the
     1836    standard deviation of photometry residuals for stars in each
     1837    pixel.  The median value of the measure standard deviations across
     1838    the sky is $(\sigma_g, \sigma_r, \sigma_i, \sigma_z, \sigma_y) =
     1839    (14, 14, 15, 15, 18)$ millimags.  These values reflect the typical
     1840    single-measurement errors for bright stars.}
     1841  \end{center}
     1842\end{figure*}
     1843
     1844Figure~\ref{fig:allsky.photom.sigma} shows the standard deviations of
     1845the mean residual photometry for bright stars as a function of
     1846position across the sky.  For each pixel in these images, we selected
     1847all objects with (14.5, 14.5, 14.5, 14.0, 13.0) $<$ ($g,r,i,z,y$) $<$
     1848(17, 17, 17, 16.5, 15.5), with at least 3 measurements in $i$-band (to
     1849reject artifacts detected in a pair of exposures from the same night),
     1850with \code{PSF_QF} $> 0.85$ (to reject excessively-masked objects),
     1851and with $mag_{\rm PSF} - mag_{\rm Kron} < 0.1$ (to reject galaxies).
     1852We then generated histograms of the difference between the average
     1853magnitude and the apparent magnitude in an individual image for each
     1854filter for all stars in a given pixel in the images.  From these
     1855residual histograms, we can then determine the median and the 68\%-ile
     1856range to calculate a robust standard deviation.  This represents the
     1857bright-end systematic error floor for a measurement from a single
     1858exposure.  The standard deviations are then plotted in
     1859Figure~\ref{fig:allsky.photom.sigma}. 
     1860
     1861The 5 panels in Figure~\ref{fig:allsky.photom.sigma} show several
     1862features.  The Galactic bulge is clearly seen in all five filters,
     1863with the impact strongest in the reddest bands.  We attribute this to
     1864the effects of crowding and contamination of the photometry by
     1865neighbors.  Large-scale, roughly square features \approx 10 degrees on
     1866a side in these images can be attributed to the vagaries of weather:
     1867these patches correspond to the observing chunks.  These images
     1868include both photometric and non-photometric exposures.  It seems
     1869plausible that the non-photometric images from relatively poor quality
     1870nights elevate the typical errors.  On small scales, there are
     1871circular patterns \approx 3 degrees in diameter corresponding to
     1872individual exposures; these represent residual flat-fields structures
     1873not corrected by our stellar flat-fielding.  The median of the
     1874standard deviations in the five filters are
     1875$(\sigma_g,\sigma_r,\sigma_i,\sigma_z,\sigma_y) = (14, 14, 15, 15,
     187618)$ millimagnitudes.
     1877
     1878\begin{figure*}[htbp]
     1879  \begin{center}
     1880  \includegraphics[width=\hsize,clip]{{pics/photom.pv3.3v4}.png}
     1881  \caption{\label{fig:photom.pv3.3v4} Sample comparison of PV3.3 and
     1882    PV3.4 photometry illustrating the impact of the issues identified
     1883    in the PV3.3 stack and warp photometry.  All figures use \ips-band
     1884    photometry.  The left panels use data from PV3.3 while the right
     1885    use PV3.4.  The top row shows the mean difference between the
     1886    average photometry from individual exposures (``chip'') and the
     1887    stack photometry using Kron magnitudes.  The middle row shows the
     1888    mean difference between the average photometry from individual
     1889    exposures (``chip'') and the average forced-warp photometry, again
     1890    using Kron magnitudes.  The bottom row shows the mean difference
     1891    between the average photometry from individual exposures
     1892    (``chip'') and the average forced-warp photometry, using PSF
     1893    magnitudes.  See Section~\ref{sec:discussion} for a description of
     1894    the calibration change in PV3.4.}
     1895\end{center}
     1896\end{figure*}
     1897
     1898As discussed above (Section~\ref{sec:phot.stack}), the DR2 stack
     1899calibration used separate zero points for PSF-like and aperture-like
     1900photometry.  For DR1, this split zero point calibration was {\bf not}
     1901used.  Instead all stack photometry was tied to the average chip
     1902photometry via the PSF magnitudes.  The result of using a single zero
     1903point is that the stack PSF magnitudes are consistent across the sky
     1904with the chip PSF magnitudes, but the aperture-like magnitudes show
     1905significant spatial variations.  A second issue identified in DR1 and
     1906corrected in DR2 is due to the application of the high-resolution
     1907photometric flat-field correction.  For the initial processing of the
     1908PV3 calibration, this flat-field correction was applied with the wrong
     1909sign.  For DR1, the error was corrected for the \ippstage{chip}-stage
     1910photometry.  However, the stack and warp photometry had been tied to
     1911the chip-stage photometry before this correction and they were not
     1912recalibrated before the DR1 release.  After this error was noticed,
     1913the stack and warp photometry were recalibrated for DR2.
     1914Figure~\ref{fig:photom.pv3.3v4} illustrates the impact of using a
     1915single PSF zero point for the stack photometry and the impact of the
     1916flat-field error.  This zero point split is not needed for the
     1917forced-warp photometry since the individual warps have well-defined
     1918PSFs.
     1919
    19111920\section{Astrometry Calibration}
     1921
     1922\begin{figure*}[htbp]
     1923  \begin{center}
     1924 \includegraphics[width=\hsize,clip]{{pics/KHexample}.png}
     1925  \caption{\label{fig:KHexample} Illustration of the Koppenh\"ofer Effect
     1926    on OTA04.  {\bf Bottom left} X-direction before correction.  The solid line shows the measured
     1927    mean residual for stars detected on this chip as a function of the
     1928    instrumental magnitude / FWHM$^2$. 
     1929{\bf Bottom right} Y-direction before correction. 
     1930{\bf Top left} X-direction after correction. 
     1931{\bf Top right} Y-direction after correction.  }
     1932  \end{center}
     1933\end{figure*}
     1934
     1935% from: /data/kukui.3/eugene/pv3.stats.20161202/
     1936
     1937\begin{figure}[htbp]
     1938  \begin{center}
     1939 \includegraphics[width=\hsize,clip]{{pics/KHmap}.png}
     1940  \caption{\label{fig:KHmap} Map of the amplitude of the
     1941    Koppenh\"ofer Effect on chips across the focal plane.  In the
     1942    affected chips, bright stars are up to 0.2 arcsec deviant
     1943    from their expected positions. {\bf Bottom left} X-direction before
     1944    correction.  {\bf Bottom right} Y-direction before correction.  {\bf
     1945      Top left} X-direction after correction.  {\bf Top right}
     1946    Y-direction after correction.}
     1947  \end{center}
     1948\end{figure}
    19121949
    19131950Once the full PV3 dataset loaded into the master PV3 DVO database,
     
    19742011measured the mean X and Y displacements of the astrometric residuals
    19752012as function of the instrumental magnitude of the star divided by the
    1976 FWHM$^2$.  We measured the trend for all chips in a
    1977 number of different time ranges and found the effect to be quite
    1978 stable, in the period where it was present.  The effect only appeared
    1979 in the serial direction.  Figure~\ref{fig:KHexample} shows the KE
    1980 trend for a typical affected chip both before and after the
    1981 correction.  For the PV3 dataset, we re-measured the KE trends using
    1982 stars in the Galactic pole regions after an initial relative
    1983 astrometry calibration pass: the Galactic pole is necessary because
    1984 the real-time astrometric calibration relies largely on the fainter
    1985 stars which are not affected by the KE.  The trend is then stored in a
    1986 form which can be applied to the database measurements.
     2013FWHM$^2$.  We measured the trend for all chips in a number of
     2014different time ranges and found the effect to be quite stable, in the
     2015period where it was present.  The effect only appeared in the serial
     2016direction.  Figure~\ref{fig:KHexample} shows the KE trend for a
     2017typical affected chip both before and after the correction.
     2018Figure~\ref{fig:KHmap} shows the maximum impact of the Koppenh\"ofer
     2019Effect as a function of chip position in the focal plane.  For the PV3
     2020dataset, we re-measured the KE trends using stars in the Galactic pole
     2021regions after an initial relative astrometry calibration pass: the
     2022Galactic pole is necessary because the real-time astrometric
     2023calibration relies largely on the fainter stars which are not affected
     2024by the KE.  The trend is then stored in a form which can be applied to
     2025the database measurements.
    19872026
    19882027\subsubsection{Differential Chromatic Refraction}
     
    20182057the tangent of the zenith distance:
    20192058\begin{eqnarray}
    2020 \delta_{\rm blue} = \alpha \left[(g - i)_{\rm ref} - (g - i)\right] \tan \zeta \\
    2021 \delta_{\rm red} = \alpha \left[(z - y)_{\rm ref} - (z - y)\right] \tan \zeta
     2059\delta_{\rm blue} & = & \alpha \left[(g - i)_{\rm ref} - (g - i)\right] \tan \zeta \\
     2060\delta_{\rm red} & = & \alpha \left[(z - y)_{\rm ref} - (z - y)\right] \tan \zeta
    20222061\end{eqnarray}
    20232062where $(g-i)_{\rm ref}$ and $(z-y)_{\rm ref}$ are the median colors of the
     
    21752214discussed in detail in \cite{2018PASP..130f5002M}.
    21762215
    2177 % generate (or plot) astrometric flat-field images for DR2 (PV3.X)
    2178 
    2179 \begin{figure*}[htbp]
    2180   \begin{center}
    2181   \includegraphics[width=\hsize,clip]{{pics/astroflat.repair}.png}
    2182   \caption{\label{fig:astroflat.repair} Comparison of the
    2183     high-resolution astrometric flat-field images used for PV3.2
    2184     (left) and for PV3.3 (right).  These examples show the \gps-band
    2185     astrometric flat-field corrections for the $X$ direction as seen
    2186     in the focal plane coordinate system.  Note the elevated noise in
    2187     the PV3.2 image due to insufficient numbers of stars used in the analysis.
    2188 }
    2189 \end{center}
    2190 \end{figure*}
    2191 
    2192 % numbers of stars used:
    2193 %% mana: load.stars astroflat.20151205/astroflat.20151205.v1.Npt.fits
    2194 %% filter g : 2591421 stars
    2195 %% filter r : 3497036 stars
    2196 %% filter i : 16241986 stars
    2197 %% filter z : 7153595 stars
    2198 %% filter y : 4509749 stars
    2199 %% mana: load.stars astroflat.20170217/astroflat.20170217.Npt.fits
    2200 %% filter g : 17590560 stars
    2201 %% filter r : 31000135 stars
    2202 %% filter i : 82648850 stars
    2203 %% filter z : 62166619 stars
    2204 %% filter y : 42867074 stars
    2205 
    2206 \note{move the discussion of the DR1 & DR2 scatter to the end of the
    2207   astrom section?}
    2208 
    2209 Figure~\ref{fig:allsky.astrom.sigma} shows the standard deviations of
    2210 the mean residual astrometry in $(\alpha,\delta)$ for bright stars as
    2211 a function of position across the sky based on the DR2 calibration.  For each
    2212 pixel in these images, we selected all objects with $15 < i < 17$,
    2213 with at least 3 measurements in $i$-band (to reject artifacts detected
    2214 in a pair of exposures from the same night), with \code{PSF_QF} $>
    2215 0.85$ (to reject excessively-masked objects), and with $mag_{\rm PSF}
    2216 - mag_{\rm Kron} < 0.1$ (to reject galaxies).  We then generated
    2217 histograms of the difference between the object position predicted for
    2218 the epoch of each measurement (based on the proper motion and parallax
    2219 fit) and the observed position of that measurement, in both the Right
    2220 Ascension and Declination directions (in linear arcseconds), for all
    2221 stars in a given pixel in the images.  From these residual histograms,
    2222 we can then determine the median and the 68\%-ile range to calculate a
    2223 robust version of the standard deviation.  This represents the
    2224 bright-end systematic error floor for a measurement from a single
    2225 exposure.  The standard deviations are then plotted in
    2226 Figure~\ref{fig:allsky.photom.sigma}.  The median value of the
    2227 standard deviations across the sky in both $(\sigma_\alpha,
    2228 \sigma_\delta)$ is 16 milliarcseconds.
    2229 
    2230 The Galactic plane is clearly apparently in these images.  Like
    2231 photometry, we attribute this to failure of the PSF fitting due to
    2232 crowding.  The celestial North pole regions have somewhat elevated
    2233 errors in both R.A. and DEC, with some specifc structures.  Some of
    2234 these structures may be due to the larger typical seeing at these high
    2235 airmass regions, but some are due to astrometric failures which stem
    2236 from the reference catalog based on the PV2 analysis (see
    2237 Section~\ref{sec:pole.problems} for further details).  Several
    2238 features can be seen which appear to be an effect of the tie to the
    2239 Gaia astrometry: the stripes near the center of the DEC image and the
    2240 right side of the R.A. image.  The mesh of circular outlines one the 2
    2241 degree scale is due to the outer edge of the focal plane where the
    2242 astrometric calibration is poorly determined. 
    2243 
    2244 The DR1 astrometric calibration suffered from degraded astrometry due
    2245 to a problem with the astrometric flat-field correction identified too
    2246 late to be repaired for DR1.
    2247 %
    2248 The astrometric flat-field images used
    2249 for that release had too few stars to measure the correction with
    2250 sufficient signal-to-noise.  As a result, those corrections had
    2251 significant pixel-to-pixel noise which can be seen in
    2252 Figure~\ref{fig:astroflat.repair}.  As a result, the astrometric
    2253 flat-field correction reduces systematic structures on large spatial
    2254 scales, but at the expense of degrading the quality of individual
    2255 measurements.  Only the $i$-band flat had sufficient signal-to-noise
    2256 per pixel to avoid significantly increasing the per-measurement
    2257 position errors.
    2258 
    2259 For DR2, we recalculated the astrometric flat-field correction using
    2260 many more stars.  For the DR1 release, the number of stars per filter
    2261 was (\grizy) = (2.6M, 3.5M, 16M, 7M, 4.5M), while for the DR2 release,
    2262 the number of stars per filter was (\grizy) = (18M, 31M, 83M, 62M,
    2263 43M).  We also reduced the resolution of the astrometric flat-field,
    2264 using $80 \times 80$ superpixels, rather than the $40 \times 40$
    2265 superpixels used for DR1.  Because of the degraded astrometric
    2266 flat-field correction, the median per-measurement error floor of DR1
    2267 is \approx 22 mas, significantly worse than both DR2 and the earlier
    2268 PV2 analysis.  Figure~\ref{fig:allsky.astro.histogram} shows
    2269 histograms of the astrometric residual scatter across the sky for DR1
    2270 and DR2, illustrating the improvement.
    2271 
    2272 \begin{figure*}[htbp]
    2273   \begin{center}
    2274   \includegraphics[width=\hsize,clip]{{pics/allsky.histogram.astrom.compare}.png}
    2275   \caption{\label{fig:allsky.astro.histogram} Illustration of the
    2276     impact of the astrometric flat-field correction used for PV3.2 vs
    2277     PV3.3.  The blue histograms show the distribution of astrometric
    2278     residuals for bright stars from the PV3.2 analysis while the red
    2279     histograms show the distribution for the PV3.3 analysis.  The
    2280     median standard deviation for PV3.2 is 22 milliarcseconds in R.A.
    2281     (23 mas in Declination).  Using the higher signal-to-noise
    2282     flat-field correction images reduces the median values to 16 mas
    2283     for both R.A. and Declination directions in PV3.3.
    2284 }
    2285 \end{center}
    2286 \end{figure*}
    2287 
    2288 % older version of this figure:
    2289 % pv2_0 : /data/ipp060.0/eugene/pv2.astrom.20150126/astromap.20150127/dDsig.im.fits
    2290 % pv2_1 : /data/ipp060.0/eugene/pv2.astrom.20150126/astromap.20150429/dDsig.im.fits
    2291 
    2292 % NOTE:
    2293 % the pv2 versions used:  resize 1800 920; region 0 0 85 ait
    2294 % the pv3 versions used:  resize 1800 950; region 180 0 90 ait
    2295 
    2296 % thus we cannot directly compare map pixels, without re-extracting the measurements
    2297 % (we can do that if we decide it is needed to generate the best plots)
    2298 
    2299 % original version of figure: pv3.stats.20161202/allsky.astrom.sigma.png
    2300 %   based on /data/kukui.3/eugene/pv3.stats.20161202/maps.measure/pv3.v1.*.sigma.fits
    2301 %   based on /data/ipp094.0/eugene/pv3.stats.20161202/cdhist.measure/cdmerge.v1.dD.fits (& dR)
    2302 %   plot script /data/kukui.3/eugene/pv3.stats.20161202/scatter.sh
    2303 %   catdir /data/ipp094.0/eugene/pv3.cam.20150607/catdir.master (PV3.2)
    2304 
    2305 % regenerate using fits image in pv3.stats.20170413
    2306 
    2307 \begin{figure*}[htbp]
    2308   \begin{center}
    2309  \includegraphics[width=\hsize,clip]{{pics/allsky.astrom.pv3.3}.png}
    2310   \caption{\label{fig:allsky.astrom.sigma} Consistency of astrometry
    2311     measurements across the sky.  Each panel shows a map of the
    2312     standard deviation of astrometry residuals for stars in each
    2313     pixel.  The median value of the standard deviations across the sky
    2314     is $(\sigma_\alpha, \sigma_\delta) = (22, 23)$ milliarcseconds.
    2315     These values reflect the typical single-measurement errors for
    2316     bright stars.  See discussion regarding the astrometric flat which
    2317     is likely responsible for these elevated value. }
    2318   \end{center}
    2319 \end{figure*}
    2320 
    23212216After the initial analysis to measure the KE corrections, DCR
    23222217corrections, and astrometric flat-field corrections, we applied these
     
    23402235\label{sec:galactic.rotation}
    23412236
    2342 The initial analysis of the PV2 astrometry used the 2MASS positions as
     2237The analysis of the PV2 astrometry used the 2MASS positions as
    23432238an inertial constraint: the 2MASS coordinates were included in the
    23442239calculation of the mean positions for the objects in the database,
     
    23732268distance to our reference stars was \approx 500 pc. 
    23742269
    2375 For PV3, we desired to address this bias by including our knowledge
    2376 about the distances to the reference stars and the expected typical
    2377 proper motions for stars at those distances.  With some constraint on
    2378 the distance to each star, we can determine the expected proper motion
    2379 based on a model of the Galactic rotation and solar motions.  We can
    2380 then calculate the mean positions for the objects keeping the assumed
    2381 proper motion fixed.  When calibrating a specific image, the reference
    2382 star mean position is then translated to the expected position at the
    2383 epoch of that image.  The image calibration is then performed relative
    2384 to these predicted positions.  This process naturally accounts for the
    2385 proper motion of the reference stars.  In order to make the
    2386 calibrations consistent with the observed coordinates of an external
    2387 inertial reference, we perform the iterative fits using the technique
    2388 as described, but assign very high weights in the initial iterations
    2389 to the inertial reference, and reduce the weights as the astrometric
    2390 calibration iterations proceed.
     2270For the PV3 analysis, we desired to address this bias by including our
     2271knowledge about the distances to the reference stars and the expected
     2272typical proper motions for stars at those distances.  With some
     2273constraint on the distance to each star, we can determine the expected
     2274proper motion based on a model of the Galactic rotation and solar
     2275motions.  We can then calculate the mean positions for the objects
     2276keeping the assumed proper motion fixed.  When calibrating a specific
     2277image, the reference star mean position is then translated to the
     2278expected position at the epoch of that image.  The image calibration
     2279is then performed relative to these predicted positions.  This process
     2280naturally accounts for the proper motion of the reference stars.  In
     2281order to make the calibrations consistent with the observed
     2282coordinates of an external inertial reference, we perform the
     2283iterative fits using the technique as described, but assign very high
     2284weights in the initial iterations to the inertial reference, and
     2285reduce the weights as the astrometric calibration iterations proceed.
    23912286
    23922287In order to perform this analysis, we need estimated distances for
     
    24292324value of 500pc. 
    24302325
    2431 \subsection{Gaia Constraint}
    2432 
    2433 \note{move comparisons to Gaia to the discussion, limit this section
    2434   to the Gaia astrometric tie}
    2435 
    2436 After the full relative astrometry analysis was performed for the PV3
    2437 database, the Gaia Data Release 1 became available
    2438 \citep{2016AA...595A...2G,2016AA...595A...4L}.  This afforded us
    2439 the opportunity to constrain the astrometry on the basis of the Gaia
    2440 observations.  Gaia DR1 objects which are bright enough to have proper
    2441 motion and parallax solutions are in general saturated in the PS1
    2442 observations.  Thus, we are limited to using the Gaia mean positions
    2443 reported for the fainter stars.  We extracted all Gaia sources not
    2444 marked as a duplicate from the Gaia archive and generated a DVO
    2445 database from this dataset.  We then merged the Gaia DVO into the PV3
    2446 master DVO database.  We re-ran the complete relative astrometry
    2447 analysis using Gaia as an additional measurement.  We applied the
    2448 analysis described above, applying the estimated distances to
    2449 determine preliminary proper motions.  The Gaia mean epoch is reported
    2450 as 2015.0, so all Gaia measurements were assigned this epoch.  We
    2451 wanted to ensure the Gaia measurements dominated the astrometric
    2452 solutions, so we made the weight very high for the Gaia points:
    2453 1000$\times$ the nominal weight in the initial fits (to lock down the
    2454 reference frame), decreasing to 100$\times$ the nominal weight for the
    2455 last fits.  We also retained the 2MASS measurements in the analysis,
    2456 but gave them somewhat lower weights than Gaia: while the 2MASS data
    2457 does not have the accuracy of Gaia, the coverage is known to be quite
    2458 complete, while the Gaia DR1 has clear gaps and holes.  Having 2MASS,
    2459 even at a lower weight, helps to tile over those gaps.
    2460 
    2461 \begin{figure*}[htbp]
    2462   \begin{center}
    2463   \includegraphics[width=\hsize,clip]{{pics/gaia.photom}.png}
    2464   \caption{\label{fig:gaia.photom} Comparison with Gaia
    2465     photometry. {\bf Left} Mean of PS1 - Gaia, {\bf Right} Standard
    2466     deviation of PS1 - Gaia.  For pixels with $|b| > 30$ and $\delta >
    2467     -30$, the standard deviation of the PS1 - Gaia mean values is 7
    2468     millimagnitudes, while the median of the standard deviations is 12
    2469     millimagnitudes.  The former is a statement about the consistency
    2470     of the Gaia and Pan-STARRS\,1 photometry, while the latter
    2471     reflects the combined bright-end errors for both systems.  }
    2472   \end{center}
    2473 \end{figure*}
    2474 
    2475 Figure~\ref{fig:gaia.photom} shows a comparison between the Pan-STARRS
    2476 photometry in $g,r,i$ and the Gaia photometry in the $G$-band.  To
    2477 compare the PS1 photometry to the very broadband Gaia G filter, we
    2478 have determined a transformation based on a 3rd order polynomial fit
    2479 to $g-r$ and $g-i$ colors.  This transformation reproduces Gaia
    2480 photometry reasonably well for stars which are not too red.  For a
    2481 comparison, we have selected all PS1 stars with Gaia measurements
    2482 meeting the following criteria: $14 < i < 19$, with at least 10 total
    2483 measurements, within a modest color range $0.2 < g - r < 0.9$.  We
    2484 also restricted to objects with $i_{\rm PSF} - i_{\rm Kron} < 0.1$,
    2485 using the average $i$ magnitudes determined from the individual
    2486 exposures. 
    2487 
    2488 For Figure~\ref{fig:gaia.photom}, we calculate the difference between
    2489 the estimated $G$-band magnitude based on PS1 $g,r,i$ photometry and
    2490 the $G$-band photometry reported by Gaia.  For each pixel, we
    2491 determine the histogram of these differences and calculate the median
    2492 and the 68\%-ile range.  In Figure~\ref{fig:gaia.photom}, these
    2493 values are plotted as a color scale. 
    2494 
    2495 The Galactic plane is clearly poorly matched between the two
    2496 photometry systems.  This may in part be due to the difficulty of
    2497 predicting $G$-band magnitudes for stars which are significantly
    2498 extincted: the $G$-band includes significant flux from the PS1
    2499 $z$-band which was not used in our transformation.  Many other large
    2500 scale feature in the median differences have structures similar to the
    2501 Gaia scanning pattern (large arcs and long parallel lines.  There are
    2502 also structures related to the PS1 exposure footprint.  These show up
    2503 as a mottling on the \approx 3 degree scale (e.g., lower right below
    2504 the Galactic plane).  The amplitude of the residual structures is
    2505 fairly modest.  The standard devition of the median difference values
    2506 is 7 millimagnitudes.  This number gives an indication of the overall
    2507 photometric consistency of both Gaia and PS1 and implies that the
    2508 systematic error floor for each survey is less than 7 millimags.
    2509 
    2510 % set Gr = -0.090 + gr*gi*0.229 + gi*(-0.207+gi*(gi*0.015 - 0.250)) + gr*(0.491+gr*(-0.021*gr - 0.052))
    2511 
    2512 %\begin{equation}
    2513 %G - r = -0.09 + 0.229(g-r)(g-r) + (g-i)((
    2514 
    2515 \begin{figure*}[htbp]
    2516   \begin{center}
    2517   \includegraphics[width=\hsize,clip]{{pics/gaia.astrom}.png}
    2518   \caption{\label{fig:gaia.astrom} Comparison with Gaia
    2519     astrometry. {\bf Left} Mean of PS1 - Gaia, {\bf Right} Standard
    2520     deviation of PS1 - Gaia.  The median value of the standard
    2521     deviations is $(\sigma_\alpha, \sigma_\delta) = (4, 3)$
    2522     milliarcseconds. }
    2523   \end{center}
    2524 \end{figure*}
    2525 
    2526 Figure~\ref{fig:gaia.astrom} shows a comparison between the Pan-STARRS
    2527 mean astrometry positions in $\alpha,\delta$ and the Gaia astrometry.
    2528 For this comparison, we have seleted all PS1 stars with Gaia
    2529 measurements with $14 < i < 19$ and with at least 10 total
    2530 measurements.  For Figure~\ref{fig:gaia.astrom}, we calculate the
    2531 difference between the position predicted by PS1 at the Gaia epoch
    2532 (using the proper motion and parallax fit) and the position reported
    2533 by Gaia.  For each pixel, we determine the histogram of these
    2534 differences in the R.A\. and DEC directions, and calculate the median
    2535 and the 68\%-ile range.  In Figure~\ref{fig:gaia.astrom}, these
    2536 values are plotted as a color scale.
    2537 
    2538 There is good consistency between the PS1 and Gaia astrometry.  There
    2539 are patterns from the Galactic plane (though not very strongly at the
    2540 bulge).  There are also clear features due to the PS1 exposure
    2541 footprint (ring structure on \approx 3 degree scales).  In the plots
    2542 of the scatter, there are patterns which are related to the Gaia
    2543 scanning rule.  These are presumably regions with relatively low
    2544 signal to noise in Gaia; they were also apparent in the plots of the
    2545 statisics of the per-exposure measurement residuals
    2546 (Figure~\ref{fig:allsky.astrom.sigma}.  The standard deviations of the
    2547 median differences are ($\sigma_\alpha, \sigma_\delta) = (4, 3)$
    2548 milliarcseconds.
    2549 
    2550 For a future data release, we will recalibrate the Pan-STARRS $3\pi$
    2551 astrometry using the Gaia DR2 release.  The addition of Gaia-measured
    2552 proper motions will obviate the need to correct for the Galactic rotation.
     2326For the initial PV3 analysis, we again used the 2MASS coordinates as
     2327an external astrometric reference.  After the DR1 object parameters
     2328were ingested into the PSPS database, the Gaia DR1 astrometry was
     2329released \citep{2016AA...595A...4L}.  This gave us the option to use
     2330the Gaia positions for the external astrometric reference.  We re-did
     2331the astrometric analysis and generated a Gaia-based astrometry table
     2332for the Pan-STARRS DR1.  For Pan-STARRS DR2, the average object
     2333coordinates are based on the analysis using the Gaia coordinates.  The
     2334Gaia DR1 coordinates used a fixed 2015 epoch.  Coordinates were
     2335propagated from that epoch to the epoch for each PS1 image as
     2336described above.
    25532337
    25542338\subsection{Object Astrometry}
     
    25742358were available for an object, {\em all} measurements for that object
    25752359are marked with the bit-flag \code{ID_MEAS_OBJECT_HAS_2MASS} or
    2576 \code{ID_MEAS_OBJECT_HAS_GaIA} as appropriate.  The Tycho 2.0
     2360\code{ID_MEAS_OBJECT_HAS_GAIA} as appropriate.  The Tycho 2.0
    25772361measurements were not included in this analysis and objects with Tycho
    25782362measurements are therefore not marked.
     
    27082492will be set for the object.
    27092493
     2494\subsection{Astrometry Calibration Quality}
     2495
     2496\begin{figure*}[htbp]
     2497  \begin{center}
     2498 \includegraphics[width=\hsize,clip]{{pics/allsky.astrom.pv3.3}.png}
     2499  \caption{\label{fig:allsky.astrom.sigma} Consistency of astrometry
     2500    measurements across the sky.  Each panel shows a map of the
     2501    standard deviation of astrometry residuals for stars in each
     2502    pixel.  The median value of the standard deviations across the sky
     2503    is $(\sigma_\alpha, \sigma_\delta) = (22, 23)$ milliarcseconds.
     2504    These values reflect the typical single-measurement errors for
     2505    bright stars.  See discussion regarding the astrometric flat which
     2506    is likely responsible for these elevated value. }
     2507  \end{center}
     2508\end{figure*}
     2509
     2510\begin{figure*}[htbp]
     2511  \begin{center}
     2512  \includegraphics[width=\hsize,clip]{{pics/astroflat.repair}.png}
     2513  \caption{\label{fig:astroflat.repair} Comparison of the
     2514    high-resolution astrometric flat-field images used for PV3.2
     2515    (left) and for PV3.3 (right).  These examples show the \gps-band
     2516    astrometric flat-field corrections for the $X$ direction as seen
     2517    in the focal plane coordinate system.  Note the elevated noise in
     2518    the PV3.2 image due to insufficient numbers of stars used in the analysis.
     2519}
     2520\end{center}
     2521\end{figure*}
     2522
     2523% numbers of stars used:
     2524%% mana: load.stars astroflat.20151205/astroflat.20151205.v1.Npt.fits
     2525%% filter g : 2591421 stars
     2526%% filter r : 3497036 stars
     2527%% filter i : 16241986 stars
     2528%% filter z : 7153595 stars
     2529%% filter y : 4509749 stars
     2530%% mana: load.stars astroflat.20170217/astroflat.20170217.Npt.fits
     2531%% filter g : 17590560 stars
     2532%% filter r : 31000135 stars
     2533%% filter i : 82648850 stars
     2534%% filter z : 62166619 stars
     2535%% filter y : 42867074 stars
     2536
     2537\begin{figure*}[htbp]
     2538  \begin{center}
     2539  \includegraphics[width=\hsize,clip]{{pics/allsky.histogram.astrom.compare}.png}
     2540  \caption{\label{fig:allsky.astro.histogram} Illustration of the
     2541    impact of the astrometric flat-field correction used for PV3.2 vs
     2542    PV3.3.  The blue histograms show the distribution of astrometric
     2543    residuals for bright stars from the PV3.2 analysis while the red
     2544    histograms show the distribution for the PV3.3 analysis.  The
     2545    median standard deviation for PV3.2 is 22 milliarcseconds in R.A.
     2546    (23 mas in Declination).  Using the higher signal-to-noise
     2547    flat-field correction images reduces the median values to 16 mas
     2548    for both R.A. and Declination directions in PV3.3.
     2549}
     2550\end{center}
     2551\end{figure*}
     2552
     2553% generate (or plot) astrometric flat-field images for DR2 (PV3.X)
     2554
     2555Figure~\ref{fig:allsky.astrom.sigma} shows the standard deviations of
     2556the mean residual astrometry in $(\alpha,\delta)$ for bright stars as
     2557a function of position across the sky based on the DR2 calibration.  For each
     2558pixel in these images, we selected all objects with $15 < i < 17$,
     2559with at least 3 measurements in $i$-band (to reject artifacts detected
     2560in a pair of exposures from the same night), with \code{PSF_QF} $>
     25610.85$ (to reject excessively-masked objects), and with $mag_{\rm PSF}
     2562- mag_{\rm Kron} < 0.1$ (to reject galaxies).  We then generated
     2563histograms of the difference between the object position predicted for
     2564the epoch of each measurement (based on the proper motion and parallax
     2565fit) and the observed position of that measurement, in both the Right
     2566Ascension and Declination directions (in linear arcseconds), for all
     2567stars in a given pixel in the images.  From these residual histograms,
     2568we can then determine the median and the 68\%-ile range to calculate a
     2569robust version of the standard deviation.  This represents the
     2570bright-end systematic error floor for a measurement from a single
     2571exposure.  The standard deviations are then plotted in
     2572Figure~\ref{fig:allsky.astrom.sigma}.  The median value of the
     2573standard deviations across the sky in both $(\sigma_\alpha,
     2574\sigma_\delta)$ is 16 milliarcseconds.
     2575
     2576The Galactic plane is clearly apparently in these images.  Like
     2577photometry, we attribute this to failure of the PSF fitting due to
     2578crowding.  The celestial North pole regions have somewhat elevated
     2579errors in both R.A. and DEC, with some specifc structures.  Some of
     2580these structures may be due to the larger typical seeing at these high
     2581airmass regions, but some are due to astrometric failures which stem
     2582from the reference catalog based on the PV2 analysis (see
     2583Section~\ref{sec:pole.problems} for further details).  Several
     2584features can be seen which appear to be an effect of the tie to the
     2585Gaia astrometry: the stripes near the center of the DEC image and the
     2586right side of the R.A. image.  The mesh of circular outlines one the 2
     2587degree scale is due to the outer edge of the focal plane where the
     2588astrometric calibration is poorly determined. 
     2589
     2590The DR1 astrometric calibration suffered from degraded astrometry due
     2591to a problem with the astrometric flat-field correction identified too
     2592late to be repaired for DR1.
     2593%
     2594The astrometric flat-field images used
     2595for that release had too few stars to measure the correction with
     2596sufficient signal-to-noise.  As a result, those corrections had
     2597significant pixel-to-pixel noise which can be seen in
     2598Figure~\ref{fig:astroflat.repair}.  As a result, the astrometric
     2599flat-field correction reduces systematic structures on large spatial
     2600scales, but at the expense of degrading the quality of individual
     2601measurements.  Only the $i$-band flat had sufficient signal-to-noise
     2602per pixel to avoid significantly increasing the per-measurement
     2603position errors.
     2604
     2605For DR2, we recalculated the astrometric flat-field correction using
     2606many more stars.  For the DR1 release, the number of stars per filter
     2607was (\grizy) = (2.6M, 3.5M, 16M, 7M, 4.5M), while for the DR2 release,
     2608the number of stars per filter was (\grizy) = (18M, 31M, 83M, 62M,
     260943M).  We also reduced the resolution of the astrometric flat-field,
     2610using $80 \times 80$ superpixels, rather than the $40 \times 40$
     2611superpixels used for DR1.  Because of the degraded astrometric
     2612flat-field correction, the median per-measurement error floor of DR1
     2613is \approx 22 mas, significantly worse than both DR2 and the earlier
     2614PV2 analysis.  Figure~\ref{fig:allsky.astro.histogram} shows
     2615histograms of the astrometric residual scatter across the sky for DR1
     2616and DR2, illustrating the improvement.
     2617
     2618% older version of this figure:
     2619% pv2_0 : /data/ipp060.0/eugene/pv2.astrom.20150126/astromap.20150127/dDsig.im.fits
     2620% pv2_1 : /data/ipp060.0/eugene/pv2.astrom.20150126/astromap.20150429/dDsig.im.fits
     2621
     2622% NOTE:
     2623% the pv2 versions used:  resize 1800 920; region 0 0 85 ait
     2624% the pv3 versions used:  resize 1800 950; region 180 0 90 ait
     2625
     2626% thus we cannot directly compare map pixels, without re-extracting the measurements
     2627% (we can do that if we decide it is needed to generate the best plots)
     2628
     2629% original version of figure: pv3.stats.20161202/allsky.astrom.sigma.png
     2630%   based on /data/kukui.3/eugene/pv3.stats.20161202/maps.measure/pv3.v1.*.sigma.fits
     2631%   based on /data/ipp094.0/eugene/pv3.stats.20161202/cdhist.measure/cdmerge.v1.dD.fits (& dR)
     2632%   plot script /data/kukui.3/eugene/pv3.stats.20161202/scatter.sh
     2633%   catdir /data/ipp094.0/eugene/pv3.cam.20150607/catdir.master (PV3.2)
     2634
     2635% regenerate using fits image in pv3.stats.20170413
     2636
    27102637\section{Discussion}
    27112638\label{sec:discussion}
     2639
     2640\subsection{Calibration Versions}
    27122641
    27132642The calibration of the PV3 DVO database required several iterations.
    27142643For completeness, we discuss these steps and their implications for
    27152644the DR1 and DR2 releases.
    2716 \begin{itemize}
    2717 
    2718 \item[PV3.0] The first calibrated PV3 database is identified as PV3.0.
     2645
     2646\paragraph{PV3.0}
     2647The first calibrated PV3 database is identified as PV3.0.
    27192648  This calibration predates the Gaia DR1 release and uses the 2MASS
    27202649  catalog as a reference.  After internal testing, an error in the
     
    27242653  with the wrong sign to the measurements.
    27252654
    2726 \item[PV3.1] After the above error was identified, the photometric
     2655\paragraph{PV3.1} After the above error was identified, the photometric
    27272656  flat-field correction was applied in the correct sense to the
    27282657  measurements and the average photometry was recalculated.  The
     
    27302659  (but see below regarding the mean positions).
    27312660
    2732 \item[PV3.2] The Gaia DR1 release motivated a recalibration of the
     2661\paragraph{PV3.2} The Gaia DR1 release motivated a recalibration of the
    27332662  astrometry using the Gaia DR1 position information, combined with
    27342663  photometric distance estimates and a model for the Galactic and
     
    27392668  release.
    27402669
    2741 \item[PV3.3] After the DR1 release, we identified a problem with the
     2670\paragraph{PV3.3} After the DR1 release, we identified a problem with the
    27422671  astrometric flat-field corrections (see
    27432672  Section~\ref{sec:astro.flat}): for all but the \ips\ filter, the
     
    27512680  noticable improvement in the astrometric scatter for bright stars.
    27522681
    2753 \item[PV3.4] Two errors were identified in the PV3.3 calibration
     2682\paragraph{PV3.4} Two errors were identified in the PV3.3 calibration
    27542683  before the DR2 release was completed.  First, we discovered that the
    27552684  repair applied to the photometric flat-field correction for PV3.1,
     
    27652694  these issue in the PV3.4 calibration of the DVO database.  This
    27662695  database was then used to generate the values in the DR2 PSPS
    2767   database tables.  \note{what about P2, those were done first, right?}
    2768 \end{itemize}
     2696  database tables.
     2697
     2698\subsection{Comparison to Gaia}
     2699
     2700After the full relative astrometry analysis was performed for the PV3
     2701database, the Gaia Data Release 1 became available
     2702\citep{2016AA...595A...2G,2016AA...595A...4L}.  This afforded us
     2703the opportunity to constrain the astrometry on the basis of the Gaia
     2704observations.  Gaia DR1 objects which are bright enough to have proper
     2705motion and parallax solutions are in general saturated in the PS1
     2706observations.  Thus, we are limited to using the Gaia mean positions
     2707reported for the fainter stars.  We extracted all Gaia sources not
     2708marked as a duplicate from the Gaia archive and generated a DVO
     2709database from this dataset.  We then merged the Gaia DVO into the PV3
     2710master DVO database.  We re-ran the complete relative astrometry
     2711analysis using Gaia as an additional measurement.  We applied the
     2712analysis described above, applying the estimated distances to
     2713determine preliminary proper motions.  The Gaia mean epoch is reported
     2714as 2015.0, so all Gaia measurements were assigned this epoch.  We
     2715wanted to ensure the Gaia measurements dominated the astrometric
     2716solutions, so we made the weight very high for the Gaia points:
     27171000$\times$ the nominal weight in the initial fits (to lock down the
     2718reference frame), decreasing to 100$\times$ the nominal weight for the
     2719last fits.  We also retained the 2MASS measurements in the analysis,
     2720but gave them somewhat lower weights than Gaia: while the 2MASS data
     2721does not have the accuracy of Gaia, the coverage is known to be quite
     2722complete, while the Gaia DR1 has clear gaps and holes.  Having 2MASS,
     2723even at a lower weight, helps to tile over those gaps.
    27692724
    27702725\begin{figure*}[htbp]
    27712726  \begin{center}
    2772   \includegraphics[width=\hsize,clip]{{pics/photom.pv3.3v4}.png}
    2773   \caption{\label{fig:photom.pv3.3v4} Sample comparison of PV3.3 and
    2774     PV3.4 photometry illustrating the impact of the issues identified
    2775     in the PV3.3 stack and warp photometry.  All figures use \ips-band
    2776     photometry.  The left panels use data from PV3.3 while the right
    2777     use PV3.4.  The top row shows the mean difference between the
    2778     average photometry from individual exposures (``chip'') and the
    2779     stack photometry using Kron magnitudes.  The middle row shows the
    2780     mean difference between the average photometry from individual
    2781     exposures (``chip'') and the average forced-warp photometry, again
    2782     using Kron magnitudes.  The bottom row shows the mean difference
    2783     between the average photometry from individual exposures
    2784     (``chip'') and the average forced-warp photometry, using PSF
    2785     magnitudes.  See Section~\ref{sec:discussion} for a description of
    2786     the calibration change in PV3.4.}
    2787 \end{center}
     2727  \includegraphics[width=\hsize,clip]{{pics/gaia.photom}.png}
     2728  \caption{\label{fig:gaia.photom} Comparison with Gaia
     2729    photometry. {\bf Left} Mean of PS1 - Gaia, {\bf Right} Standard
     2730    deviation of PS1 - Gaia.  For pixels with $|b| > 30$ and $\delta >
     2731    -30$, the standard deviation of the PS1 - Gaia mean values is 7
     2732    millimagnitudes, while the median of the standard deviations is 12
     2733    millimagnitudes.  The former is a statement about the consistency
     2734    of the Gaia and Pan-STARRS\,1 photometry, while the latter
     2735    reflects the combined bright-end errors for both systems.  }
     2736  \end{center}
    27882737\end{figure*}
    27892738
     2739Figure~\ref{fig:gaia.photom} shows a comparison between the Pan-STARRS
     2740photometry in $g,r,i$ and the Gaia photometry in the $G$-band.  To
     2741compare the PS1 photometry to the very broadband Gaia G filter, we
     2742have determined a transformation based on a 3rd order polynomial fit
     2743to $g-r$ and $g-i$ colors.  This transformation reproduces Gaia
     2744photometry reasonably well for stars which are not too red.  For a
     2745comparison, we have selected all PS1 stars with Gaia measurements
     2746meeting the following criteria: $14 < i < 19$, with at least 10 total
     2747measurements, within a modest color range $0.2 < g - r < 0.9$.  We
     2748also restricted to objects with $i_{\rm PSF} - i_{\rm Kron} < 0.1$,
     2749using the average $i$ magnitudes determined from the individual
     2750exposures. 
     2751
     2752For Figure~\ref{fig:gaia.photom}, we calculate the difference between
     2753the estimated $G$-band magnitude based on PS1 $g,r,i$ photometry and
     2754the $G$-band photometry reported by Gaia.  For each pixel, we
     2755determine the histogram of these differences and calculate the median
     2756and the 68\%-ile range.  In Figure~\ref{fig:gaia.photom}, these
     2757values are plotted as a color scale. 
     2758
     2759The Galactic plane is clearly poorly matched between the two
     2760photometry systems.  This may in part be due to the difficulty of
     2761predicting $G$-band magnitudes for stars which are significantly
     2762extincted: the $G$-band includes significant flux from the PS1
     2763$z$-band which was not used in our transformation.  Many other large
     2764scale feature in the median differences have structures similar to the
     2765Gaia scanning pattern (large arcs and long parallel lines.  There are
     2766also structures related to the PS1 exposure footprint.  These show up
     2767as a mottling on the \approx 3 degree scale (e.g., lower right below
     2768the Galactic plane).  The amplitude of the residual structures is
     2769fairly modest.  The standard devition of the median difference values
     2770is 7 millimagnitudes.  This number gives an indication of the overall
     2771photometric consistency of both Gaia and PS1 and implies that the
     2772systematic error floor for each survey is less than 7 millimags.
     2773
     2774% set Gr = -0.090 + gr*gi*0.229 + gi*(-0.207+gi*(gi*0.015 - 0.250)) + gr*(0.491+gr*(-0.021*gr - 0.052))
     2775
     2776%\begin{equation}
     2777%G - r = -0.09 + 0.229(g-r)(g-r) + (g-i)((
     2778
     2779\begin{figure*}[htbp]
     2780  \begin{center}
     2781  \includegraphics[width=\hsize,clip]{{pics/gaia.astrom}.png}
     2782  \caption{\label{fig:gaia.astrom} Comparison with Gaia
     2783    astrometry. {\bf Left} Mean of PS1 - Gaia, {\bf Right} Standard
     2784    deviation of PS1 - Gaia.  The median value of the standard
     2785    deviations is $(\sigma_\alpha, \sigma_\delta) = (4, 3)$
     2786    milliarcseconds. }
     2787  \end{center}
     2788\end{figure*}
     2789
     2790Figure~\ref{fig:gaia.astrom} shows a comparison between the Pan-STARRS
     2791mean astrometry positions in $\alpha,\delta$ and the Gaia astrometry.
     2792For this comparison, we have seleted all PS1 stars with Gaia
     2793measurements with $14 < i < 19$ and with at least 10 total
     2794measurements.  For Figure~\ref{fig:gaia.astrom}, we calculate the
     2795difference between the position predicted by PS1 at the Gaia epoch
     2796(using the proper motion and parallax fit) and the position reported
     2797by Gaia.  For each pixel, we determine the histogram of these
     2798differences in the R.A\. and DEC directions, and calculate the median
     2799and the 68\%-ile range.  In Figure~\ref{fig:gaia.astrom}, these
     2800values are plotted as a color scale.
     2801
     2802There is good consistency between the PS1 and Gaia astrometry.  There
     2803are patterns from the Galactic plane (though not very strongly at the
     2804bulge).  There are also clear features due to the PS1 exposure
     2805footprint (ring structure on \approx 3 degree scales).  In the plots
     2806of the scatter, there are patterns which are related to the Gaia
     2807scanning rule.  These are presumably regions with relatively low
     2808signal to noise in Gaia; they were also apparent in the plots of the
     2809statisics of the per-exposure measurement residuals
     2810(Figure~\ref{fig:allsky.astrom.sigma}.  The standard deviations of the
     2811median differences are ($\sigma_\alpha, \sigma_\delta) = (4, 3)$
     2812milliarcseconds.
     2813
     2814For a future data release, we will recalibrate the Pan-STARRS $3\pi$
     2815astrometry using the Gaia DR2 release.  The addition of Gaia-measured
     2816proper motions will obviate the need to correct for the Galactic rotation.
     2817
    27902818\section{Conclusion}
     2819
     2820\note{WRITE THIS}
    27912821
    27922822\acknowledgments
     
    28072837under Grant No. AST-1238877, the University of Maryland, and Eotvos
    28082838Lorand University (ELTE) and the Los Alamos National Laboratory.
    2809 
    2810 \note{colormaps by Peter Kovesi. Good Colour Maps: How to Design Them.
    2811 arXiv:1509.03700 [cs.GR] 2015.  add ref}
    2812 
    2813 
     2839Colormaps for Figures \ref{fig:photflat},
     2840\ref{fig:allsky.photom.sigma}, \ref{fig:photom.pv3.3v4},
     2841\ref{fig:astroflat.gri}, \ref{fig:astroflat.zy},
     2842\ref{fig:allsky.astrom.sigma}, and \ref{fig:astroflat.repair} from
     2843Peter Kovesi \citep[Good Colour Maps: How to Design Them.][]{2015arXiv150903700K}.
    28142844
    28152845\bibliographystyle{apj}
    2816 % \bibliography{lib}{}
    2817 \input{calibration.bbl}
     2846\bibliography{lib}{}
     2847% \input{calibration.bbl}
    28182848
    28192849\end{document}
Note: See TracChangeset for help on using the changeset viewer.