IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41316 for trunk


Ignore:
Timestamp:
Mar 30, 2020, 1:23:46 PM (6 years ago)
Author:
eugene
Message:

addressing referee comments

File:
1 edited

Legend:

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

    r41312 r41316  
    4545\def\Princeton{2}
    4646\def\DUR{3}
    47 \def\CfA{2}
     47\def\MPIA{4}
     48\def\CfA{5}
    4849
    4950% This example has a first author from UH:
     
    6061L. Denneau,\altaffilmark{\IfA}
    6162P.~W. Draper,\altaffilmark{\DUR}
     63D. Farrow,\altaffilmark{\DUR,\MPIA}
    6264R. Jedicke,\altaffilmark{\IfA}
    6365K. W. Hodapp,\altaffilmark{\IfA}
     
    8688% \altaffiltext{\USNO}{US Naval Observatory, Flagstaff Station, Flagstaff, AZ 86001, USA}
    8789% \altaffiltext{\JHU}{Department of Physics and Astronomy, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218, USA}
    88 % \altaffiltext{\MPIA}{Max Planck Institute for Astronomy, K\"onigstuhl 17, D-69117 Heidelberg, Germany}
     90\altaffiltext{\MPIA}{Max Planck Institute for Astronomy, K\"onigstuhl 17, D-69117 Heidelberg, Germany}
    8991\begin{abstract}
    9092
     
    105107\keywords{methods: data analysis -- Surveys:\PSONE -- techniques: image processing -- techniques: photometric}
    106108
    107 \note{add Danny Farrow to author list}
    108 
    109109\section{Introduction}
    110110\label{sec:intro}
     
    155155for hazardous asteroids, funded by the NASA NEO Program. Additional
    156156partners collaborate with the Pan-STARRS team to harvest the transient
    157 sources such supernovae and graviational wave counterparts
    158 \note{REFS}.  A second Pan-STARRS telescope (PS2), generally matching
    159 the PS1 design \citep{Morgan2012} has since been constructed and has
    160 been producing science results since early 2018.
    161 
    162 %The Processing Version 3 (PV3) reduction represents the third full
     157sources such supernovae and graviational wave counterparts.  A second
     158Pan-STARRS telescope \citep[PS2][]{chambers2017,chambers2020},
     159generally matching the PS1 design \citep{Morgan2012} has since been
     160constructed and has been producing science results since early 2018.
     161
    163162Pan-STARRS produced its first large-scale public data release, Data
    164163Release 1 (DR1) on 16 December 2016.  DR1 contains the results of the
     
    176175measurements from all of the individual exposures, and includes an
    177176improved \textmod{astrometric calibration as well as improvements to the
    178   photometric calibration of the stack and 'forced warp' measurements
     177  photometric calibration of the stack and `forced warp' measurements
    179178from} the PV3 processing of that dataset.
     179
     180\textadd{The Pan-STARRS public data releases are hosted by the {\em
     181    Barbara A. Mikulski Archive for Space Telescopes} (MAST) at the
     182  Space Telescope Science Institute (STScI).  MAST provides access to
     183  the image data products and a hierachical database of measurements
     184  using a system developed specifically for the Pan-STARRS dataset.
     185  Development of this database systems was the product of a
     186  collaboration between the Pan-STARRS Project and Alex Szalay's
     187  database development group at The Johns Hopkins University (JHU)
     188  \citep{2008AIPC.1082..352H}.  The resulting system, called the
     189        {\em Published Science Products Subsystem}, or PSPS
     190        \citep{Heasley2006}, was initially used within the Pan-STARRS
     191        Science Consortium for large-scale data access.  A duplicate
     192        PSPS installation was created at MAST for the DR1 and DR2
     193        public releases.}
    180194
    181195This is the fourth in a series of seven papers describing the
     
    184198source detection and photometry, including point-spread-function and
    185199extended source model fitting, and the techniques for ``forced''
    186 photometry measurements.  \textadd{The same analysis software is used
     200photometry measurements.  \textadd{The same analysis software, called \ippprog{psphot}, is used
    187201  for individual images, image stacks, and difference images.}
    188202The software described here was used with a
     
    191205analysis of the Medium Deep Survey data, though with a different
    192206software version and some modifications of
    193 the analysis parameters to better suite the longer exposures.}
     207the analysis parameters to better suite the longer exposures.  This
     208program as well as the rest of the Pan-STARRS Image Processing
     209Pipeline (IPP) software suite is available for download from \url{http:ipp.ifa.hawaii.edu}}.
     210
     211\note{Generate a tarball of just the programs (skip certain directories)}
    194212
    195213%Chambers et al. 2017 (Paper I)
     
    215233and resulting image products and their properties.
    216234
    217 
    218235%Magnier et al. 2017 (Paper IV)
    219236%Pan-STARRS Pixel Analysis : Source Detection
     
    226243describe the final calibration process, and the resulting photometric and astrometric quality. 
    227244
    228 
    229245%Flewelling et al. 2017 (Paper VI)
    230246%Pan-STARRS 1 Database and Data Products
    231247\citet[][Paper VI]{flewelling2017}
    232 describe  the details of the resulting catalog data and its organization in the Pan-STARRS database.
     248describe  the details of the resulting catalog data and its
     249organization in the Pan-STARRS database system, PSPS.
    233250
    234251%Huber et al. 2017 (Paper VII)
     
    286303efficient.  Not only is it necessary to make a careful measurement of
    287304the flux of individual sources, it is also critical to characterize
    288 the image point-spread-function, and its variations across the field
     305the image point spread function (PSF), and its variations across the field
    289306and from image to image.  Since comparisons between images must be
    290307reliable, the measurements must be stable for both photometry and
     
    501518\end{itemize}
    502519
    503 \note{get a better example of the psphot accuracy achieved}
     520\note{Discuss the psphot photometry accuracy and the ubercal solution,
     521  etc.  mention Paper V}
    504522
    505523\textadd{The success of the \ippprog{psphot} implementation is meeting
     
    520538
    521539\item {\bf Initial Source Detection} Smooth, find peaks, measure basic
    522   properties.
     540  properties with focus on the point sources to measure the PSF.
    523541
    524542\item {\bf PSF Determination} Select PSF candidates, perform model
     
    562580
    563581\begin{table*}
    564 \caption{\label{tab:measurements} \nocode{psphot} measurements performed} % \vspace{-0.5cm}
     582\caption{\label{tab:measurements} Measurements performed by
     583  \nocode{psphot}, and whether performed in each of the 4 IPP analysis
     584  stages.  The analysis is described in this article in the listed Sections. } % \vspace{-0.5cm}
    565585\begin{center}
    566586\footnotesize
     
    569589\hline
    570590{\bf Measurement} & {\sc \bf CHIP} & {\sc \bf STACK} & {\sc \bf FORCED
    571   WARP} & {\sc \bf DIFF} & {\bf Section} & {\bf Which} \\
     591  WARP} & {\sc \bf DIFF} & {\bf Section} & {\bf Details} \\
    572592\hline
    573593  Background Subtraction     & Y & Y & Y & N$^1$ & \ref{sec:image.preparation}      & N/A \\
    574   Peaks                      & Y & Y & N & Y     & \ref{sec:peaks}                  & All \\
    575   Footprints                 & Y & Y & N & Y     & \ref{sec:footprints}             & All \\
    576   Moments                    & Y & Y & Y & Y     & \ref{sec:moments}                & All \\
     594  Peaks                      & Y & Y & N & Y     & \ref{sec:peaks}                  & All detections \\
     595  Footprints                 & Y & Y & N & Y     & \ref{sec:footprints}             & All detections \\
     596  Moments                    & Y & Y & Y & Y     & \ref{sec:moments}                & All detections \\
    577597  PSF Model                  & Y & Y & Y & N$^2$ & \ref{sec:PSF.Model}              & Uses bright, unsat. stars \\
    578598  Bright Star Profile        & Y & Y & N & Y     & \ref{sec:very.bright.star}       & Saturated Stars \\
    579   Radial Profiles v1         & Y & Y & N & Y     & \ref{sec:radial.profile}         & All \\
    580   Kron Fluxes                & Y & Y & Y & Y     & \ref{sec:kron.mags}              & All \\
    581   Source-Size Tests          & Y & Y & N & Y     & \ref{sec:source.size}            & All \\
     599  Radial Profiles v1         & Y & Y & N & Y     & \ref{sec:radial.profile}         & All detections \\
     600  Kron Fluxes                & Y & Y & Y & Y     & \ref{sec:kron.mags}              & All detections \\
     601  Source-Size Tests          & Y & Y & N & Y     & \ref{sec:source.size}            & All detections \\
    582602  Non-Linear PSF Fits        & Y & Y & N & N     & \ref{sec:nonlinear.psf.model}    & $S/N > 20$ \\
    583603  Unconvolved Galaxy Model   & Y & Y & N & N     & \ref{sec:nonlinear.galaxy.model} & $S/N > 20$, extended \\
    584604  Unconvolved Streak Model   & N & N & N & Y     & \ref{sec:nonlinear.galaxy.model} & $S/N > 20$, extended \\
    585   Linear PSF Fits            & Y & Y & Y & Y     & \ref{sec:faint.psf.model}        & All \\
     605  Linear PSF Fits            & Y & Y & Y & Y     & \ref{sec:faint.psf.model}        & All detections \\
    586606  Radial Profiles v2         & Y & Y & N & Y     & \ref{sec:radial.profile.v2}      & Gal. Latitude Cut \\
    587607  Petrosian Fluxes           & N & Y & Y & N     & \ref{sec:petrosian}              & Gal. Latitude Cut \\
    588608  Convolved Galaxy Models    & N & Y & N & N     & \ref{sec:galaxy.conv.fit}        & Gal. Latitude Cut, mag cut \\
    589   Fixed Aperture Photometry  & N & Y & Y & N     & \ref{sec:fixed.aperture.photom}  & All \\
    590   Convolved, Fixed Apertures & N & Y & N & N     & \ref{sec:fixed.aperture.photom}  & All \\
    591   Aperture Corrections       & Y & Y & Y & N     & \ref{sec:aperture.correction}    & All \\
    592   Forced PSF Fluxes          & N & N & Y & N     & \ref{sec:psf.forced.fit}         & All \\
    593   Forced Galaxy Models       & N & N & Y & N     & \ref{sec:galaxy.forced.fit}      & Have Stack Galaxy Models \\
    594   Lensing Parameters         & N & Y & Y & N     & \ref{sec:lensing.params}         & All \\
     609  Fixed Aperture Photometry  & N & Y & Y & N     & \ref{sec:fixed.aperture.photom}  & All detections \\
     610  Convolved, Fixed Apertures & N & Y & N & N     & \ref{sec:fixed.aperture.photom}  & All detections \\
     611  Aperture Corrections       & Y & Y & Y & N     & \ref{sec:aperture.correction}    & All detections \\
     612  Forced PSF Fluxes          & N & N & Y & N     & \ref{sec:psf.forced.fit}         & All detections \\
     613  Forced Galaxy Models       & N & N & Y & N     & \ref{sec:galaxy.forced.fit}      & Requires stack galaxy models \\
     614  Lensing Parameters         & N & Y & Y & N     & \ref{sec:lensing.params}         & All detections \\
    595615\hline
    596616\multicolumn{5}{l}{$^1$ Background subtraction is performed by {\tt ppSub} before calling {\tt psphot}} \\
     
    609629these two fields.  These informational and warning bits are described
    610630in more detail later in this article.
     631
    611632%
    612633Table~\ref{tab:det_flag_values} lists the flags recorded in the output
     
    622643output field \ippmisc{FLAGS2}.  When data from \ippprog{psphot} is
    623644loaded into a DVO database \citep{magnier2017.calibration}, these
    624 values are not currently loaded, but they are exposed in PSPS in the fields
     645values are stored in the field \ippdbtable{Measure.photFlags2}, and they are exposed in PSPS in the fields
    625646\ippdbtable{Detection.infoFlag2}, \ippdbtable{StackObjectThin.XinfoFlag2} (where
    626647\ippdbtable{X} is one of {$grizy$}), and
     
    628649
    629650\begin{table*}
    630 \caption{\label{tab:det_flag_values} \nocode{psphot} Detection Flag Values \#1} % \vspace{-0.5cm}
    631651\begin{center}
     652\caption{\label{tab:det_flag_values}
     653Detection Flag
     654Values \#1 reported by \texttt{psphot}. These are saved in output catalogs as the field
     655\texttt{FLAGS}, in the DVO database as
     656\textit{Measure.photFlags}, and in the public database as
     657\textit{Detection.infoFlag},
     658\textit{StackObjectThin.XinfoFlag} (where \textit{X} is one
     659of {$grizy$}), and \textit{ForcedWarpMeasurement.FinfoFlag}.}
    632660\footnotesize
    633661\begin{tabular}{lrl}
     
    636664{\bf Flag Name} & {\bf Flag Value} & {\bf Description} \\
    637665\hline
    638  PM\_SOURCE\_MODE\_PSFMODEL            & 0x00000001 & Source fitted with a psf model (linear or non-linear) \\
     666 PM\_SOURCE\_MODE\_PSFMODEL            & 0x00000001 & Source fitted with a PSF model (linear or non-linear) \\
    639667 PM\_SOURCE\_MODE\_EXTMODEL            & 0x00000002 & Source fitted with an extended-source model \\
    640668 PM\_SOURCE\_MODE\_FITTED              & 0x00000004 & Source fitted with non-linear model (PSF or EXT; good or bad) \\
    641669 PM\_SOURCE\_MODE\_FAIL                & 0x00000008 & Fit (non-linear) failed (non-converge, off-edge, run to zero) \\
    642  PM\_SOURCE\_MODE\_POOR                & 0x00000010 & Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) \\
    643  PM\_SOURCE\_MODE\_PAIR                & 0x00000020 & Source fitted with a double psf \\
     670 PM\_SOURCE\_MODE\_POOR                & 0x00000010 & Fit succeeds, but low-S/N or high chi-square \\
     671 PM\_SOURCE\_MODE\_PAIR                & 0x00000020 & Source fitted with a double PSF \\
    644672 PM\_SOURCE\_MODE\_PSFSTAR             & 0x00000040 & Source used to define PSF model \\
    645673 PM\_SOURCE\_MODE\_SATSTAR             & 0x00000080 & Source model peak is above saturation \\
     
    675703
    676704\begin{table*}
    677 \caption{\label{tab:det_flag2_values} \nocode{psphot} Detection Flag Values \#2} % \vspace{-0.5cm}
     705\caption{\label{tab:det_flag2_values}
     706Detection Flag Values \#2 reported by \nocode{psphot}.
     707These are saved in output catalogs as the field
     708\texttt{FLAGS2}, in the DVO database as
     709\textit{Measure.photFlags2}, and in the public database as
     710\textit{Detection.infoFlag2},
     711\textit{StackObjectThin.XinfoFlag2} (where \textit{X} is one
     712of $grizy$), and \textit{ForcedWarpMeasurement.FinfoFlag2}.
     713}
    678714\begin{center}
    679715\footnotesize
     
    772808sources.  Table~\ref{tab:mask_values} lists the 16 bit values used for
    773809PS1 mask images, along with their description \citep[see][for
    774   additional information]{waters2017}.
     810  additional information]{waters2017}. 
     811
     812{\bf An important point to note is that \ippprog{psphot} does not
     813  attempt to interpolate or replace bad pixel values in the images
     814  before processing.  The GPC1 images have quite extensive masking due
     815  to both defects and natural gaps between detectors and amplifier
     816  regions.  On average, roughly 71\% of the full useable field-of-view
     817  is covered with valid pixels (See Paper III for more discussion).
     818  Any attempt to interpolate bad pixels would be quickly overwhelmed
     819  by these extensive regions.  Rather than attempt to fill in the bad
     820  pixels, we rely in the PS1 PV3 processing on the fact that regions
     821  on the sky were observed many times.  Thus, it should be noted that
     822  model-fitting measurements (which can naturally ignore masked
     823  pixels) should generally be more reliable than aperture-like
     824  measurements for single exposures.  Aperture-like measurements from
     825  the stacks do not suffer from this masking issue. See also the
     826  discussion of the \ippmisc{PSF_QF} and \ippmisc{PSF_QF_PERFECT}
     827  parameters for judging the impact of masking on a particular source
     828  (Section~\ref{sec:psf.model.choice}).}
    775829
    776830\begin{table*}
    777 \caption{\label{tab:mask_values} \nocode{psphot} / GPC1 Mask Image Pixel Values} % \vspace{-0.5cm}
     831
     832\caption{\label{tab:mask_values} Pixel values for input GPC1 mask
     833  images used by \nocode{psphot}.  The table gives the bit value used
     834  to mark the listed effects.  Bits marked as `dynamic' are set for
     835  each image based on the contents, such as the locations of bright
     836  stars.  Bits marked as `suspect' represent effects which do not
     837  definitely affect the photometry, but users should be careful.  The
     838  mask image headers also list these values.} % \vspace{-0.5cm}
    778839\begin{center}
    779840\footnotesize
     
    906967%% is there a ref I can use for the optimal detection? see SDSS docs?
    907968
     969The initial source detection step is focused on finding and
     970identifying the brighter point sources.  The goals are two-fold: 1) to
     971select sources which can be used to model the PSF and 2) to subtract
     972the brighter sources so that fainter sources may be found throughout
     973the image .
     974
    908975The sources are initially detected by finding the location of local
    909976peaks in the image.  The flux and variance images are smoothed with a
     
    9471014\[ f(x,y) = C_{00} + C_{10}x + C_{01} y + C_{11} x y + C_{20} x^2 + C_{02} y^2 \]
    9481015
    949 and write the Chi-Square equation:
     1016and write the chi-square equation:
    9501017
    9511018\[ \chi^2 = \sum_{i,j} (F_{i,j} - f(x,y))^2 / \sigma_{i,j}^2 \]
     
    10041071  \caption{\label{fig:peaks} Illustration of peak finding and culling peaks within a
    10051072    footprint.  Insignificant peaks within the footprint of a brighter
    1006     peak are ignored in further processing. \note{NOTE that the
    1007       diagram is a 1D rep of a 2D path.}}
     1073    peak are ignored in further processing. Note that this 1D
     1074    illustration is representative of the full 2D path which may be
     1075    followed from one peak to the next.}
    10081076  \end{center}
    10091077\end{figure}
     
    10261094
    10271095For any peak which is not the brightest peak in that footprint it is
    1028 possible to reach the brightest peak by following a sequence of the highest valued
    1029 pixels between the two peaks.  The lowest pixel along this
    1030 \textadd{(potentially meandering)} path is the
    1031 {\em key col} for this peak (as used in topographic descriptions of a
    1032 mountain).  If the key col for a given peak is less than
    1033 \code{FOOTPRINT_CULL_NSIGMA_DELTA} (4.0 for PV3) sigmas below the
    1034 peak of interest, the peak is considered to be {\em locally
    1035   insignificant} and removed from the list of possible detections (see
    1036 Figure~\ref{fig:peaks}).  \textadd{If more than one such path is possible, the
    1037 path with the highest key col is used for this test.}  In the vicinity of a saturated star, the
    1038 rule is somewhat more aggressive as the flat-topped or structured
    1039 saturated top of a bright star may appear as multiple peaks with
    1040 highly significant cols between them.  However, this is an artifact of
    1041 the proximity to saturation.  Sources for which the peak is greater
    1042 than 50\% of the saturation value require the col to also be a fixed
    1043 fraction (5\%) of the saturation below the peak to avoid being marked
    1044 as locally insignificant.
     1096possible to reach the brightest peak by following a sequence of the
     1097highest valued pixels between the two peaks.  The lowest pixel along
     1098this \textadd{(potentially meandering)} path is the {\em key col} for
     1099this peak (as used in topographic descriptions of a mountain).  If the
     1100key col for a given peak is less than
     1101\code{FOOTPRINT_CULL_NSIGMA_DELTA} (4.0 for PV3) sigmas below the peak
     1102of interest, the peak is considered to be {\em locally insignificant}
     1103and removed from the list of possible detections (see
     1104Figure~\ref{fig:peaks}).  \textadd{If more than one such path is
     1105  possible, the path with the highest key col is used for this test.}
     1106In the vicinity of a saturated star, the rule is somewhat more
     1107aggressive as the flat-topped or structured saturated top of a bright
     1108star may appear as multiple peaks with highly significant cols between
     1109them.  However, this is an artifact of the proximity to saturation.
     1110Sources for which the peak is greater than 50\% of the saturation
     1111value require the col to also be a fixed fraction (5\%) of the
     1112saturation below the peak to avoid being marked as locally
     1113insignificant.
    10451114
    10461115Sometimes it is useful to know if a source has a near neighbor which
     
    10641133\begin{figure}[htbp]
    10651134  \begin{center}
    1066   \includegraphics[width=0.95\hsize]{{\picdir/FWHM.smooth.trend.ps1}.\plotext}
     1135  \includegraphics[width=0.95\hsize]{{\picdir/FWHM.smooth.trend.v1.ps1}.\plotext}
    10671136  \caption{\label{fig:moments.window} Example of the biases
    10681137    encountered when measuring the second moments.  A simulated image
     
    10881157Once a collection of peaks has been identified, a number of basic
    10891158properties of the sources related to the first, second, and higher
    1090 moments are measured.  Below, the second moments are used to select
    1091 candidate stellar sources to be used in modeling the PSF.
     1159moments are measured.  \textmod{These moments can be used for a crude
     1160  classification of the sources.  As discussed below, the second
     1161  moments are used to select candidate stellar sources to be used in
     1162  modeling the PSF and the exclude `cosmic rays' and extended sources.
     1163  The radial moment is used in the measurement of the Kron magnitudes \citep{1980ApJS...43..305K}.
     1164  The higher-order moments are provided primarily for image quality
     1165  diagnostics.}
    10921166
    10931167In order to measure the moments, it is necessary to define an
     
    11881262centroid is used to center the window function.
    11891263
     1264\textadd{The motivation of measuring these higher order moments was to
     1265  select exposures with image quality problems.  For example, trefoil
     1266  caused by errors in the collimation and alignment can in principle
     1267  be detected with the third-order moments.  In our experience, these
     1268  statistics can be used to select some images with such problems, but
     1269  we have not been able to use these values to exclude poor images
     1270  from the data processing.  If we were to reject images based on
     1271  these moments, we would reject too many images with image quality
     1272  issues that are not so poor as to preclude a useful analysis.  A
     1273  future machine-learning based analysis starting with these moments
     1274  might potentially provide a better rejection statistic, but such
     1275  work is beyond the scope of this article.}
     1276
    11901277For sources with peak flux above the saturation limit, the moments are
    11911278generally poorly measured if the aperture defined by $\sigma_w$ is
     
    12191306$M_r$ and $M_h$ as defined below, are calculated:
    12201307\begin{eqnarray}
     1308\label{eqn:first.radial.moment}
    12211309M_r & = & \frac{1}{S} \sum_i (f_i - s_i)r_i \\
    12221310M_h & = & \frac{1}{S} \sum_i (f_i - s_i)\sqrt{r_i}
     
    12261314
    12271315With the first radial moment, we can calculate a preliminary Kron
    1228 radius and magnitude.  The Kron radius \citep{1980ApJS...43..305K} is
    1229 defined the be 2.5$\times$ the first radial moment.  The Kron flux is
    1230 the sum of (sky-subtracted) pixel fluxes within the Kron radius.  We
    1231 also calculate the flux in two related annular apertures: the Kron
    1232 inner flux is the sum of pixel values for the annulus $R_1 < r < 2.5
    1233 R_1$, while the Kron outer flux is the sum of pixel values for $2.5
    1234 R_1 < r < 4 R_1$.  The first radial moment is limited at the low and
    1235 high ends by $R_{\rm min} < M_r < R_{\rm max}$ where $R_{\rm min}$ is
    1236 the first radial moment of the PSF stars, or $0.75\sigma_w$ if that
    1237 cannot be determined.  $R_{\rm max}$ is set to the size of the moments
    1238 aperture, $4\sigma_w$.  These Kron measurements are performed for all
    1239 sources with a valid set of moments.  At this stage, the measurement
    1240 of the Kron parameters are preliminary since the aperture has been
    1241 chosen as a fixed size relative to the size of the PSF.  At a later
    1242 stage, higher-quality Kron parameters appropriate to galaxies are
    1243 measured with more care paid to the exact aperture used
    1244 (Section~\ref{sec:kron.mags}).
     1316radius and magnitude.  \textadd{Kron magnitudes are provided as an option for
     1317galaxy photometry.  In addition, the comparison of Kron and PSF
     1318magnitudes is useful as a star-galaxy separator.} The Kron radius
     1319\citep{1980ApJS...43..305K} is defined the be 2.5$\times$ the first
     1320  radial moment.  The Kron flux is the sum of (sky-subtracted) pixel
     1321  fluxes within the Kron radius.  We also calculate the flux in two
     1322  related annular apertures: the Kron inner flux is the sum of pixel
     1323  values for the annulus $R_1 < r < 2.5 R_1$, while the Kron outer
     1324  flux is the sum of pixel values for $2.5 R_1 < r < 4 R_1$.  The
     1325  first radial moment is limited at the low and high ends by $R_{\rm
     1326    min} < M_r < R_{\rm max}$ where $R_{\rm min}$ is the first radial
     1327  moment of the PSF stars, or $0.75\sigma_w$ if that cannot be
     1328  determined.  $R_{\rm max}$ is set to the size of the moments
     1329  aperture, $4\sigma_w$.  These Kron measurements are performed for
     1330  all sources with a valid set of moments.  At this stage, the
     1331  measurement of the Kron parameters are preliminary since the
     1332  aperture has been chosen as a fixed size relative to the size of the
     1333  PSF.  At a later stage, higher-quality Kron parameters appropriate
     1334  to galaxies are measured with more care paid to the exact aperture
     1335  used (Section~\ref{sec:kron.mags}).
    12451336
    12461337% $\sigma_w$ is saved as MOMENTS_GAUSS_SIGMA
     
    12531344\label{sec:Source.Model}
    12541345
    1255 The point-spread-function (PSF) of an image describes the shape of all
     1346The point spread function (PSF) of an image describes the shape of all
    12561347unresolved sources in the image.  In a typical wide-field image, the
    12571348shape of unresolved sources varies as a function of position in the
     
    12701361elliptical Gaussian:
    12711362\begin{eqnarray}
     1363\label{eqn:2d.gaussian}
    12721364f(x,y) & = & I_o e^{-z} + S  \\
    12731365    z  & = & \frac{x^2}{2\sigma_x^2} + \frac{y^2}{2\sigma_y^2} + \sigma_{\rm xy} x y \\
     
    13601452  \begin{center}
    13611453  \includegraphics[width=\hsize]{{\picdir/radial.profiles}.\plotext}
    1362   \caption{\label{fig:radial.profiles} Radial profiles of stellar images from PS1.  These two
    1363     profiles illustrate the radial trend of the PS1 PSFs for a star
    1364     with FWHM 0.9 arcsec (red) and 2.2 arcsec (blue).  The black line
    1365     shows the PSF model with radial trend of the form $(1 + \kappa r^2 + r^{3.33})^{-1}$.}
     1454
     1455  \caption{\label{fig:radial.profiles} Radial profiles of stellar
     1456    images from PS1.  These two profiles illustrate the radial trend
     1457    of the PS1 PSFs for a star with FWHM 0.9 arcsec (red) and 2.2
     1458    arcsec (blue).  The red and blue points are individual pixel
     1459    values.  The black line shows the PSF model with radial trend of
     1460    the form $(1 + \kappa r^2 + r^{3.33})^{-1}$.}
     1461
    13661462  \end{center}
    13671463\end{figure}
     
    14791575model, allowing all of the parameters (PSF and independent) to vary in
    14801576the fit.  The software uses the Levenberg-Marquardt minimization
    1481 technique \citep{1992nrca.book.....P,Madsen} for the non-linear fitting.  Non-linear
     1577technique \citep[e.g.,][]{1992nrca.book.....P,Madsen} for the non-linear fitting.  Non-linear
    14821578fitting can be very computationally intensive, particularly if the
    14831579starting parameters are far from the minimization values.  The first
     
    14851581shape parameters for the PSF models.  Any sources which fail to
    14861582converge in the fit are flagged as invalid.
     1583
     1584{\bf
     1585To generate the initial guess, the second moments are converted to the equivalent sigma values for a
     15862D elliptical Gaussian contour using the following transformations
     1587inspired by \cite{sextractor,1980JBIS...33..323S}. 
     1588First, we calculate the sigma values in the major ($\sigma_a$) and
     1589minor ($\sigma_b$) axis directions, along with the position angle
     1590$\theta$ from the moments using:
     1591\begin{eqnarray}
     1592\theta   & = & \frac{1}{2} \arctantwo (2 M_{xy}, g_2) \\
     1593\sigma_a & = & \sqrt{\frac{g_1 + g_3}{2}} \\
     1594\sigma_b & = & \sqrt{\frac{g_1 - g_3}{2}}
     1595\end{eqnarray}
     1596where the function $\arctantwo (y,x)$ returns the arctangent in the
     1597proper quadrant (e.g,. as implemented by the \code{atan2(y,x)}
     1598function in C) and the intermediate values $g_1$, $g_2$, $g_3$ are given by:
     1599\begin{eqnarray}
     1600g_1 & = & M_{xx} + M_{yy} \\
     1601g_2 & = & M_{xx} - M_{yy} \\
     1602g_3 & = & \sqrt{g_2^2 + 4 M_{xy}^2}
     1603\end{eqnarray}
     1604Since the moments may be noisy, the calculated value of $\sigma_b$ can
     1605be numerically invalid if $g_3 > g_1$, a situation which is especially
     1606likely for highly ellongated sources.  We avoid this situation by
     1607limiting the axial ratio to a maximum of 20 (setting $\sigma_b$ to
     1608$\sigma_a / 20$ if the expected axial ratio would be greater than this
     1609limit).  The selected value of 20 is somewhat ad-hoc, chosen based on
     1610failures in real images.  A more careful examination of the trade-off
     1611space would be worthwhile in the future.
     1612
     1613With $\sigma_a$, $\sigma_b$, $\theta$ in hand, we can now transform
     1614these values to the parameters of our fits, $\sigma_x$, $\sigma_y$,
     1615$\sigma_{\rm xy}$ (Eqn~\label{eqn:2d.gaussian} above).  This transformation
     1616can be determined by rotating the 2D Gaussian equation, yielding:
     1617\begin{eqnarray}
     1618\sigma_x^{-2}  & = & \sigma_a^{-2} \cos^2 \theta + \sigma_b^{-2}\sin^2 \theta \\
     1619\sigma_y^{-2}  & = & \sigma_b^{-2} \cos^2 \theta + \sigma_a^{-2}\sin^2 \theta \\
     1620\sigma_{\rm xy} & = & \frac{1}{2} \sin (2 \theta) (\sigma_b^{-2} - \sigma_a^{-2})
     1621\end{eqnarray}
     1622In fact, since the calculated second moments have been measured with a
     1623window function applied (see discussion in Section~\ref{sec:moments}), we instead
     1624use the measured value of $M_r$ (Eqn~\ref{eqn:first.radial.moment}), the first
     1625radial moment as the major axis size for the Gaussian ($\sigma_a$), retaining
     1626the position angle and axial ratio from the calculation above.  We use
     1627these guess parameters for all version of the PSF analytical models,
     1628despite the fact that for the versions which are not approximations of
     1629Gaussians these guess values will be systematically incorrect. 
     1630It would be worthwhile in the future to tweak the guesses for
     1631the different model version to speed up the convergence.
     1632}
     1633
     1634% https://www.astromatic.net/pubsvn/software/sextractor/trunk/doc/sextractor.pdf
    14871635
    14881636For the resulting collection of source model parameters, the
     
    15111659\begin{table}
    15121660\caption{\label{tab:psf.order.nstars} Minimum number of stars required
    1513   for a given order of the PSF 2D variations.} % \vspace{-0.5cm}
     1661  for a given order of the PSF 2D variations, or for the given number of grid cells.} % \vspace{-0.5cm}
    15141662\begin{center}
    15151663\begin{tabular}{llll}
     
    15731721\ippdbtable{Detection.apFillF}.
    15741722
    1575 When the PSF and aperture photometry for a source is measured, two
    1576 additional quantities are measured which are useful to assess the
    1577 quality of the measurements.  First, the mask image is examined and the
    1578 number of unmasked pixels is summed, weighted by the normalized PSF
    1579 model.  The resulting quantity, \code{PSF_QF} has a value between 0.0
    1580 (totally masked) and 1.0 (totally unmasked).  Elsewhere in the IPP
    1581 system, we use this value to filter out detections which are
    1582 unreliable due to the masking.  For a generous cut, leaning toward
    1583 completeness at the cost of some lower quality measurements,
    1584 \code{PSF_QF} $> 0.85$ is used in some contexts; in other cases, we
    1585 require \code{PSF_QF} $> 0.95$ to ensure a high-quality measurement
    1586 \citep[see for example the calculation of average photometry
    1587   in][]{magnier2017.calibration}.  The second quantity is related to
    1588 the first: \code{PSF_QF_PERFECT} uses all mask values to assess the
    1589 quality factor, while \code{PSF_QF} uses only the ``bad'' mask bit
    1590 values (see Section~\ref{sec:image.preparation}).
     1723\textmod{As noted above (Section~\ref{sec:image.preparation}), we do not
     1724attempt to replace or interpolate masked pixel values.  Aperture
     1725photometry measurements of objects which include masked pixels are
     1726thus inaccurate.  For a stellar object, the amount of error is a
     1727function of how close the masked pixels are to the core of the PSF.
     1728To provide guidance, when the PSF and aperture photometry for a source
     1729is measured, two additional quantities are measured which are useful
     1730to assess the impact of masking.}  First, the mask image is examined
     1731and the number of unmasked pixels is summed, weighted by the
     1732normalized PSF model.  The resulting quantity, \code{PSF_QF} has a
     1733value between 0.0 (totally masked) and 1.0 (totally unmasked).
     1734Elsewhere in the IPP system, we use this value to filter out
     1735detections which are unreliable due to the masking.  For a generous
     1736cut, leaning toward completeness at the cost of some lower quality
     1737measurements, \code{PSF_QF} $> 0.85$ is used in some contexts; in
     1738other cases, we require \code{PSF_QF} $> 0.95$ to ensure a
     1739high-quality measurement \citep[see for example the calculation of
     1740  average photometry in][]{magnier2017.calibration}.  The second
     1741quantity is related to the first: \code{PSF_QF_PERFECT} uses all mask
     1742values to assess the quality factor, while \code{PSF_QF} uses only the
     1743``bad'' mask bit values (see Section~\ref{sec:image.preparation}).
    15911744
    15921745Several flag bits are raised based on statistics which are similar to
     
    16681821distribution.  Note that in the case of very saturated stars, pixels
    16691822in the central regions are largely masked, because they are
    1670 saturated.  Thus in these cases, the psf-weighted masked fraction (see
     1823saturated.  Thus in these cases, the PSF-weighted masked fraction (see
    16711824Section~\ref{sec:psf.model.choice}) is generally quite low or 0.0.
    16721825Sources for which this radial profile is subtracted have the flag bit
     
    18081961Extended sources are identified as those for which the Kron magnitude
    18091962is significantly brighter than the PSF magnitude when compared to a
    1810 PSF star.  The value $\delta M_{rm KP} = m_{\rm Kron} - m_{\rm PSF}$,
     1963PSF star.  The value $\delta M_{\rm KP} = m_{\rm Kron} - m_{\rm PSF}$,
    18111964the difference between the PSF and Kron magnitudes, is calculated for
    1812 each source.  The median of $\delta M_{rm KP}$ is calculated for the
    1813 PSF stars.  This median is subtracted from $\delta M_{rm KP}$ for each
     1965each source.  The median of $\delta M_{\rm KP}$ is calculated for the
     1966PSF stars.  This median is subtracted from $\delta M_{\rm KP}$ for each
    18141967star.  The result is divided by the quadrature error of the PSF and
    18151968Kron magnitudes and called \code{extNsigma}.  If \code{extNsigma} is
     
    18171970considered to be extended and the flag bit
    18181971\code{PM_SOURCE_MODE_EXT_LIMIT} is set for the source.
     1972
     1973\textmod{We decided to use $\delta M_{\rm KP}$ metric for this
     1974  assessment after we tested several possible star-galaxy separation
     1975  statistics.  We found that the Kron-PSF comparison was more reliable
     1976  than second-moment and first-radial-moment based measurements.  In
     1977  addition, since we needed a statistic which could be calculated
     1978  relatively quickly on every detected source, we rejected using a
     1979  galaxy model fit for the star-galaxy separator.}
    18191980
    18201981Cosmic rays are identified by a combination of the Kron magnitude and
     
    19382099%% than the PSF (ie, a cosmic ray or other defect).  A user-defined
    19392100%% number of standard deviations is used to select these two cases, and
    1940 %% to flag the source as a likely galaxy (really meaning 'extended') or
     2101%% to flag the source as a likely galaxy (really meaning `extended') or
    19412102%% as a likely defect. 
    19422103
     
    19642125than a user-defined cutoff (set to 2.0 for the PV3 analysis of the
    19652126$3\pi$ survey), the non-linear PSF fit will be rejected.  If the
    1966 Chi-Square per degree of freedom is greater than a user-defined limit
     2127$\chi^2$ per degree of freedom is greater than a user-defined limit
    19672128(set to 50.0 for the PV3 analysis of the $3\pi$ survey), the
    19682129non-linear PSF fit will be rejected.  These sources are marked with
     
    20362197comparing the ratio to that expected.
    20372198
     2199\note{more on the parameter guess}
     2200
    20382201For each type of extended source model (in fact for all source
    20392202models), a function is defined which examines the fit results and
     
    20432206case, the range of valid values for each of the parameters must be
    20442207considered in the fit assessment.  In other cases, we may choose to
    2045 use only the parameter errors and the fit Chi-Square value.
     2208use only the parameter errors and the fit chi-square value.
    20462209
    20472210All extended source model fits which are successful are then
     
    21642327\begin{figure*}[htbp]
    21652328  \begin{center}
    2166  \includegraphics[width=\hsize,clip]{\picdir/{mag.resid.psf}.\plotext}
     2329 \includegraphics[width=\hsize,clip]{\picdir/{mag.resid.psf.v1}.\plotext}
    21672330  \caption{\label{fig:mag.resid.psf} PSF Photometry demonstration.
    2168     The bottom panel shows the difference of the measured PSF
    2169     photometry for stars in the first image of the STS sequence
    2170     compared to the next 17 images, after correction for a relative
    2171     zero point.  Black dots are from stars for which both measurements
    2172     have {\tt PSF\_QF} $> 0.95$, while grey dots have lower {\tt
    2173       PSF\_QF} values.  The top three panels show histograms in three
    2174     instrumental magnitude ranges for the magnitude difference divided
    2175     by the reported measurement error: $N\sigma = (m_0 - m_1) /
    2176     \sqrt{\sigma_0^2 + \sigma_1^2}$.  The red curves are Gaussian fits
    2177     to these histograms, with the measured standard deviations in the
    2178     upper-right corners of the plots.  The instrumental magnitude
     2331    Panel (d) shows the difference of the measured PSF photometry for
     2332    stars in the first image of an image sequence with constant
     2333    pointing compared to the next 17 images, after correction for a
     2334    relative zero point, as a function of the instrumental magnitudes
     2335    above the detection threshold.  Black dots are from stars for
     2336    which both measurements have {\tt PSF\_QF} $> 0.95$, while grey
     2337    dots have lower {\tt PSF\_QF} values.  The top three panels (a) -
     2338    (c) show histograms in three magnitude ranges for the magnitude
     2339    difference divided by the reported measurement error: $N\sigma =
     2340    (m_0 - m_1) / \sqrt{\sigma_0^2 + \sigma_1^2}$.  The red curves are
     2341    Gaussian fits to these histograms, with the measured standard
     2342    deviations in the upper-right corners of the plots.  The magnitude
    21792343    ranges are listed in the upper-left corners of the three plots and
    21802344    the boundaries are marked as vertical red lines in the lower plot.
     
    21862350\begin{figure*}[htbp]
    21872351  \begin{center}
    2188  \includegraphics[width=\hsize,clip]{\picdir/{mag.resid.aper}.\plotext}
     2352 \includegraphics[width=\hsize,clip]{\picdir/{mag.resid.aper.v1}.\plotext}
    21892353  \caption{\label{fig:mag.resid.aper} Aperture Photometry
    21902354    demonstration.  The plots show identical measurements to those in
     
    22742438
    22752439\subsection{Stellar Photometry Example}
     2440\label{sec:phot.example}
    22762441
    22772442To illustrate the quality of the stellar photometry as measured with
     
    23342499magnitude; 3) convolved galaxy model fits; and 4) photometry in
    23352500several fixed-sized apertures, both raw and convolved to a defined
    2336 PSF size.
     2501PSF size.  \textadd{The motivation for these measurements is to
     2502  provide options to the end users for galaxy photometry and reliable
     2503  galaxy colors.  The photometric redshift analysis of
     2504  \cite{2012ApJ...746..128S}, for example, uses the convolved,
     2505  fixed-size aperture photometry.} 
    23372506
    23382507%% NOTE: This is NOT true: extended source analysis applied to both
     
    23402509%%
    23412510%% In order for a source to be included in the extended source
    2342 %% analysis, it much have been detected in the 'bright source' analysis
     2511%% analysis, it much have been detected in the `bright source' analysis
    23432512%% step ($S/N > 20$, Section~\ref{sec:xxxx}). 
    23442513
     
    23632532cut was defined by $|b| > b_{\rm min}$ where $b_{\rm min} = b_0 + r_b
    23642533e^{\frac{-l^2}{2 \sigma_b^2}}$.  For the PV3 analysis, $b_0 =
    2365 $20\degree, $r_b = $15\degree, $\sigma_b = $50\degree.  This contour
     2534$20\degree, $r_b = $15\degree, $\sigma_b = $50\degree.  \textadd{The Galactic plane cut is made on an object-by-object basis.}  This contour
    23662535avoids the denser portions of the Galactic plane and bulge, limiting
    23672536the total time spent on the galaxy modeling analysis at the expense of
    23682537galaxy photometry in the plane (though Kron photometry is available
    2369 for those sources).
     2538for those sources). 
     2539
     2540% uses plots.sh in this directory
     2541\begin{figure}[htbp]
     2542 \begin{center}
     2543 \includegraphics[width=\hsize,clip]{\picdir/galplanecut.pdf}
     2544  \caption{\label{fig:galplanecut} Illustration of the Galactic Plane
     2545    cut used for PV3, in Galactic coordinates.  Objects within the red
     2546    contours are skipped for galaxy model fits and Petrosian parameters.}
     2547  \end{center}
     2548\end{figure}
    23702549
    23712550% galaxy model fits performed based on limits set in psphotChooseAnalysisOptions.c
     
    25832762radius values for all 3 model types.  Once the effective radius is
    25842763chosen, the second moments are used to define the aspect ratio and
    2585 position angle of the elliptical contour.  The Kron flux is used to
     2764position angle of the elliptical contour, \textadd{as described for PSF sources
     2765in Section~\ref{sec:psf.model.choice}}.  The Kron flux is used to
    25862766generate a guess for the normalization, applying an appropriate scale
    25872767factor based on the ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values, generated
     
    27582938of the same galaxy for all 5 filters.  In this analysis, the best
    27592939model for each source is subtracted from the image pixels for all
    2760 sources excluding the source in consideration.  The 'best model' is
     2940sources excluding the source in consideration.  The `best model' is
    27612941determined based on the minimum $\chi^2$ value for the model fits.
    27622942
     
    28563036figures may be compared with the reported detection limits from the
    28573037PS1 $3\pi$ survey.  Note for reference that the typical stellar
    2858 detection limits in the PS1 $3\pi$ stack images are (\grizy) = (23.3,
     3038detection limits in the PS1 $3\pi$ stack images (Paper I) are (\grizy) = (23.3,
    2859303923.2, 23.1, 22.3, 21.4).  The minimum Kron magnitudes for which galaxy
    28603040model fits were performed for the PV3 analysis
     
    30363216recalibration of the zero points for the individual warp.
    30373217
     3218\note{discuss the relative quality of average exposure, forced warp
     3219  average, and stack photometry. reference to Best et al}
     3220
    30383221\subsection{Forced Galaxy Models}
    30393222\label{sec:galaxy.forced.fit}
     
    31023285lensing, and thus directly measure mass distributions in the Universe.
    31033286The classic approach was originally described by
    3104 \cite{1995ApJ...449..460K} and applied to a set of deep HST
     3287\cite[KSB]{1995ApJ...449..460K} and applied to a set of deep HST
    31053288observations.  The details of the technique were further refined by
    3106 \cite{1998ApJ...504..636H}; in the discussion below we primarily use
     3289\cite[HFK]{1998ApJ...504..636H}; in the discussion below we primarily use
    31073290their notation, though we explicitly cast their integrals as sums over
    31083291discrete pixels.
     
    32913474galaxies.  In the Pan-STARRS system, difference images are generated
    32923475using the PSF-matching technique described by
    3293 \citep[e.g.,][]{1998ApJ...503..325A}.  The description of the
    3294 Pan-STARRS implementation is given by \cite{price2017}.  The analysis
    3295 of the sources detected in these difference images uses a portion of
    3296 the \ippprog{psphot} code embedded in the program, \ippprog{ppSub},
    3297 which generates those image. 
    3298 
    3299 \note{Note that this article is limited to the analysis of the
    3300   difference image detections, and that additional work is needed to
    3301   filter real/bogus.  Refer to Denneau et al 2013 PASP for the MOPS analysis.  Refer
    3302   to the Wright et al papers for the SNe classifications (& other
    3303   papers?).  Mention Yuan \& Akerloff 2008.}
    3304 
    3305 \note{mention the 3 difference image modes (WW, WS, SS)}
    3306 
    3307 % https://ui.adsabs.harvard.edu/abs/2013PASP..125..357D/abstract 
     3476\citep[e.g.,][]{1998ApJ...503..325A}.  \textmod{The description of the
     3477Pan-STARRS implementation is given by \cite{price2017} and uses an
     3478implementation of cross-convolution based on the description of
     3479\cite{2008ApJ...677..808Y}.  The analysis of the sources detected in
     3480these difference images uses a portion of the \ippprog{psphot} code
     3481embedded in the program, \ippprog{ppSub}, which generates those image.
     3482Difference images are generated from three different possible image
     3483combinations: 1) pairs of individual exposures are differenced using
     3484the warp images; 2) warps for individual exposures
     3485are differenced against deep stacks; 3) stacks made from multiple
     3486exposures of the same field within a night are differenced against
     3487deep stacks.  Note that this article is limited to the analysis of the
     3488difference image detections, and that significant additional work is
     3489needed to distinguish real detections from false positives, and
     3490further to classify the detections as objects of scientific interest.
     3491Within the Pan-STARRS science community, the Moving Object Processing
     3492System \citep[MOPS][]{2013PASP..125..357D} is dedicated to the effort
     3493of identifying asteroids and other solar system objects.  Multiple
     3494teams have focused on the identification of supernovae
     3495\citep{2014ApJ...795...44R,2015MNRAS.449..451W}, including the use of
     3496machine-learning techniques to filter the good detections from the bad
     3497detections.}
    33083498
    33093499The analysis of the difference image follows the same basic steps as
Note: See TracChangeset for help on using the changeset viewer.