IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41307 for trunk


Ignore:
Timestamp:
Mar 17, 2020, 3:42:22 PM (6 years ago)
Author:
eugene
Message:

addressing referee report

Location:
trunk/doc/release.2015/ps1.analysis
Files:
1 added
2 edited

Legend:

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

    r40719 r41307  
    44#
    55DO_PDFLATEX = 1
    6 DO_BIBTEX = 0
     6DO_BIBTEX = 1
    77
    88help:
  • trunk/doc/release.2015/ps1.analysis/analysis.tex

    r41129 r41307  
    2929
    3030%\def\picdir{/home/eugene/chipresid.20140404}
    31 %\def\picdir{pics}
    32 \def\picdir{.}
     31\def\picdir{pics}
     32%\def\picdir{.}
    3333
    3434% Pick a terse version of the title here;
     
    9898images from other telescopes.  We describe the analysis of the
    9999astronomical sources by \ippprog{psphot} in general as well as for the
    100 specific case of the 3rd processing version used for the first public
    101 release of the Pan-STARRS $3\pi$ survey data.
     100specific case of the 3rd processing version used for the first \textmod{two public
     101releases} of the Pan-STARRS $3\pi$ survey data.
    102102\end{abstract}
    103103
     
    155155Pan-STARRS produced its first large-scale public data release, Data
    156156Release 1 (DR1) on 16 December 2016.  DR1 contains the results of the
    157 third full reduction of the Pan-STARRS $3\pi$ Survey archival data,
     157third full reduction of the Pan-STARRS $3\pi$ Surveyo archival data,
    158158identified as PV3.  Previous reductions \citep[PV0, PV1, PV2;
    159159  see][]{magnier2017.datasystem} were used internally for pipeline
     
    166166images obtained by the $3\pi$ Survey observations.  A second data
    167167release, DR2, was made available 28 January 2019.  DR2 provides
    168 measurements from all of the individual exposures, and include an
    169 improved calibration of the PV3 processing of that dataset.
     168measurements from all of the individual exposures, and includes an
     169improved \textmod{astrometric calibration as well as improvements to the
     170  photometric calibration of the stack and 'forced warp' measurements
     171from} the PV3 processing of that dataset.
    170172
    171173This is the fourth in a series of seven papers describing the
     
    174176source detection and photometry, including point-spread-function and
    175177extended source model fitting, and the techniques for ``forced''
    176 photometry measurements.  The software described here was used with a
     178photometry measurements.  \textadd{The same analysis software is used
     179  for individual images, image stacks, and difference images.}
     180The software described here was used with a
    177181single consistent set of parameters for the complete PV3 analysis,
    178 used for both DR1 and DR2.
     182used for both DR1 and DR2.  \textadd{The software was also used for the
     183analysis of the Medium Deep Survey data, though with a different
     184software version and some modifications of
     185the analysis parameters to better suite the longer exposures.}
    179186
    180187%Chambers et al. 2017 (Paper I)
     
    190197\citet[][Paper II]{magnier2017.datasystem}
    191198describe how the various data processing stages are organized and implemented
    192 in the Imaging Processing Pipeline (IPP), including details of the
     199in the \textmod{Image Processing Pipeline} (IPP), including details of the
    193200the processing database which is a critical element in the IPP infrastructure .
    194201
     
    231238%%    submission and refereeing process.}}
    232239
     240\textadd{In this article, we use the following type-faces to distinguish
     241different concepts:}
     242\begin{itemize}
     243\item \ippstage{Small caps} for the analysis stages.
     244\item \ippdbtable{Italics} for database tables and columns.
     245\item \ippprog{Fixed-width} font for program names, variables, and
     246  miscellaneous constants.
     247\end{itemize}
     248
     249\textadd{
     250The latter catagory includes a number of configuration parameters used
     251to define the \ippprog{psphot} analysis.  In those cases, unless the
     252values used for the PV3 analysis are explicitly discussed, we include
     253the PV3 value immediately after the configuration variable name in parenthesis.}
     254
    233255\section{Background}
    234256
    235257The photometric and astrometric precision goals for the Pan-STARRS\,1
    236 surveys were quite stringent: photometric accuracy of 10
    237 millimagnitudes, relative astrometric accuracy of 10 milliarcseconds
     258surveys were quite stringent.  The astrometric goals were relative astrometric accuracy of 10 milliarcseconds
    238259and absolute astrometric accuracy of 100 milliarcseconds with respect
    239 to the ICRS reference stars.
     260to the ICRS reference stars.  For photometry, the goal was 10
     261millimagnitudes accuracy within the internal photometric system across
     262the sky, though the tie to an absolute standard was not required to
     263meet this standard.
    240264
    241265An additional constraint on the Pan-STARRS analysis system comes from
     
    311335Several variants of \ippprog{psphot} have been used in the PS1 PV3
    312336analysis.  The main variant of \ippprog{psphot} operates on a single
    313 image, or a group of related images representing the data read from a
    314 camera in a single exposure.  The images are expected to have already
     337image, or a group of related images representing the data read from
     338\textmod{the multiple chips of a mosaic
     339camera from} a single exposure.  \textadd{In the IPP sequencing, this step is
     340called the \ippstage{chip} stage.}  The images are expected to have already
    315341been detrended so that pixel values are linearly related to the flux.
    316342The gain may be specified by the configuration system, or a variance
     
    322348
    323349The variant called \ippprog{psphotStack} accepts a set of images, each
    324 representing the same patch of sky in a different filter, nominally
    325 the full $grizy$ filter set for the analysis of the PS1 PV3 stack
     350representing the same patch of sky \textadd{(with pixels aligned)} in
     351a different \textmod{filter.  This version was used for the analysis
     352  of the deep ``stacks'' (co-added images combining multiple
     353  observations of the same field) produced by the IPP \ippstage{stack}
     354  stage.  Nominally,
     355the full $grizy$ filter set was used for the analysis} of the PS1 PV3 stack
    326356images, though where insufficient data were available in a given
    327357filter, a subset of these filters was processed as a group.  As
     
    329359capability of measuring forced PSF photometry in some filter images
    330360based on the position of sources detected in the other filters.  It
    331 also include an option to convolve the set of images to a single,
     361also includes an option to convolve the set of images to a single,
    332362common PSF size across the filters for the purpose of fixed aperture
    333363photometry.
     
    335365Another variant of \ippprog{psphot} used in the PV3 analysis is called
    336366\ippprog{psphotFullForce}.  In this variant, a set of images all representing the
    337 same pixels are processed together, with the positions of sources to
     367same \textadd{co-aligned} pixels are processed together, with the positions of sources to
    338368be analyzed loaded from a supplied file.  In this variant of the
    339369analysis, sources are not discovered -- only the supplied sources are
     
    348378% \subsection{Astronomy Measurement Goals}
    349379
    350 \ippprog{psphot} has a number of important requirements that it must
    351 meet, and a number of design goals which we believe will help to make
    352 it usable in a wide range of circumstances.  The critical
    353 astronomy-driven measurement goals of the Pan-STARRS project, which
    354 drive the design of \ippprog{psphot}, are the photometric accuracy
    355 goal (10 millimagntudes) and the astrometric accuracy goal (10
    356 milliarcseconds).  For \ippprog{psphot}, the photometry accuracy goal
    357 implies that the measured photometry of stellar sources must be
    358 substantially better than this 10 mmag goal since the photometry error
    359 per image is combined with an error in the flat-field calibration and
    360 an error in measuring the atmospheric effects.  We have set a goal for
     380\textadd{The top-level design goals of \ippprog{psphot} are to detect and
     381determine the instrumental positions and fluxes of astronomical
     382sources in the images.  For extended sources, the goals also include
     383the measurement of a variety of morphological information, including
     384galaxy model parameters and non-parametric measurements of the sizes
     385and profiles of the galaxies to aid in classification and for
     386weak-lensing analysis.  For trailed asteroids, the goal also includes
     387the measurement of the length and direction of the trail.}
     388
     389\textmod{Beyond these basic elements, \ippprog{psphot} has a number of
     390  design goals} which we believe will help to make it usable in a wide
     391range of circumstances.  The critical astronomy-driven measurement
     392goals of the Pan-STARRS project, which drive the design of
     393\ippprog{psphot}, are the photometric accuracy goal (10
     394millimagnitudes) and the \textadd{relative} astrometric accuracy goal
     395(10 milliarcseconds) \textadd{for bright stars for which the photon
     396  shot-noise is small compared to the systematic errors.}
     397
     398For \ippprog{psphot}, the photometry accuracy goal implies that the
     399measured photometry of stellar sources must be substantially better
     400than this 10 mmag goal since the photometry error per image is
     401combined with an error in the flat-field calibration and an error in
     402measuring the atmospheric effects.  We have set a goal for
    361403\ippprog{psphot} of 3 mmag photometric consistency for bright stars
    362404between pairs of images obtained in photometric conditions at the same
    363405pointing, ie to remove sensitivity to flat-field errors.  This goal
    364406splits the difference between the three main contributors and still
    365 allows some leeway.  This requirement must be met for well-sampled
     407allows some leeway.  This goal must be met for well-sampled
    366408images and images with only modest undersampling.
    367409
     
    420462\end{itemize}
    421463
     464\note{get a better example of the psphot accuracy achieved}
     465
     466\textadd{The success of the \ippprog{psphot} implementation is meeting
     467  the photometry and astrometry design requirements is demonstrated by
     468  the achieved accuracy for the Pan-STARRS $3\pi$ Survey data. 
     469}
     470
    422471\section{Basic Analysis}
    423472
     
    480529\hline
    481530\hline
    482 {\bf Measurement} & {\bf Camera} & {\bf Stack} & {\bf Forced Warp} & {\bf Diff} & {\bf Section} & {\bf Which} \\
     531{\bf Measurement} & {\sc \bf CHIP} & {\sc \bf STACK} & {\sc \bf FORCED
     532  WARP} & {\sc \bf DIFF} & {\bf Section} & {\bf Which} \\
    483533\hline
    484534  Background Subtraction     & Y & Y & Y & N$^1$ & \ref{sec:image.preparation}      & N/A \\
     
    524574field \ippmisc{FLAGS}.  When data from \ippprog{psphot} is loaded into
    525575a DVO database \citep{magnier2017.calibration}, these values are
    526 stored in the field \code{Measure.photFlags} and exposed in the public
     576stored in the field \ippdbtable{Measure.photFlags} and exposed in the public
    527577database \citep[PSPS][]{flewelling2017} in the fields
    528 \code{Detection.infoFlag}, \code{StackObjectThin.XinfoFlag} (where
    529 \code{X} is one of {$grizy$}), and
    530 \code{ForcedWarpMeasurement.FinfoFlag}.
     578\ippdbtable{Detection.infoFlag}, \ippdbtable{StackObjectThin.XinfoFlag} (where
     579\ippdbtable{X} is one of {$grizy$}), and
     580\ippdbtable{ForcedWarpMeasurement.FinfoFlag}.
    531581%
    532582Table~\ref{tab:det_flag2_values} lists the flags recorded in the
     
    534584loaded into a DVO database \citep{magnier2017.calibration}, these
    535585values are not currently loaded, but they are exposed in PSPS in the fields
    536 \code{Detection.infoFlag2}, \code{StackObjectThin.XinfoFlag2} (where
    537 \code{X} is one of {$grizy$}), and
    538 \code{ForcedWarpMeasurement.FinfoFlag2}.
     586\ippdbtable{Detection.infoFlag2}, \ippdbtable{StackObjectThin.XinfoFlag2} (where
     587\ippdbtable{X} is one of {$grizy$}), and
     588\ippdbtable{ForcedWarpMeasurement.FinfoFlag2}.
    539589
    540590\begin{table*}
     
    635685be provided by the user, or they may be automatically generated from
    636686the input image, based on configuration-defined values for the image
    637 gain, read-noise, saturation, and so forth.  For the function-call
     687gain, read-noise, saturation, and so forth.  \textadd{Within the IPP analysis,
     688we normally use images which are equivalent to the digital numbers
     689(scaled by the detrend images), but as long as the variance image is
     690constructed in a consistent fashion, \ippprog{psphot} can use images
     691in electron, calibrated flux units or other conventions (though this would
     692require some tuning of configuration parameters).}  For the function-call
    638693form of the program, the flux image is provided in the API, and
    639694references to the mask and variance are provided in the configuration
     
    643698The mask is represented as a 16-bit integer image in which a value of
    6446990 represents a valid pixel.  Each of the 16 bits define different
    645 reasons a pixel should be ignored.  This allows us to optionally
     700reasons a pixel should be ignored, \textadd{listed in
     701  Table~\ref{tab:mask_values}}.
     702This allows us to optionally
    646703respect or ignore the mask depending on the circumstance.  For
    647704example, in some cases, we ignore saturated pixels completely while in
     
    658715case of PS1 PV3, the header keyword \code{MAXLIN} specifies the
    659716saturation level for each chip \citep[see][]{waters2017}. 2) Pixels
    660 which are below a user-defined value are considered unresponsive and
    661 masked as dead.  (camera format keyword \code{CELL.BAD} = 0 for PS1
    662 PV3).  3) Pixels which lie outside of a user-defined coordinate window
     717which are below a user-defined value (\code{CELL.BAD} = 0 for PV3) are considered unresponsive and
     718masked as dead.  3) Pixels which lie outside of a user-defined coordinate window
    663719are considered non-data pixels (\eg, overscan) and are marked as
    664720invalid.  (\ippprog{psphot} recipe keywords \code{XMIN}, \code{XMAX},
     
    744800subtracted.  The image is divided into a grid of background points
    745801with a spacing defined by the \ippprog{psphot} recipe values
    746 \code{BACKGROUND.XBIN, BACKGROUND.YBIN}, set to 400 pixels for PS1
    747 PV3.  Superpixels of size \code{BACKGROUND.XSAMPLE, BACKGROUND.YSAMPLE}
    748 ($2 \times 2$ for PS1 PV3) times larger than
    749 this spacing are used to measure the local background for each
    750 background grid point, thus over-sampling the background spatial
    751 variations.  In the interest of speed, a subset of \code{IMSTATS_NPIX}
    752 (10,000 for PS1 PV3) randomly selected {\em unmasked} pixels in these
    753 regions are used to determine the background.  The background value
    754 for each superpixel is determined by fitting a Gaussian distribution
    755 to the histogram of pixels values. 
     802\code{BACKGROUND.XBIN, BACKGROUND.YBIN}, set to 400 pixels
     803\textadd{($\sim 100$ arcseconds)} for PV3.  Superpixels of size
     804\code{BACKGROUND.XSAMPLE, BACKGROUND.YSAMPLE} ($2 \times 2$ for PV3)
     805times larger than this spacing are used to measure the local
     806background for each background grid point, thus over-sampling the
     807background spatial variations.  In the interest of speed, a subset of
     808\code{IMSTATS_NPIX} (10,000 for PV3) randomly selected {\em unmasked}
     809pixels in these regions are used to determine the background.  The
     810background value for each superpixel is determined by fitting a
     811Gaussian distribution to the histogram of pixels values. 
    756812
    757813If the image were empty of stars and only contained flux from a
     
    788844the discussion in Section~3.11 of \cite{waters2017}.
    789845
     846\textadd{Since the subtraction of the sky model supresses larger-scale
     847  structures, features such as large galaxies which are comparable to
     848  the superpixel size are adversely affected by the subtraction.
     849  Photometry for galaxies larger than $\sim 30$ arcseconds is
     850  unreliable as a result.  The superpixel size used for the sky model
     851  in the PV3 analysis was chosen as compromise between the need to
     852  follow bright features with small spatial scales and the desire to
     853  measure photometry of galaxies of sizes up to at least 30
     854  arcseconds.  Features which we wished to suppress include both
     855  astronomical sources, such as bright nebulosity and the wings of
     856  bright stars, and non-astronomical sources, such as moonlight and
     857  other scattered light sources.  In some contexts, we have used a
     858  finer spacing for the background model, such as in the dedicated
     859  analysis of the photometry of the Andromeda Galaxy, where we are
     860  only interested in stellar sources and the analysis is otherwise
     861  badly affected by the background from this galaxy.}
     862
    790863\subsection{Initial Source Detection}
    791864
     
    801874significance image in signal-to-noise units, including correction for
    802875the covariance, if known. At this stage, the goal is only to detect
    803 the brighter sources, above a user defined S/N limit (configuration
    804 keyword: \code{PEAKS_NSIGMA_LIMIT} = 20.0 for PS1 PV3).  A maximum of
    805 \code{PEAKS_NMAX} (5000 of PS1 PV3) are found at this stage.  The
     876the brighter sources, above a user defined S/N limit
     877(\code{PEAKS_NSIGMA_LIMIT} = 20.0 for PV3).  A maximum of
     878\code{PEAKS_NMAX} (5000 for PV3) are found at this stage.
     879
     880\textadd{For an image with a Gaussian PSF of the same size, this method
     881  would represent the optimal detection algorithm, equivalent to a
     882  matched filter \note{add ref}.  At this stage, our goal is simply to
     883  detect the brighter sources, so the exact size and shape of the PSF
     884  is not critical. }
     885The
    806886detection efficiency for the brighter sources is not strongly
    807 dependent on the form of this smoothing function.
     887dependent on the form of this smoothing function.  \textadd{Instead,
     888  our goal with the smoothing kernel is to reduce our sensitivity to
     889  pixel-to-pixel fluctuations in the location of the peak of the
     890  sources in the image.}. 
    808891
    809892The local peaks in the smoothed image are found by first detecting
    810893local peaks in each row.  For each peak, the neighboring pixels are
    811894then examined and the peak is accepted or rejected depending on a set
    812 of simple rules.  First, any peak which is greater than all 8
     895of simple rules.  \textadd{The rules are defined so that we choose a unique set
     896of peaks which are not immediately adjacent to other peaks.}  First, any peak which is greater than all 8
    813897neighboring pixels is kept.  Any peak which is lower than any of the 8
    814898neighboring pixels is rejected.  Any peak which has the same value as
    815 any of the other 8 pixels is kept if the pixel $X$ and $Y$ coordinates
    816 are greater than or equal to the other equal value pixels.  This
    817 simple rule set means that a flat-topped region will result peaks at
    818 the maximum $X$ and $Y$ corners of the region.
     899any of the other 8 pixels is kept {\em if} the pixel $X$ and $Y$ coordinates
     900are greater than or equal to the other equal-value pixels.  \textmod{This
     901last rule means that a flat-topped region will result in peaks at
     902the maximum $X$ and $Y$ corners of the region.}
    819903
    820904We use the 9 pixels which include the source peak to fit for the
     
    882966  \caption{\label{fig:peaks} Illustration of peak finding and culling peaks within a
    883967    footprint.  Insignificant peaks within the footprint of a brighter
    884     peak are ignored in further processing. }
     968    peak are ignored in further processing. \note{NOTE that the
     969      diagram is a 1D rep of a 2D path.}}
    885970  \end{center}
    886971\end{figure}
     
    897982(\code{PEAKS_NSIGMA_LIMIT}).  These regions are grown by a small
    898983amount to avoid errors on rough edges -- an image of the footprints is
    899 convolved with a disk of radius \code{FOOTPRINT_GROW_RADIUS} (= 3
    900 pixels for PS1 PV3).  Peaks are assigned to the footprints in which
     984convolved with a disk of radius \code{FOOTPRINT_GROW_RADIUS} (3
     985pixels for PV3).  Peaks are assigned to the footprints in which
    901986they are contained (note by construction all peaks must be located in
    902987a footprint since the peaks must be above the detection threshold).
    903988
    904989For any peak which is not the brightest peak in that footprint it is
    905 possible to reach the brightest peak by following the highest valued
    906 pixels between the two peaks.  The lowest pixel along this path is the
     990possible to reach the brightest peak by following a sequence of the highest valued
     991pixels between the two peaks.  The lowest pixel along this
     992\textadd{(potentially meandering)} path is the
    907993{\em key col} for this peak (as used in topographic descriptions of a
    908994mountain).  If the key col for a given peak is less than
    909 \code{FOOTPRINT_CULL_NSIGMA_DELTA} (4.0 for PS1 PV3) sigmas below the
     995\code{FOOTPRINT_CULL_NSIGMA_DELTA} (4.0 for PV3) sigmas below the
    910996peak of interest, the peak is considered to be {\em locally
    911997  insignificant} and removed from the list of possible detections (see
    912 Figure~\ref{fig:peaks}).  In the vicinity of a saturated star, the
     998Figure~\ref{fig:peaks}).  \textadd{If more than one such path is possible, the
     999path with the highest key col is used for this test.}  In the vicinity of a saturated star, the
    9131000rule is somewhat more aggressive as the flat-topped or structured
    9141001saturated top of a bright star may appear as multiple peaks with
     
    9761063and the aperture is an iterative process: for a given value of
    9771064$\sigma_w$, the PSF stars will have a measured value of the PSF size,
    978 $\sigma^{\prime}_{\rm PSF}$ which different from the true value due to
     1065$\sigma^{\prime}_{\rm PSF}$ \textmod{which is different} from the true value due to
    9791066the effect of the window function.  The measured value of the PSF size
    9801067will be biased high or low depending on both the signal-to-noise of
     
    9921079FWHM for faint stars rises, and then over-shoots the truth value,
    9931080while the scatter increases.  Thus, for large values of $\sigma_w$,
    994 the result is both a poorly estimated FWHM for the image and a trend
    995 this the signal-to-noise of the star.  We attempt to minimize the
     1081the result is both a poorly estimated FWHM for the image and a \textmod{trend
     1082with the} signal-to-noise of the star.  We attempt to minimize the
    9961083scatter and trends with instrumental magnitude at the cost of overall
    9971084bias.
     
    10571144$S = \sum_i (f_i - s_i) w_i$ is the window-weighted sum of the source
    10581145flux, used to re-normalize the moments; $r_i$ is the radius of a
    1059 pixel, $\sqrt{(x_i - x_0)^2 + (y_i - y_0)^2}$; The sums are performed
     1146pixel, $\sqrt{(x_i - x_0)^2 + (y_i - y_0)^2}$. The sums are performed
    10601147over all (unmasked) pixels in the aperture.  For the centroid calculation ($x_0,
    10611148y_0$), the peak coordinate (see~\ref{sec:peaks}) is used to define the
     
    10761163
    10771164If the measured centroid coordinates ($x_0, y_0$) differ from the peak
    1078 coordinates be a large amount (1.5$\sigma_w$), then the peak is
     1165coordinates \textmod{by} a large amount (1.5$\sigma_w$), then the peak is
    10791166identified as being of poor quality and is skipped in further
    10801167analyses; the flag bit
     
    11611248parameters would be the shape terms ($\sigma_x, \sigma_y, \sigma_{\rm
    11621249  xy}$) while the independent parameters would be the centroid,
    1163 normalization and local sky values ($x_o, y_o, I_o, S$).  Thus the
     1250normalization and local sky values ($x_o, y_o, I_o, S$).  \note{we do
     1251  not fit sky as a free parametery, right?}  Thus the
    11641252shape parameters are each a function of the source centroid
    11651253coordinates:
     
    11691257\sigma_{xy} & = & f_3(x_{\rm ccd},y_{\rm ccd}).
    11701258\end{eqnarray}
    1171 \ippprog{psphot} represents the variation in the PSF parameters as a function of
    1172 position in the image in two possible ways, specified by the
    1173 configuration.  The first option is to use a 2-D polynomial which is
    1174 fitted to the measured parameter values across the image.  The second
    1175 option is to use a grid of values which are measured for sources
    1176 within a subregion of the image.  In the latter case, the value at a
    1177 specific coordinate in the image is determined by interpolation
    1178 between the nearest grid points.  The order of the polynomial or the
    1179 sampling size of the grid is dynamically determined depending on the
    1180 number of available of PSF stars.  In the case of the PV3 analysis,
    1181 the grid of values was used, with a maximum of $6\times 6$ samples per
    1182 GPC1 chip image.  For the earlier PV2 analysis, the maximum grid
    1183 sampling was $3\times 3$ per GPC1 chip image.  For the PV1 analysis,
    1184 the polynomial representation was used, with up to 3rd order terms.
    1185 The higher order representation was used for PV3 in order to follow
    1186 some of the observed PSF variations in the images
     1259\ippprog{psphot} represents the variation in the PSF parameters as a
     1260function of position in the image in two possible ways, specified by
     1261the configuration.  The first option is to use a 2-D polynomial which
     1262is fitted to the measured parameter values across the image.  The
     1263second option is to use a grid of values which are measured for
     1264sources within a subregion of the image.  In the latter case, the
     1265value at a specific coordinate in the image is determined \textmod{via
     1266  bi-linear} interpolation between the nearest grid points.  The order
     1267of the polynomial or the sampling size of the grid is dynamically
     1268determined depending on the number of available of PSF stars.  In the
     1269case of the PV3 analysis, the grid of values was used, with a maximum
     1270of $6\times 6$ samples per GPC1 chip image \textadd{(grid cells of
     1271  size $\sim 3.4$ arcminutes)}.  For the earlier PV2 analysis, the
     1272maximum grid sampling was $3\times 3$ per GPC1 chip image
     1273\textadd{(grid cells of size $\sim 6.9$ arcminutes)}.  For the PV1
     1274analysis, the polynomial representation was used, with up to 3rd order
     1275terms.  The higher order representation was used for PV3 in order to
     1276follow some of the observed PSF variations in the images.
    11871277
    11881278% \note{write up the fitting process to define the grid?}
     
    11931283\item Gaussian : $f = I_0 e^{-z}$
    11941284\item Pseudo-Gaussian : $f = I_0 (1 + z + \frac{1}{2} z^2 + \frac{1}{6} z^3)^{-1}$ \code{[PGAUSS]}
    1195 \item Variable Power-Law : $f = I_0 (1 + z + z^{\alpha})^{-1}$ \code{[RGAUSS]}
     1285\item Variable Power-Law : $f = I_0 (1 + z + z^{\alpha})^{-1}$ \code{[RGAUSS]}, $\alpha > 1.25$
    11961286\item Steep Power-Law : $f = I_0 (1 + \kappa z + z^{2.25})^{-1}$ \code{[QGAUSS]}
    11971287\item PS1 Power-Law : $f = I_0 (1 + \kappa z + z^{1.67})^{-1}$ \code{[PS1_V1]}
     
    12011291similar to the Moffat profile form
    12021292\citep{1969AA.....3..455M,1983AA...126..278B}, with small differences.
     1293\textadd{For these PSF models, the functions are evaluated at the pixel center.
     1294Unlike some galaxy model representations (see
     1295Section~\label{sec:galaxy.conv.fit} ), the first derivatives of these
     1296functions approach zero as the radius approaches zero, so sub-pixel
     1297integration is not necessary.}
    12031298A user may choose to try more than one analytical function for a given
    12041299image.  As discussed below (Section~\ref{sec:psf.model.choice}),
     
    12451340renormalized by the flux of the star to put them on a consistent flux
    12461341scale.  For each PSF star, all pixels within a user-specified radius
    1247 (\code{PSF.RESIDUALS.RADIUS = 9}) are selected for the measurement.  For a
    1248 given pixel in the model, the pixel values from the PSF stars are
    1249 interpolated to the center of the model pixel. Pixels may be used in
     1342(\code{PSF.RESIDUALS.RADIUS = 9}) are selected for the measurement.  \textmod{For a
     1343given pixel in the model, the value is calculated from the 4 closest
     1344pixels in the PSF stars via bi-linear interpolation.} Pixels may be used in
    12501345this analysis if their signal-to-noise exceeds a user-defined limit.
    12511346For the PV3 $3\pi$ analysis, we allowed all pixels within the
     
    12711366\]
    12721367where $R[(x_{\rm mod},y_{\rm mod})][(x_{\rm ccd},y_{\rm ccd})]$ is the
    1273 value for model pixel $(x_{\rm mod},y_{\rm mod})$ for a star with
    1274 centroid at image pixel $(x_{\rm ccd},y_{\rm ccd})$.  The parameters
    1275 $R_o, R_x, R_y$ are determined for each pixel in the model $[(x_{\rm
    1276     mod},y_{\rm mod})]$.
     1368\textmod{value of the residual for model} pixel $(x_{\rm mod},y_{\rm mod})$ for a star with
     1369centroid at image pixel $(x_{\rm ccd},y_{\rm ccd})$.  \textmod{The parameters
     1370$R_o, R_x, R_y$ are the elements of the 2-D linear fit for each pixel $(x_{\rm mod},y_{\rm mod})$
     1371in the model. }
    12771372
    12781373\subsubsection{Candidate PSF Source Selection}
     
    13551450For the resulting collection of source model parameters, the
    13561451PSF-dependent parameters of the models are all fitted as a function of
    1357 position using either the 2-D polynomial or the gridded superpixel
    1358 representation.  The maximum order of these fits depends on the number
     1452position using either the 2-D polynomial or the gridded
     1453representation described above.  The maximum order of these fits depends on the number
    13591454of PSF sources (see Table~\ref{tab:psf.order.nstars}).  The fitting process for
    13601455these polynomials is iterative, and rejects the $3\sigma$ outliers in
     
    13801475  for a given order of the PSF 2D variations.} % \vspace{-0.5cm}
    13811476\begin{center}
    1382 \begin{tabular}{lll}
     1477\begin{tabular}{llll}
    13831478\hline
    13841479\hline
    1385 {\bf Minimum Number} & {\bf Order} & {\bf Number of} \\
    1386 {\bf of Stars}       &             & {\bf Grid Cells} \\
     1480{\bf Minimum }    & {\bf Order} & {\bf Number of}  & {\bf Cell Size} \\
     1481{\bf \# of Stars} &             & {\bf Grid Cells} & {\bf (arcmin) } \\
    13871482\hline
    1388  16 &  1 &  4 \\
    1389  54 &  2 &  9 \\
    1390 128 &  3 & 16 \\
    1391 300 &  4 & 25 \\
    1392 576 &  5 & 36 \\
     1483 16 &  1 &  4 & 10.3 \\
     1484 54 &  2 &  9 &  6.9 \\
     1485128 &  3 & 16 &  5.1 \\
     1486300 &  4 & 25 &  4.1 \\
     1487576 &  5 & 36 &  3.4 \\
    13931488\hline
    13941489\end{tabular}
     
    14051500the PSF model for this particular image.
    14061501
    1407 The metric used by \ippprog{psphot} to assess the PSF model is the
    1408 scatter in the differences between the aperture and fit magnitudes for
    1409 the PSF sources.  This difference is a critical parameter for any PSF
    1410 modeling software as it is a measurement of how well the PSF model
    1411 captures the flux of the star.  Aperture photometry is measured for a
    1412 circular aperture with a radius of \code{PSF_APERTURE_SCALE} (= 4.5
    1413 for the PV3 $3\pi$ analysis) times $\sigma_w$
     1502% For each model test, the above
     1503% corrected ApResid scatter is measured.  The PSF model function with
     1504% the smallest value for the ApResid scatter is then used by
     1505% \ippprog{psphot} as the best PSF model for this image. 
     1506
     1507{\bf \ippprog{psphot} allows a collection of PSF model functions to be
     1508tried on all PSF candidate sources.  The number of models to be tested
     1509is specified by the configuration keyword \code{PSF_MODEL_N}.  The
     1510configuration variables \code{PSF_MODEL_0}, \code{PSF_MODEL_1},
     1511through \code{PSF_MODEL_N - 1} specify the names of the models which
     1512should be tested.  The metric used by \ippprog{psphot} to assess the
     1513PSF model is the scatter in the differences between the aperture and
     1514fit magnitudes for the PSF sources.  This difference is a critical
     1515parameter for any PSF modeling software as it is a measurement of how
     1516well the PSF model captures the flux of the star.  Aperture photometry
     1517is measured for a circular aperture with a radius of
     1518\code{PSF_APERTURE_SCALE} (4.5 for PV3) times $\sigma_w$
    14141519(Section~\ref{sec:moments}).  The average aperture correction ($m_{\rm
    14151520  AP} - m_{\rm PSF}$) is measured and, if multiple PSF model types are
    14161521selected, the PSF model with the minimum clipped scatter in this
    1417 statistic is chosen for the image.  An approximate aperture correction
    1418 is measured here, with a more detailed correction measured after all
    1419 source analysis is performed (see
    1420 Section~\ref{sec:aperture.correction}).  Sources for which the
    1421 aperture magnitude is measured have the flag bit
     1522statistic is chosen for the image.  For the PV3 analysis, however, only the
     1523\code{PS1_V1} model function was used.}
     1524
     1525An approximate aperture correction is measured at this stage, with a
     1526more detailed correction measured after all source analysis is
     1527performed (see Section~\ref{sec:aperture.correction}).  Sources for
     1528which the aperture magnitude is measured have the flag bit
    14221529\code{PM_SOURCE_MODE_AP_MAGS} set.  These aperture magnitudes are
    1423 stored in the DVO field \code{Measure.Map} and exported to the PSPS as
    1424 a flux in Janskies in the field \code{Detection.apFlux}.  The radius
    1425 (in arcseconds)
    1426 of the aperture used for each exposure is reported in PSPS as
    1427 \code{Detection.apRadius}, while the unmasked fraction of the aperture
    1428 is reported in PSPS as \code{Detection.apFillF}.
     1530stored in the DVO field \ippdbtable{Measure.Map} and exported to the
     1531PSPS as a flux in Janskies in the field \ippdbtable{Detection.apFlux}.
     1532The radius (in arcseconds) of the aperture used for each exposure is
     1533reported in PSPS as \ippdbtable{Detection.apRadius}, while the
     1534unmasked fraction of the aperture is reported in PSPS as
     1535\ippdbtable{Detection.apFillF}.
    14291536
    14301537When the PSF and aperture photometry for a source is measured, two
     
    14861593% maybe drop this discussion? too much detail?
    14871594In order to allow for multiple threads to process a single image, the
    1488 pixels in an image are divided into a grid of superpixels.  The
     1595pixels in an image are divided into a grid of superpixels \textadd{(note that
     1596these superpixels are not the same as those used for either the
     1597background model or the PSF parameter variations)}.  The
    14891598superpixels are assigned to one of four groups so that each superpixel
    14901599in a group is well separated from the other superpixels of that group.
     
    14981607considering the nearby pixels from neighboring superpixel (guaranteed
    14991608not to be in the current thread group).
     1609
     1610\note{explain number of superpixels (psphotThreadTools.c)}
    15001611
    15011612As the threads complete their analysis, they are assigned the next
     
    15891700one annulus to the next is less than a user-defined limit, then the
    15901701annulus at which the slope reaches this limit is used to define the
    1591 sky radius.  These values are saved in the output smf / cmf files, but
     1702sky radius.  These values are saved in the \textmod{output FITS catalog files}, but
    15921703not sent to the PSPS.  The sky radius value is used below in the
    15931704calculation of the Kron magnitude.
     
    16251736surface brightness.  The aperture is constrained to be less than a
    16261737maximum value defined such that the minimum surface brightness is
    1627 1/2$times$ the effective surface brightness of a point source detected at the
     17381/2$\times$ the effective surface brightness of a point source detected at the
    16281739$5\sigma$ limit.
    16291740
     
    16361747suppressed by the matched pixel on the other side.  This trick has the
    16371748effect of reducing the impact of pixels which include flux from near
    1638 neighbors.
     1749neighbors.  \textadd{We found it necessary to apply this filter because,
     1750although the source models have been subtracted, at this point in the
     1751analysis, only PSF models have been used.  Thus extended objects
     1752(galaxies) can leave behind significant amounts of flux to contaminate
     1753the neighbors.}
    16391754
    16401755% \note{give a test example}
     
    16451760After the PSF model has been fitted to all sources, and the Kron flux
    16461761has been measured for all sources, \ippprog{psphot} uses these two
    1647 measurements, along with some additional pixel-level analysis, to
    1648 determine the size class of the source.  Sources identified as
     1762measurements, along with some additional pixel-level analysis, \textmod{for
     1763classification based on source size.}  Sources identified as
    16491764extended will be fitted with a galaxy model (or possibly another type
    1650 of extended source model in special cases).  If the source is small
     1765of extended source model in special cases).  \textadd{If the source is small
    16511766compared to a PSF, it is considered to be a {\em cosmic ray} and
    1652 masked.
     1767masked.}
    16531768
    16541769Extended sources are identified as those for which the Kron magnitude
     
    16601775star.  The result is divided by the quadrature error of the PSF and
    16611776Kron magnitudes and called \code{extNsigma}.  If \code{extNsigma} is
    1662 larger than \code{PSPHOT.EXT.NSIGMA.LIMIT} (3.0), the source is
     1777larger than the configuration value \code{PSPHOT.EXT.NSIGMA.LIMIT} (3.0 for PV3), the source is
    16631778considered to be extended and the flag bit
    16641779\code{PM_SOURCE_MODE_EXT_LIMIT} is set for the source.
     
    18301945exclusion stage are subtracted from the image.  The subtraction
    18311946process modifies the image pixels (removing the fitted flux, though
    1832 not the locally fitted background) but does not modify the mask or the
    1833 variance images.  The signal-to-noise ratio in the image after
    1834 subtraction represents the significance of the remaining flux.  If the
     1947not the locally fitted background)\note{is the background actually
     1948  fitted locally?} but does not modify the mask or the variance
     1949images.  The signal-to-noise ratio in the image after subtraction
     1950represents the significance of the remaining flux.  If the
    18351951subtractions are sufficiently accurate models of the PSF flux
    1836 distribution, the remaining flux should be below 1 $\sigma$
    1837 significance.  In practice the cores of bright stars are poorly
    1838 represented and may have larger residual significance.
     1952distribution, \textmod{the remaining flux should be normally distributed about
     1953zero with a standard deviation of 1 $\sigma$}.  In practice the cores
     1954of bright stars are poorly represented and may have larger residual
     1955significance.
    18391956
    18401957For sources in groups of blended stars, the resulting fits are
     
    18952012image is not modified. 
    18962013
    1897 For the single exposure (\ippstage{camera}) and \ippstage{stack} image
     2014For the single exposure (\ippstage{chip}) and \ippstage{stack} image
    18982015analysis, these galaxy model fits are only used internally to generate
    18992016a clean object-subtracted residual image.  For the PV3 analysis of the
     
    19492066on one image based on detections in other images have the flag bit
    19502067\code{PM_SOURCE_MODE2_MATCHED} set.
     2068
     2069\note{need to discuss the injection \& recovery analysis of the completeness}
    19512070
    19522071\subsection{Aperture Correction and Total Aperture Fluxes}
     
    19792098fraction of the total source flux.  Even more importantly, as the
    19802099image conditions change, the amount lost will change by an even
    1981 smaller fraction, at least for a large aperture.  This can be seen by
    1982 the fact that the dominant variations in the image quality are in the
    1983 focus, tracking and seeing.  All of these errors initially affect the
    1984 cores of the stellar images, rather than the wide wings.  The wide
    1985 wings are largely dominated by scattering in the optics and scattering
    1986 in the atmosphere.  The amplitude and distribution of these two
    1987 scattering functions do not change significantly or quickly for a
    1988 single telescope and site.  Aperture photometry can then be used to
     2100smaller fraction, at least for a large aperture. 
     2101%
     2102% This can be seen by
     2103% the fact that the dominant variations in the image quality are in the
     2104% focus, tracking and seeing.  All of these errors initially affect the
     2105% cores of the stellar images, rather than the wide wings.  The wide
     2106% wings are largely dominated by scattering in the optics and scattering
     2107% in the atmosphere.  The amplitude and distribution of these two
     2108% scattering functions do not change significantly or quickly for a
     2109% single telescope and site. 
     2110%
     2111Aperture photometry can then be used to
    19892112correct the PSF photometry.
    19902113
     
    21112234%%% term.
    21122235
    2113 \ippprog{psphot} allows a collection of PSF model functions to be tried on all
    2114 PSF candidate sources.  For each model test, the above corrected
    2115 ApResid scatter is measured.  The PSF model function with the smallest
    2116 value for the ApResid scatter is then used by \ippprog{psphot} as the best PSF
    2117 model for this image.  The number of models to be tested is specified
    2118 by the configuration keyword \code{PSF_MODEL_N}.  The configuration
    2119 variables \code{PSF_MODEL_0}, \code{PSF_MODEL_1}, through
    2120 \code{PSF_MODEL_N - 1} specify the names of the models which should be
    2121 tested.
    2122 
    21232236\subsection{Stellar Photometry Example}
    21242237
     
    21912304%% step ($S/N > 20$, Section~\ref{sec:xxxx}). 
    21922305
    2193 The extended source analysis is not applied to all object which may be
     2306The extended source analysis is not applied to all \textmod{objects} which may be
    21942307galaxies.  Several restrictions are possible within the software.  For
    21952308example, it is possible to limit which objects are processed by their
     
    23112424output file FITS header (\code{RMIN_NN}, \code{RMAX_NN}). 
    23122425
     2426\note{specify PV3 config values?}
     2427
    23132428% \note{these profiles are not saved in PSPS}
    23142429
     
    23192434ratio of surface brightnesses.  The motivation is to define an
    23202435aperture which can be determined for galaxies without significant
    2321 biases as a function of distance from the observer.  Since surface
    2322 brightness in a resolved source is conserved as a function of
     2436biases as a function of distance from the observer.  \textmod{Since the surface
     2437brightness profile} in a resolved source is conserved as a function of
    23232438distance, using a ratio of surface brightness to define a spatial
    23242439scale results in a spatial scale which is constant regardless of
     
    24212536fewer. The 1st radial moment (see
    24222537\ref{sec:moments}) is used to estimate the effective radius of the
    2423 model based on the results of Graham \& Driver (2005, Table 1).  They
     2538model based on the results of \cite[][Table1]{2005PASA...22..118G}.  They
    24242539quantify the relationships between the first radial moment used to
    24252540calculated a Kron Magnitude and the effective radius for different
     
    24472562with the PSF model.
    24482563
    2449 We simplify this by defining:
    2450 \begin{eqnarray}
    2451 f_p (a_m)         & = & \frac{1}{\sigma_p} (I_p - M_p \otimes \mbox{PSF}) \\
    2452 \end{eqnarray}
    2453 
    24542564To determine the minimization, we need the gradient and laplacian of
    24552565$\chi^2$ with respect to the model parameters, $a_m$:
     
    246025702 H_{m,n}  & = & \sum_p \frac{\partial f_p}{\partial a_m} \frac{\partial f_p}{\partial a_n}
    24612571\end{eqnarray}
    2462 where we have approximated the Laplacian with the Hessian matrix,
     2572where we define
     2573\begin{eqnarray}
     2574f_p (a_m)         & = & \frac{1}{\sigma_p} (I_p - M_p \otimes \mbox{PSF})
     2575\end{eqnarray}
     2576and we have approximated the Laplacian with the Hessian matrix,
    24632577$H_{m,n}$ by dropping the second-derivatives (which are assumed to be
    2464 a small perturbation).  Since
     2578a small perturbation).
     2579
     2580Since
    24652581\[
    24662582\frac{\partial f_p}{\partial a_m} = -\frac{1}{\sigma_p}\frac{\partial M_p \otimes \mbox{PSF}}{\partial a_m}
     
    24862602parameters compared to the local-linear expectation and small when the
    24872603last change was small.  The iteration ends when the change in the
    2488 parameters is small and/or the change in the $\chi^2$ value is small.
    2489 
    2490 In the analysis, convolved galaxy fit, the galaxy model image and the
     2604parameters is small or the change in the $\chi^2$ value is small.
     2605
     2606In the analysis, convolved galaxy fits, the galaxy model image and the
    24912607model derivative images must be convolved with the PSF at each
    24922608iteration step.  To save computation time, this convolution is
     
    25772693additions, or up to $6 \times$ that number if we interpolate between
    25782694any of the parameters.
     2695
     2696\note{how much error does this approximation introduce?}
    25792697
    25802698\subsection{Fixed Aperture Photometry}
     
    31623280negative (minuend) images.  We identify the closest source in both the
    31633281positive and negative images to the detection in the difference image,
    3164 out to a maximum of \code{INPUT.MATCH.RADIUS} (= 50 pixels), but only
     3282out to a maximum of \code{INPUT.MATCH.RADIUS} (50 pixels for PV3), but only
    31653283if the source in those images has a signal-to-noise greater than
    3166 \code{INPUT.MATCH.MIN.SN} (= 10).  If there is a close neighbor in the
     3284\code{INPUT.MATCH.MIN.SN} (10 for PV3).  If there is a close neighbor in the
    31673285positive image, and the difference in the magnitudes of the source in
    31683286that image and the source in the difference image is less than 5
     
    32063324\section{Conclusions}
    32073325
    3208 The Pan-STARRS Image Processing Pipeline has used the \code{psphot}
     3326The Pan-STARRS Image Processing Pipeline has used the \ippprog{psphot}
    32093327software to detect and characterize astronomical sources in images
    32103328from both the PS\,1 and PS\,2 telescopes since 2008.  This software
     
    32383356
    32393357\bibliographystyle{apj}
    3240 %\bibliography{lib}{}
    3241 \input{analysis.bbl}
     3358\bibliography{lib}{}
     3359%\input{analysis.bbl}
    32423360
    32433361\end{document}
Note: See TracChangeset for help on using the changeset viewer.