IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40590


Ignore:
Timestamp:
Dec 26, 2018, 6:14:53 AM (8 years ago)
Author:
eugene
Message:

various updates (fullforce & diff)

File:
1 edited

Legend:

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

    r40589 r40590  
    121121\note{the beginning section needs to be updated to mention the DR1 and
    122122  DR2 releases, the PV0-PV3 analysis versions, and the basic idea of
    123   the IPP stages).
     123  the IPP stages}.
    124124
    125125This is the fourth in a series of seven papers describing the
     
    17341734\item Exponential profile : $f = I_0 e^{-\rho}$
    17351735\item DeVaucouleur profile \citep{1948AnAp...11..247D}: $f = I_0 e^{-\rho^{1/4}}$
    1736 \item Sersic \citep{1963BAAA....6...41S} : $f = I_0 e^{-\rho^{1/n}}$
     1736\item S\'ersic \citep{1963BAAA....6...41S} : $f = I_0 e^{-\rho^{1/n}}$
    17371737\end{itemize}
    17381738where $\rho$ is a normalized radial term: $\rho =
     
    17431743x_0, Y_{\rm chip} - y_0$).  Including the normalization ($I_0$) and a
    17441744local sky value, the Exponential and DeVaucouleur profiles have 7 free
    1745 parameters and the Sersic profile has the additional free parameter of
    1746 the Sersic index $n$.  In this stage, the galaxy model is convolved
     1745parameters and the S\'ersic profile has the additional free parameter of
     1746the S\'ersic index $n$.  In this stage, the galaxy model is convolved
    17471747with an approximation to our best guess for the PSF model at the
    17481748location of the galaxy.
     
    17721772quantive the relationships between the first radial moment used to
    17731773calculated a Kron Magnitude and the effective radius for different
    1774 Sersic index values, $n$.  Since the Exponential and DeVaucouleur
    1775 models are equivalent to Sersic models with $n$ = 1 and 4,
     1774S\'ersic index values, $n$.  Since the Exponential and DeVaucouleur
     1775models are equivalent to S\'ersic models with $n$ = 1 and 4,
    17761776respectively, this work can be used to generate the initial effective
    17771777radius values for all 3 model types.  Once the effective radius is
     
    17801780generate a guess for the normalization, applying an appropriate scale
    17811781factor based on the ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values, generated
    1782 by integrating normalized Sersic models and determining the
     1782by integrating normalized S\'ersic models and determining the
    17831783relationship between the central intensity and the integrated flux as
    1784 a function of the Sersic index.
    1785 
    1786 \note{special handling for central pixel}
     1784a function of the S\'ersic index.
    17871785
    17881786The PSF-convolved galaxy model fitting analysis uses the
     
    18591857
    18601858For the Exponential and DeVaucouleur fits, all parameters are fitted
    1861 in the non-linear minimization stage.  For the Sersic model, we do not
     1859in the non-linear minimization stage.  For the S\'ersic model, we do not
    18621860fit the index within the Levenberg-Marquardt analysis.  Instead, we
    18631861start with a coarse grid search over a range of possible index values,
    18641862($n = 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0$) and a range of possible
    18651863values for $R_{\rm eff}$ based on the value of $R_1$, the first radial
    1866 moment.  For a given value of the Sersic index, the $R_{\rm eff}$ is
     1864moment.  For a given value of the S\'ersic index, the $R_{\rm eff}$ is
    18671865related to the 1st radial moment by the scale factor specificy by
    18681866Graham \& Driver.  We use the observed value of the 1st radial moment
     
    18741872We next perform 3 Levenberg-Marquardt minimization fits allowing the
    18751873shape parameters ($R_{xx}$, $R_{yy}$ , $R_{xy}$) and the normalization
    1876 to be fitted, holding the centroid ($x_0, y_0$), Sersic index $n$, and
     1874to be fitted, holding the centroid ($x_0, y_0$), S\'ersic index $n$, and
    18771875sky constant.  In these fits, the index $n$ is set to the minimum
    18781876value previously calculated as well as values halfway to the next, and
     
    18871885% Graham & Driver : Graham A. W., Driver S. P.  2005, PASA 22, 118
    18881886% DOI: https://doi.org/10.1071/AS05001
     1887
     1888The central pixel of the S\'ersic, DeVaucouleur, and Exponential
     1889models require special handling.  When comparing an analytical model
     1890to the pixelized image recorded by a CCD, one normally treats the
     1891value in a pixel as equivalent to the value of the model at the center
     1892of the pixel.  However, in reality, the number of counts observed in a
     1893pixel represents the integral of the surface brightness across the
     1894area of the pixel.  This average will be equal to the central surface
     1895brightness times the area of a pixel as long as the second and higher
     1896derivatives of the analytical model are zero.  However, if the first
     1897and second derivatives are non-zero, the curvature of the function
     1898within the pixel will make the integral differ from the central
     1899surface brightness times a fixed pixel area.  If the curvature of the
     1900model function is sufficiently large, this difference will have a
     1901significant impact on the evaluation of the model.   This situation is
     1902particularly true for the central portion of the S\'ersic-like model
     1903functions.
     1904
     1905%% this can be seen by writing the taylor expansion of the function
     1906%% about the center of the pixel.  do this?
     1907
     1908In order to accurately compare the observed galaxy flux distribution
     1909to a model, it is necessary to integrate the pixel flux for a given
     1910set of model parameter values.  This could be done in a numerical
     1911fashion, but in practice brute-force evaluation of the numerical
     1912integral is computationally very expensive, requiring many evaluations
     1913of the model function.  Within \ippprog{psphot}, we bypass this
     1914problem by defining a set of pre-calculated images for the central 9
     1915pixels (the $3 \times 3$ grid of pixels centered on the peak).  These
     1916pixel images are defined at higher resolution, with 11 subpixels per
     1917real CCD pixel.  The pre-calculated images are generated for a series
     1918of values for the following parameters: S\'ersic index, effective
     1919radius, axial ratio.  We then select the closest image to our specific
     1920case, and integrate over the true sub-pixels relevant for our position
     1921and model.  We have thus turned the problem from thousands of
     1922evaluations of the full galaxy model to \approx 100 straight
     1923additions, or up to $6 \times$ that number if we interpolate between
     1924any of the parameters.
    18891925
    18901926\subsubsection{Convolved Radial Aperture Photometry}
     
    21092145\section{Forced Photometry Modes}
    21102146
    2111 \note{edit this section to remove references to the IPP stages; just refer to the psphot concepts}
    2112 
    21132147Traditionally, projects which use multiple exposures to increase the
    21142148depth and sensitivity of the observations have generated something
    2115 equivalent to the \ippstage{stack} images produced by the IPP analysis
     2149equivalent to the stack images produced by the IPP analysis
    21162150(c.f, CFHT Legacy survey, COSMOS, etc).  In theory, the photometry of
    2117 the \ippstage{stack} images produces the ``best'' photometry catalog,
     2151the stack images produces the ``best'' photometry catalog,
    21182152with best sensitivity and the best data quality at all magnitudes.  In
    21192153practice, these images have some significant limitations due to the
     
    21302164that point.  Because of the high mask fraction, the exposures which
    21312165contributed to pixels at one location may be somewhat different just a
    2132 few tens of pixels away.  In the end, the \ippstage{stack} images have
     2166few tens of pixels away.  In the end, the stack images have
    21332167a effective point spread function which is not just variable, but
    21342168changing significantly on small scales in a highly textured fashion.
    21352169
    21362170Any measurement which relies on a good knowledge of the PSF at the
    2137 location of an object either needs to determine the PSF variations
    2138 present in the \ippstage{stack} image or the measurement will be
    2139 somewhat degraded.  The highly textured PSF variations make this a
    2140 very challenging problem: not only would such a PSF model require an
    2141 unusually fine-grained PSF model, there would likely not be enough PSF
    2142 stars in a given \ippstage{stack} image to determine the model at the
    2143 resolution required.  The IPP photometry analysis code uses a PSF
    2144 model with 2D variations using a grid of at most $6\times 6$ samples
    2145 per skycell, a number reasonably well-matched to the density of stars
    2146 at most moderate Galactic latitudes.  This scale is far too large to
    2147 track the fine-grained changes apparent in the stack images.
    2148 
    2149 Thus PSF photometry as well as convolved galaxy models in the stack
    2150 are degraded by the PSF variations.  Aperture-like measurements are in
    2151 general not as affected by the PSF variations, as long as the aperture
    2152 in question is large compared to the FWHM of the PSF.
     2171location of an object needs to determine the PSF variations present in
     2172the stack image or the measurement will be somewhat degraded.  The
     2173highly textured PSF variations make this a very challenging problem:
     2174not only would such a PSF model require an unusually fine-grained PSF
     2175model, there would likely not be enough PSF stars in a given stack
     2176image to determine the model at the resolution required.  The IPP
     2177photometry analysis code uses a PSF model with 2D variations using a
     2178grid of at most $6\times 6$ samples per skycell, a number reasonably
     2179well-matched to the density of stars at most moderate Galactic
     2180latitudes.  This scale is far too large to track the fine-grained
     2181changes apparent in the stack images.
     2182
     2183As a result, PSF photometry as well as convolved galaxy models in the
     2184stack are degraded by the PSF variations.  Aperture-like measurements
     2185are in general not as affected by the PSF variations, as long as the
     2186aperture in question is large compared to the FWHM of the PSF.
    21532187
    21542188%% The IPP team initially explored the option of convolving each input
     
    21582192The IPP analysis solves this problem by starting with the sources
    21592193detected in the stack images and performing forced photometry on the
    2160 individual warp images used to generate the stack.  This
    2161 forced-photometry analysis is performed using the
     2194individual warp images used to generate the stack, and then combining
     2195the resulting measurements to determine a high-quality average value.
     2196This forced-photometry analysis is performed using the
    21622197\ippprog{psphotFullForce} variant of \ippprog{psphot}.
    21632198
     
    21762211image; the measured flux may even be negative due to statistical
    21772212fluctuations.  When combined together, these low-significance
    2178 measurements will result in a signficant measurement as the
    2179 signal-to-noise increases with the combination of more data.
     2213measurements result in a signficant measurement as the signal-to-noise
     2214increases with the combination of more data.
    21802215
    21812216Individual warp images are processed independently with separate
     
    21922227\label{sec:galaxy.forced.fit}
    21932228
    2194 The convolved galaxy models are also re-measured on the
    2195 \ippstage{warp} images by the \ippstage{fullforce} stage analysis.  In
    2196 this analysis, the galaxy models determined by the
    2197 \ippstage{staticsky} photometry analysis are used to seed the analysis
    2198 in the individual \ippstage{warp} images.  The motivation of this
    2199 analysis is the same as the \ippstage{fullforce} PSF photometry: the
    2200 PSF of the \ippstage{stack} image is poorly determined due to the
    2201 masking and PSF variations in the inputs.  Without a good PSF model,
    2202 the PSF-convolved galaxy models are of limited accuracy.
    2203 
    2204 In the \ippstage{fullforce} galaxy model analysis, we assume that the
    2205 galaxy position and position angle, along with the Sersic index if
    2206 appropriate, have been sufficiently well determined in the
    2207 \ippstage{staticsky} analysis.  In this case, the goal is to determine
    2208 the best values for the major and minor axis of the elliptical contour
    2209 and at the same time the best normalization corresponding to the best
     2229The convolved galaxy models are also re-measured on the warp images by
     2230the \ippprog{psphotFullForce} analysis.  In this analysis, the galaxy
     2231models determined from the stack image analysis are used to seed the
     2232analysis in the individual warp images.  The motivation of this
     2233analysis is the same as the forced PSF photometry: the PSF of the
     2234stack image is poorly determined due to the masking and PSF variations
     2235in the inputs.  Without a good PSF model, the PSF-convolved galaxy
     2236models are of limited accuracy.
     2237
     2238In the forced galaxy model analysis, we assume that the galaxy
     2239position and position angle, along with the S\'ersic index if
     2240appropriate, have been sufficiently well determined in the analysis of
     2241the stack image.  In this case, the goal is to determine the best
     2242values for the major and minor axis of the elliptical contour and at
     2243the same time the best normalization corresponding to the best
    22102244elliptical shape, and thus the best galaxy magnitude value.
    22112245
    2212 For each \ippstage{warp} image, the \ippstage{staticsky} values for
    2213 the major and minor axis are used as the center of a $5 \times 5$ grid
    2214 search of the major and minor axis parameter values.  The grid spacing
    2215 is defined as a function of the signal-to-noise of the galaxy in the
    2216 stack image so that bright galaxies are measured with a much finer
    2217 grid spacing than faint galaxies.  For both the major and minor axis
    2218 directions, values of ($1 - \frac{3.0}{S/N}$, $1 - \frac{1.5}{S/N}$,
    2219 1.0, $1 + \frac{1.5}{S/N}$, $1 + \frac{3.0}{S/N}$) times the dimension
    2220 are tested.  For each grid point, the major and minor axis values at
    2221 that point are used to generate the model.  The model is then
    2222 convolved with the PSF model for the \ippstage{warp} image at that
    2223 point.  The resulting convolved model is then compared to the
    2224 \ippstage{warp} pixel data values and the best fit normalization value
    2225 is determined.  The integrated flux, flux error, and the $\chi^2$
    2226 value for each grid point are recorded.
     2246For each warp image, the stack values for the major and minor axis are
     2247used as the center of a grid search of the major and minor axis
     2248parameter values.  The grid spacing is defined as a function of the
     2249signal-to-noise of the galaxy in the stack image so that bright
     2250galaxies are measured with a much finer grid spacing than faint
     2251galaxies.  For the PV3 $3\pi$ analysis, a $5 \times 5$ grid was used;
     2252values in both the major and minor axis directions of ($1 -
     2253\frac{3.0}{S/N}$, $1 - \frac{1.5}{S/N}$, 1.0, $1 + \frac{1.5}{S/N}$,
     2254$1 + \frac{3.0}{S/N}$) times the dimension are tested.  For each grid
     2255point, the major and minor axis values at that point are used to
     2256generate the model.  The model is then convolved with the PSF model
     2257for the warp image at that point.  The resulting convolved model is
     2258then compared to the warp pixel data values and the best fit
     2259normalization value is determined.  The integrated flux, flux error,
     2260and the $\chi^2$ value for each grid point are recorded.
    22272261
    22282262For a given galaxy, the result is a collection of $\chi^2$ values,
    22292263fluxes, and flux errors for each of the grid points spanning all
    2230 \ippstage{warp} images.  A single $\chi^2$ grid can then be made by
     2264warp images.  A single $\chi^2$ grid can then be made by
    22312265combining each grid point across the inputs.  The combined $\chi^2$
    22322266for a single grid point is simply the sum of all $\chi^2$ values at
    2233 that point.  If, for a single \ippstage{warp} image, the galaxy model
     2267that point.  If, for a single warp image, the galaxy model
    22342268is excessively masked, then that image will be dropped for all grid
    22352269points for that galaxy.  The reduced $\chi^2$ values can be determined
     
    22402274axis values for the interpolated minimum $\chi^2$ value.  The errors
    22412275on these two parameters is then found by determining the contour at
    2242 which the \note{reduced?} $\chi^2$ increases by 1.
    2243 
    2244 In this way, the \ippstage{fullforce} galaxy analysis uses the PSF
    2245 information from each \ippstage{warp} to determine a best set of
    2246 convolved galaxy models for each object in the \ippstage{skycal}
    2247 catalog.
     2276which the $\chi^2$ increases by 1.
     2277
     2278In this way, the forced galaxy model analysis uses the PSF information
     2279from each warp image to determine a best set of convolved galaxy
     2280models for each galaxy model measured for the stack image.
    22482281
    22492282\section{Difference Image Photometry}
    22502283
    2251 \note{need an intro paragraph or so}
    2252 
    2253 The variance map for a difference image must be generated from the two
    2254 images used to construct the difference.  Otherwise, the low sky level
    2255 will automatically result in inconsistent interpretation of the variance.
     2284Among the primary science drivers for Pan-STARRS are the detection of
     2285moving objects (e.g., asteroids) and explosive transient sources
     2286(e.g., supernovae).  For both of these situations, difference images
     2287are commonly used to remove the clutter of the static stars and
     2288galaxies.  In the Pan-STARRS system, difference images are generated
     2289using the PSF-matching technique described by
     2290\citep[e.g.,][]{1998ApJ...503..325A}.  The description of the
     2291Pan-STARRS implementation is given by \cite{price2017}.  The analysis
     2292of the sources detected in these difference images uses a portion of
     2293the \ippprog{psphot} code embedded in the program, \ippprog{ppSub},
     2294which generates those image. 
     2295
     2296The analysis of the difference image follows the same basic steps as
     2297other \ippprog{psphot} versions with some minor modifictions (see
     2298Table~\ref{tab:measurements}), as follows.  The background subtraction
     2299is performed before the PSF matching and image subtraction is
     2300performed.  The PSF model construction stage is not possible in the
     2301difference image due to the lack of valid sources.  Instead, the PSF
     2302model from is generated from the positive image, after PSF-matching
     2303but before the subtraction is performed.  Because we do not expect to
     2304have a large number of sources, only a single source detection pass is
     2305performed, and at the lowest signal-to-noise threshold.  Only linear
     2306PSF model fitting is performed using the centroid determined from the
     2307analysis of the source moments. 
     2308
     2309For the difference images, the galaxy model analysis is not relevant.
     2310In a properly-constructed difference image, galaxies are unlikely to
     2311remain behind as significant sources.  Most real sources in the
     2312difference image will be PSF-like and will consist of photometrically
     2313variable sources (flare stars, supernovae, etc) or astrometrically
     2314variable sources (high-proper motion stars or solar-system bodies).
     2315There are three likely classes of sources which will not be well
     2316represented by the PSF model, as discussed below.
     2317
     2318Fast-moving solar-system objects will appear as short streaks.  For
     2319example, a fast solar system object may have an apparent rate of 0.5
     2320degrees per hour, translating to 15 arcseconds in a 30 second
     2321exposure.  Even a main belt asteroid at roughly 1 AU has reflex motion
     2322of approximately 1 degree per day, equivalent to 1.25 arcsec in a 30
     2323second exposure, and may be noticeably smeared and non-PSF-like.  In
     2324\ippprog{psphot}, we use a trailed-star model to characterize these
     2325types of sources.  This model is fitted in the same portion of the
     2326code which performs the unconvolved galaxy model analysis.
     2327\note{describe the trailed analytical model}.
     2328
     2329In some cases, the stars in the two images may be somewhat offset.
     2330For specific stars, this offset may be due to differential chromatic
     2331aberration from the atmosphere or the optics, or from modest proper
     2332motion.  If the astrometric solution for one of the two images is
     2333insufficiently accurate, all stars in large portions of the images may
     2334be noticably displaced.  In both of these situations, the stars will
     2335appear as PSF dipoles in the difference images.  The positive and the
     2336negative images will have stellar profiles, but they will be offset
     2337and will not subtract well.  The two components may not have the same
     2338amplitude.  In theory, a PSF-dipole model could be used to fit these types of
     2339sources, with free parameters of the two centroids and the two
     2340fluxes.  In practice in \ippprog{psphot}, we use a number of non-parametric
     2341pixel-level statistics in an attempt to detect these cases. 
     2342
     2343\note{list the parameters}
     2344
     2345Comets appear in the difference images as a non-PSF sources.  Their
     23462-D structure includes both the flux from the coma (with a typical
     2347power-law profile) and flux from the tail (with a more complex flux
     2348distribution).  We use the Kron magnitudes to identify possibly
     2349extended objects which may be cometary in nature.  \note{need some
     2350  info from MOPS folks on what is used}
    22562351
    22572352For a difference image, both positive and negative sources will be
    22582353present.  The basic peak detection algorithm will only trigger for the
    2259 positive sources.  One solution is to simply apply \code{psphot} to
    2260 both the difference image and its negative value.
    2261 
    2262 In the case of a difference image, the PSF model construction stage
    2263 will probably fail for lack of valid sources.  It is better in these
    2264 cases to provide PSF model from some other source.  For example, the
    2265 two images which are combined to generate the difference image
    2266 represent the PSF.  Presumably, one or both have been convolved with a
    2267 PSF-matching kernel.  The images which result from the convolution
    2268 should be used to measure the PSF model.  \note{this is what we
    2269   actually do, so remove hypothetical wording.}
    2270 
    2271 The source classification scheme defaults to the galaxy models for
    2272 sources which are not well represented by the PSF model.  In a
    2273 properly-constructed difference image, galaxies are unlikely to remain
    2274 behind as significant sources.  Most real sources in the difference
    2275 image will be PSF-like and will consist of photometrically variable
    2276 sources (flare stars, supernovae, etc) or astrometrically variable
    2277 sources (high-proper motion stars or solar-system bodies).  There are
    2278 three likely classes of sources which will not be well represented by
    2279 the PSF model.  1) Fast-moving solar-system objects will appear as
    2280 short streaks.  For example, a fast solar system object would have an
    2281 apparent rate of 0.5 degrees per hour, translating to 15 arcseconds in
    2282 a 30 second exposure.  Even a main belt asteroid at roughly 1 AU would
    2283 have reflect motion of approximately 1 degree per day, equivalent to
    2284 1.25 arcsec in a 30 second exposure, and could be noticeably smeared
    2285 and non-PSF-like.  A trailed-star model can be used to characterize
    2286 these types of sourcess.  2) Small offset stars, either due to
    2287 atmospheric / color effects or modest proper motion will appear as PSF
    2288 dipoles in the difference images.  The positive and the negative
    2289 images will have stellar profiles, but they will be significantly
    2290 offset and will not subtract well.  The two components may not have
    2291 the same amplitude.  A PSF-dipole model can be used to fit these types
    2292 of sources, with free parameters of the two centroids and the two
    2293 fluxes.  3) Comets will appear in the difference images as a non-PSF
    2294 sources.  Their 2-D structure includes both the flux from the coma
    2295 (with a typical power-law profile) and flux from the tail (with a more
    2296 complex flux distribution).  A comet flux model can be used to
    2297 characterize these sources in difference images.  A major difficulty
    2298 in applying these three types of models is in making a robust test of
    2299 which model should be used.  This problem is akin to the issue of
    2300 selecting and distinguishing between multiple galaxy models, as
    2301 discussed in the section on Galaxy models.
     2354positive sources.  In the \ippprog{ppSub} program, both the $A - B$
     2355and the $B - A$ images are sent to the \ippprog{psphot} routine for
     2356source detection and characterization.
     2357
     2358Note that the variance image for a difference image must be generated
     2359from the two positive images used to construct the difference.  It is
     2360possible to run \ippprog{psphot} as an external program on a
     2361difference image generated previously.  In this case, the variance
     2362image and the PSF model must be supplied as well as the difference
     2363image.
    23022364
    23032365\section{Examples and Tests}
     2366
     2367\note{to be added}
    23042368
    23052369\acknowledgments
Note: See TracChangeset for help on using the changeset viewer.