IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39819


Ignore:
Timestamp:
Nov 20, 2016, 5:46:12 AM (10 years ago)
Author:
eugene
Message:

updates

File:
1 edited

Legend:

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

    r39815 r39819  
    1 \documentclass[iop,floatfix,onecolumn]{emulateapj}
     1\documentclass[iop,floatfix]{emulateapj}
     2% \documentclass[iop,floatfix,onecolumn]{emulateapj}
    23% \pdfoutput=1
    34
     
    11351136Petrosian flux is contained. 
    11361137
     1138\subsection{Radial Profile Wings}
     1139
     1140We attempt to measure the radial profile of sources in order to find
     1141the radius at which the flux of the object is matches the sky.  In
     1142this analysis, a series of up to 25 radial bins with power-law spacing
     1143are defined and the flux of the object in each annulus is measured.
     1144The ``sky radius'' is defined to be the radius at which the (robust
     1145median) flux in the annulus is within 1 $\sigma$ of the local sky
     1146level.  If this limit is not reached before the slope of the flux from
     1147one annulus to the next is less that \note{SOMETHING,
     1148  psphotRadialProfileWings.c}, then the annulus at which the slope
     1149reaches this limit is used to define the sky radius.  These values are
     1150saved in the output smf / cmf files, but not sent to the PSPS.  The
     1151sky radius value is used below in the calculation of the kron magnitude.
     1152
    11371153\subsection{Kron Magnitudes}
    11381154
    1139 
     1155Preliminary Kron radius and flux values are calculated soon after
     1156sources are detected (\ref{sec:moments}).  However, these preliminary
     1157values are not accurate due to the window-functions applied.  After
     1158sources have been characterized and the PSF model is well-determined,
     1159the Kron parameters are re-calculated more carefully.  In this version
     1160of the calculation, the image is first smoothed by Gaussian kernel
     1161with $\sigma = 1.7$ pixels, corresponding to a FWHM of 1.0\arcsec in
     1162the PS1 stack images.  Next, the Kron radius is determined in an
     1163iterative process: the first radial moment is measured using the pixels in an
     1164aperture 6$\times$ the first radial moment from the previous
     1165iteration.  On the first iteration, the sky radius is used in place of
     1166the first radial moment.  By default, 2 iterations are performed.  The
     1167Kron radius is defined the be 2.5$\times$ the first radial moment.
     1168The Kron flux is the sum of pixel fluxes within the Kron radius.  We
     1169also calculate the flux in two related annular apertures: the Kron
     1170inner flux is the sum of pixel values for the annulus $R_1 < r < 2.5
     1171R_1$, while the Kron outer flux is the sum of pixel values for $2.5
     1172R_1 < r < 4 R_1$. 
     1173
     1174Two details in the calculation above should be noted.  First, for
     1175faint sources, noise in the measurement of the 1st radial moment may
     1176result in an excessively small aperture for the successive
     1177calculations.  The window used for the calculations is constrained to
     1178be at least the size of the aperture based on the PSF stars
     1179(\ref{sec:moments}).  At the other extreme, noise may make the radius
     1180grow excessively, resulting in an unrealistically low effective
     1181surface brightness.  The aperture is constrained to be less than a
     1182maximum value defined such that the minimum surface brightness is
     11831/2$times$ the effective surface brightness of a source detected at the
     1184$5\sigma$ limit.
     1185
     1186Second, the measurement of the 1st radial moment includes a filter to
     1187reduce contamination from outlier pixels.  Pairs of pixels on
     1188opposites sides of the central pixel are considered together.  The
     1189geometric mean of the two fluxes is used to replace the flux values.
     1190If the object has 180\degree symmetry, this operation has no impact.
     1191However, if one of the two pixels is unusually high, the value will be
     1192surpressed by the matched pixel on the other side.  This trick has the
     1193effect of reducing the impact of pixels which include flux from near
     1194neighbors.
    11401195
    11411196\subsection{Convolved Galaxy Model Fits}
     
    11501205\end{itemize}
    11511206where $\rho$ is a normalized radial term: $\rho =
    1152 \sqrt{\frac{x^2}{R^2_{xx}} + \frac{y^2}{R^2_{yy}} + x y R_{xx}}$.  The
     1207\sqrt{\frac{x^2}{R^2_{xx}} + \frac{y^2}{R^2_{yy}} + x y R_{xy}}$.  The
    11531208terms ($R_{xx}$, $R_{yy}$ , $R_{xy}$) describe the elliptical contour
    11541209and the profile scale in all three models and the coordinates $x$ \&
    1155 $y$ are determined relative to the centroids $x_0, y_0$.  Including
    1156 the normalization ($I_0$) and a local sky value, the Exponential and
    1157 DeVaucouleur profiles have 7 free parameters and the Sersic profile
    1158 has the additional free parameter of the Sersic index $n$.
    1159 
    1160 In this stage, the galaxy model is convolved with our best guess for
    1161 the PSF model at the location of the galaxy.  For the PV3 analysis,
    1162 all sources detected in the 'bright source' analysis step (S/N > 20 ?)
    1163 were fitted with all three galaxy models, unless (a) the morphological
    1164 test identified the source as a likely cosmic ray (\ref{CR}) or (b)
    1165 the peak of the PSF profile was above the saturation limit for the
    1166 chip \note{link to the handling of saturation in detrend paper}.
    1167 Sources in the denser portions of the Galactic plane and bulge were
    1168 not included in the analysis.  This restriction limited the total time
    1169 spent on the galaxy modeling analysis at the expense of galaxy
    1170 photometry in the plane (though Kron photometry is available for those
    1171 objects).
    1172 
    1173 The Galactic Plane region was defined by $|b| > b_{\rm min}$ where
    1174 $b_{\rm min} = b_0 + r_b e^{\frac{-l^2}{2 \sigma_b^2}}$.  For the PV3
    1175 analysis, $b_0 = XX$, $r_b = XX$, $\sigma_b = XX$.
    1176 
    1177 The galaxy models are fitted using the same Levenberg-Marquart
    1178 minimization code use for the other non-linear fitting stages. 
     1210$y$ are determined relative to the centroids ($x,y = X_{\rm chip} -
     1211x_0, Y_{\rm chip} - y_0$).  Including the normalization ($I_0$) and a
     1212local sky value, the Exponential and DeVaucouleur profiles have 7 free
     1213parameters and the Sersic profile has the additional free parameter of
     1214the Sersic index $n$.
     1215
     1216In this stage, the galaxy model is convolved with an approximation to
     1217our best guess for the PSF model at the location of the galaxy.  For
     1218the PV3 analysis, all sources detected in the 'bright source' analysis
     1219step ($S/N > 20 ?$) were fitted with all three galaxy models, unless
     1220(a) the morphological test identified the source as a likely cosmic
     1221ray (\ref{CR}) or (b) the peak of the PSF profile was above the
     1222saturation limit for the chip \note{(link to the handling of
     1223  saturation in detrend paper)}.  Sources in the denser portions of
     1224the Galactic plane and bulge were not included in the analysis.  This
     1225restriction limited the total time spent on the galaxy modeling
     1226analysis at the expense of galaxy photometry in the plane (though Kron
     1227photometry is available for those objects).  The Galactic Plane region
     1228was defined by $|b| > b_{\rm min}$ where $b_{\rm min} = b_0 + r_b
     1229e^{\frac{-l^2}{2 \sigma_b^2}}$.  For the PV3 analysis, $b_0 = XX$,
     1230$r_b = XX$, $\sigma_b = XX$.
    11791231
    11801232Before the non-linear fitting may be performed, it is necessary to
    1181 determine the initial values for the parameters to be fitted.  For
    1182 each of the three model types, the position determined from the PSF
    1183 fitting analysis is used as the initial centroid $x_0,y_0$.  A guess
    1184 for the terms ($R_{xx}$, $R_{yy}$ , $R_{xy}$) is generated based on
    1185 the second moments.  The guess does not attempt to use PSF model to
    1186 adjust the ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values; it was found that
    1187 such a guess tended to be too small and resulted in more iterations
    1188 rather than fewer. \note{more detail on that?}  The Kron flux is used
    1189 to generate a guess for the normalization, applying an appropriate
    1190 scale factor based on the ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values.
    1191 
    1192 For the Sersic model, we do not fit the index in the
    1193 Levenberg-Marquardt analysis.  Instead, we 
    1194 
    1195 % start with coarse grid search over the following index values:
    1196 % n = 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0
    1197 
    1198 
    1199 
    1200 
    1201 In the
    1202 convolved galaxy fit, the galaxy model image and the model derivative
    1203 images are convolved with the psf at each iteration. WRITE out the
    1204 chi-square and show how this is separated out as a set of images.  For
    1205 the Exponential and DeVaucouleur fits, all parameters are fitted in
    1206 the non-linear minimization stage.  For the Sersic model fits, there
    1207 is too much degeneracy (yes?) between ???.  We determine the Sersic
    1208 index using a grid search, using the non-linear minimization for the
    1209 remaining parameters on each grid search step.  The index is fitted in
    1210 the following values (XXXXX).
    1211 
    1212 With XXXM galaxies to It is important to make an initial guess for the model parameters
    1213 which is reasonably close to the best fit value,
     1233determine initial values for the parameters to be fitted.  For each of
     1234the three model types, the position determined from the PSF fitting
     1235analysis is used as the initial centroid $x_0,y_0$.  A guess for the
     1236terms ($R_{xx}$, $R_{yy}$ , $R_{xy}$) is generated based on the second
     1237moments.  The guess does not attempt to use the PSF model to adjust the
     1238($R_{xx}$, $R_{yy}$ , $R_{xy}$) values; it was found that such a guess
     1239tended to be too small and resulted in more iterations rather than
     1240fewer. \note{more detail on that?}  The 1st radial moment (see
     1241\ref{sec:moments}) is used to estimate the effective radius of the
     1242model based on the results of Graham \& Driver (2005, Table 1).  They
     1243quantive the relationships between the first radial moment used to
     1244calculated a Kron Magnitude and the effective radius for different
     1245Sersic index values, $n$.  Since the Exponential and DeVaucouleur
     1246models are equivalent to Sersic models with $n$ = 1 and 4,
     1247respectively, this work can be used to generate the initial effective
     1248radius values for all 3 model types.  Once the effective radius is
     1249chosen, the second moments are used to define the aspect ratio and
     1250position angle of the elliptical contour.  The Kron flux is used to
     1251generate a guess for the normalization, applying an appropriate scale
     1252factor based on the ($R_{xx}$, $R_{yy}$ , $R_{xy}$) values, generated
     1253by integrating normalized Sersic models and determining the
     1254relationship between the central intensity and the integrated flux as
     1255a function of the Sersic index.
     1256
     1257The PSF-convolved galaxy model fitting analysys uses the
     1258Levenberg-Marquardt method to determine the best fit.  In this
     1259process, the $\chi^2$ value to be minimized is:
     1260\[
     1261\chi^2 (\bar{a}) = \sum_p \frac{1}{\sigma_p^2} \left[I_p - M_p(\bar{a}) \otimes \mbox{PSF} \right]^2
     1262\]
     1263where $I_p$ represents the pixel values in the image (within some
     1264aperture) and $M_p(\bar{a})$ represents the unconvolved galaxy model, a
     1265function of a number of parameters $\bar{a}$, which is then convolved
     1266with the PSF model.
     1267
     1268We simplify this by defining:
     1269\begin{eqnarray}
     1270f_p (a_m)         & = & \frac{1}{\sigma_p} (I_p - M_p \otimes \mbox{PSF}) \\
     1271\end{eqnarray}
     1272
     1273To determine the minimization, we need the gradient and laplacian of
     1274$\chi^2$ with respect to the model parameters, $a_m$:
     1275\begin{eqnarray}
     1276\chi^2 (\bar{a})  & = & \sum_p f_p^2  \\
     12772 \nabla   \chi^2  & = & \sum_p f_p \frac{\partial f_p}{\partial a_m} \\
     1278\nabla^2 \chi^2  & \approx & H_{m,n} \\
     12792 H_{m,n}  & = & \sum_p \frac{\partial f_p}{\partial a_m} \frac{\partial f_p}{\partial a_n}
     1280\end{eqnarray}
     1281where we have approximated the Laplacian with the Hessian matrix,
     1282$H_{m,n}$ by dropping the second-derivatives (which are assumed to be
     1283a small perturbation).  Since
     1284\[
     1285\frac{\partial f_p}{\partial a_m} = -\frac{1}{\sigma_p}\frac{\partial M_p \otimes \mbox{PSF}}{\partial a_m}
     1286\]
     1287and since the order of the derivative and convolution may be
     1288exchanged, we can write these in terms of the convolved image of the
     1289model and the convolved images of the derivatives of the model $M_p$ with respect to the model parameters, $a_m$:
     1290\begin{eqnarray}
     1291\mathcal{M}_{p}   & = & M_p \otimes \mbox{PSF} \\
     1292\mathcal{M}^\prime_{p,m} & = & \frac{\partial M_p}{\partial a_m} \otimes \mbox{PSF} \\
     12932 \nabla \chi^2    & = & -\sum_p \frac{I_p - \mathcal{M}_p}{\sigma_p} \mathcal{M}^\prime_{p,m} \\
     12942 H_{m,n}  & = &  \sum_p \frac{1}{\sigma_p^2} \mathcal{M}^\prime_{p,m} \mathcal{M}^\prime_{p,n}
     1295\end{eqnarray}
     1296The gradient vector and Hessian matrix are used in the
     1297Levenberg-Marquardt minimization analysis using the standard
     1298techinique of determining a step from the current set of model
     1299parameters to a new set by solving the matrix equation:
     1300\[
     1301(1 + \lambda_{m,n}) H_{m,n} = \delta \nabla \chi^2
     1302\]
     1303where $\lambda_{m,n}$ is zero for $m \neq n$ and for $m = n$ set to be
     1304large when the last iteration produced a large change in the
     1305parameters compared to the local-linear expectation and small when the
     1306last change was small.  The iteration ends when the change in the
     1307parameters is small and/or the change in the $\chi^2$ value is small.
     1308
     1309In the analysis, convolved galaxy fit, the galaxy model image and the
     1310model derivative images must be convolved with the PSF at each
     1311iteration step.  To save computation time, this convolution is
     1312performed using a circularly symmetric approximation of the PSF model,
     1313with the PSF model scale size set to the average of the major and
     1314minor axis direction scale size of the full PSF model, with the same
     1315radial profile term as the PSF model.  The convolution is performed
     1316directly using the circular symmetry to reduce the number of
     1317multiplications performed: all points in the 2D circularly symmetric
     1318PSF model which have the same radial pixel coordinate can be evaluated
     1319in the convolution by summing up the corresponding pixels in the
     1320(galaxy model) image to be convolved before multiplying by the PSF
     1321model profile at that radial coordinate.  This approximation reduces
     1322the number of multiplications by a factor of near 8 for larger radii.
     1323For the small size of the PSF model used to convolve the galaxy model
     1324images, it was found that this direct convolution was faster than
     1325using an FFT-based convolution \note{(examples?)}
     1326
     1327Recipe parameters which affect the PSF-convolved galaxy model fitting
     1328process:
     1329\begin{verbatim}
     1330EXT_FIT_NSIGMA_CONV [9] : number of sigma
     1331EXT_FIT_ITER
     1332EXT_FIT_MIN_TOL
     1333EXT_FIT_MAX_TOL
     1334LMM_FIT_CHISQ_CONVERGENCE
     1335LMM_FIT_GAIN_FACTOR_MODE
     1336\end{verbatim}
     1337
     1338For the Exponential and DeVaucouleur fits, all parameters are fitted
     1339in the non-linear minimization stage.  For the Sersic model, we do not
     1340fit the index within the Levenberg-Marquardt analysis.  Instead, we
     1341start with a coarse grid search over a range of possible index values,
     1342($n = 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0$) and a range of possible
     1343values for $R_{\rm eff}$ based on the value of $R_1$, the first radial
     1344moment.  For a given value of the Sersic index, the $R_{\rm eff}$ is
     1345related to the 1st radial moment by the scale factor specificy by
     1346Graham \& Driver.  We use the observed value of the 1st radial moment
     1347and try $R_{\rm eff}$ values of a factor of (0.8, 0.9, 1.0, 1.12,
     13481.25) times the value predicted by the Graham and Driver equation.
     1349For each of these steps, the aspect ratio and position angle are held
     1350constant and the normalization is determined to minimize the $\chi^2$.
     1351
     1352We next perform 3 Levenberg-Marquardt minimization fits allowing the
     1353shape parameters ($R_{xx}$, $R_{yy}$ , $R_{xy}$) and the normalization
     1354to be fitted, holding the centroid ($x_0, y_0$), Sersic index $n$, and
     1355sky constant.  In these fits, the index $n$ is set to the minimum
     1356value previously calculated as well as values halfway to the next, and
     1357previous, values in the grid above.  E.g., if the minimum fitted index
     1358value is 3.0, then the LMM fits are performed using $n$ = 2.5, 3.0, 3.5.
     1359The resulting $\chi^2$ values are then used to perform quadratid
     1360interpolation to find the index $n$ which produces the locally minium
     1361$\chi^2$ value.  Finally, this best-fit index value is held constant
     1362while Levenberg-Marquardt minimization is used to find the best fit
     1363values of all other parameters.
     1364
     1365% Graham & Driver : Graham A. W., Driver S. P.  2005, PASA 22, 118
     1366% DOI: https://doi.org/10.1071/AS05001
    12141367
    12151368\subsection{Convolved Radial Aperture Photometry}
Note: See TracChangeset for help on using the changeset viewer.