IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40609


Ignore:
Timestamp:
Jan 23, 2019, 5:34:46 PM (7 years ago)
Author:
eugene
Message:

add descriptions of bit flags and pwfQf

File:
1 edited

Legend:

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

    r40608 r40609  
    545545*   PM\_SOURCE\_MODE\_PSFMODEL            & 0x00000001 & Source fitted with a psf model (linear or non-linear) \\
    546546*   PM\_SOURCE\_MODE\_EXTMODEL            & 0x00000002 & Source fitted with an extended-source model \\
    547     PM\_SOURCE\_MODE\_FITTED              & 0x00000004 & Source fitted with non-linear model (PSF or EXT; good or bad) \\
    548     PM\_SOURCE\_MODE\_FAIL                & 0x00000008 & Fit (non-linear) failed (non-converge, off-edge, run to zero) \\
    549     PM\_SOURCE\_MODE\_POOR                & 0x00000010 & Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) \\
    550     PM\_SOURCE\_MODE\_PAIR                & 0x00000020 & Source fitted with a double psf \\
    551     PM\_SOURCE\_MODE\_PSFSTAR             & 0x00000040 & Source used to define PSF model \\
    552     PM\_SOURCE\_MODE\_SATSTAR             & 0x00000080 & Source model peak is above saturation \\
    553     PM\_SOURCE\_MODE\_BLEND               & 0x00000100 & Source is a blend with other sources \\
    554     PM\_SOURCE\_MODE\_EXTERNAL            & 0x00000200 & Source based on supplied input position \\
    555     PM\_SOURCE\_MODE\_BADPSF              & 0x00000400 & Failed to get good estimate of object's PSF \\
    556     PM\_SOURCE\_MODE\_DEFECT              & 0x00000800 & Source is thought to be a defect \\
    557     PM\_SOURCE\_MODE\_SATURATED           & 0x00001000 & Source is thought to be saturated pixels (bleed trail) \\
    558     PM\_SOURCE\_MODE\_CR\_LIMIT           & 0x00002000 & Source has crNsigma above limit \\
    559     PM\_SOURCE\_MODE\_EXT\_LIMIT          & 0x00004000 & Source has extNsigma above limit \\
    560     PM\_SOURCE\_MODE\_MOMENTS\_FAILURE    & 0x00008000 & could not measure the moments \\
    561     PM\_SOURCE\_MODE\_SKY\_FAILURE        & 0x00010000 & could not measure the local sky \\
    562     PM\_SOURCE\_MODE\_SKYVAR\_FAILURE     & 0x00020000 & could not measure the local sky variance \\
    563     PM\_SOURCE\_MODE\_BELOW\_MOMENTS\_SN  & 0x00040000 & moments not measured due to low S/N \\
    564     PM\_SOURCE\_MODE\_BIG\_RADIUS         & 0x00100000 & poor moments for small radius, try large radius \\
    565     PM\_SOURCE\_MODE\_AP\_MAGS            & 0x00200000 & source has an aperture magnitude \\
    566     PM\_SOURCE\_MODE\_BLEND\_FIT          & 0x00400000 & source was fitted as a blend \\
    567     PM\_SOURCE\_MODE\_EXTENDED\_FIT       & 0x00800000 & full extended fit was used \\
    568     PM\_SOURCE\_MODE\_EXTENDED\_STATS     & 0x01000000 & extended aperture stats calculated \\
    569     PM\_SOURCE\_MODE\_LINEAR\_FIT         & 0x02000000 & source fitted with the linear fit \\
    570     PM\_SOURCE\_MODE\_NONLINEAR\_FIT      & 0x04000000 & source fitted with the non-linear fit \\
    571     PM\_SOURCE\_MODE\_RADIAL\_FLUX        & 0x08000000 & radial flux measurements calculated \\
    572     PM\_SOURCE\_MODE\_SIZE\_SKIPPED       & 0x10000000 & size could not be determined \\
     547*   PM\_SOURCE\_MODE\_FITTED              & 0x00000004 & Source fitted with non-linear model (PSF or EXT; good or bad) \\
     548*   PM\_SOURCE\_MODE\_FAIL                & 0x00000008 & Fit (non-linear) failed (non-converge, off-edge, run to zero) \\
     549*   PM\_SOURCE\_MODE\_POOR                & 0x00000010 & Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) \\
     550*   PM\_SOURCE\_MODE\_PAIR                & 0x00000020 & Source fitted with a double psf \\
     551*   PM\_SOURCE\_MODE\_PSFSTAR             & 0x00000040 & Source used to define PSF model \\
     552*   PM\_SOURCE\_MODE\_SATSTAR             & 0x00000080 & Source model peak is above saturation \\
     553*   PM\_SOURCE\_MODE\_BLEND               & 0x00000100 & Source is a blend with other sources$^1$ \\
     554*   PM\_SOURCE\_MODE\_EXTERNAL            & 0x00000200 & Source based on supplied input position \\
     555*   PM\_SOURCE\_MODE\_BADPSF              & 0x00000400 & Failed to get good estimate of object's PSF \\
     556*   PM\_SOURCE\_MODE\_DEFECT              & 0x00000800 & Source is thought to be a defect \\
     557*   PM\_SOURCE\_MODE\_SATURATED           & 0x00001000 & Source is thought to be saturated pixels (bleed trail) \\
     558*   PM\_SOURCE\_MODE\_CR\_LIMIT           & 0x00002000 & Source has crNsigma above limit \\
     559*   PM\_SOURCE\_MODE\_EXT\_LIMIT          & 0x00004000 & Source has extNsigma above limit \\
     560*   PM\_SOURCE\_MODE\_MOMENTS\_FAILURE    & 0x00008000 & could not measure the moments \\
     561*   PM\_SOURCE\_MODE\_SKY\_FAILURE        & 0x00010000 & could not measure the local sky \\
     562*   PM\_SOURCE\_MODE\_SKYVAR\_FAILURE     & 0x00020000 & could not measure the local sky variance \\
     563x   PM\_SOURCE\_MODE\_BELOW\_MOMENTS\_SN  & 0x00040000 & moments not measured due to low S/N.$^1$ \\
     564*   PM\_SOURCE\_MODE\_BIG\_RADIUS         & 0x00100000 & poor moments for small radius, try large radius \\
     565*   PM\_SOURCE\_MODE\_AP\_MAGS            & 0x00200000 & source has an aperture magnitude \\
     566*   PM\_SOURCE\_MODE\_BLEND\_FIT          & 0x00400000 & source was fitted as a blend \\
     567*   PM\_SOURCE\_MODE\_EXTENDED\_FIT       & 0x00800000 & full extended fit was used \\
     568*   PM\_SOURCE\_MODE\_EXTENDED\_STATS     & 0x01000000 & extended aperture stats calculated \\
     569*   PM\_SOURCE\_MODE\_LINEAR\_FIT         & 0x02000000 & source fitted with the linear fit \\
     570*   PM\_SOURCE\_MODE\_NONLINEAR\_FIT      & 0x04000000 & source fitted with the non-linear fit \\
     571*   PM\_SOURCE\_MODE\_RADIAL\_FLUX        & 0x08000000 & radial flux measurements calculated \\
     572x   PM\_SOURCE\_MODE\_SIZE\_SKIPPED       & 0x10000000 & size could not be determined$^2$ \\
    573573    PM\_SOURCE\_MODE\_ON\_SPIKE           & 0x20000000 & peak lands on diffraction spike \\
    574574    PM\_SOURCE\_MODE\_ON\_GHOST           & 0x40000000 & peak lands on ghost or glint \\
    575575    PM\_SOURCE\_MODE\_OFF\_CHIP           & 0x80000000 & peak lands off edge of chip \\
     576\hline
     577\multicolumn{3}{l}{$^1$ not used for DR1 or DR2.} \\
     578\multicolumn{3}{l}{$^2$ should not normally occur, does it?} \\
    576579\hline
    577580\end{tabular}
     
    10381041centroid is used to center the window function.
    10391042
     1043For sources with peak flux above the saturation limit, the moments are
     1044generally poorly measured if the aperture defined by $\sigma_w$ is
     1045used.  For these sources, the quality of the measurment is compromised
     1046by the saturation.  However, it is still useful to estimate the first
     1047and second moments of the source in order to allow a crude measurement
     1048of the brightness from the wings of the source.  In this case, a
     1049larger aperture, 3 times the standard aperture, is used to make a
     1050crude estimate.  For such sources, the flag bit
     1051\code{PM_SOURCE_MODE_BIG_RADIUS} is set and the source is ignored in
     1052all analyses below except for the analysis applied to very bright
     1053stars (Section~\ref{sec:very.bright.star}).
     1054
    10401055If the measured centroid coordinates ($x_0, y_0$) differ from the peak
    10411056coordinates be a large amount (1.5$\sigma_w$), then the peak is
    1042 identified as being of poor quality (\code{infoFlag} bit
    1043 \code{MOMENTS_FAILURE}) and is skipped in further analyses.  In such
    1044 as case, it is likely that the `peak' was identified in a region of
    1045 flat flux distribution or many saturated or edge pixels.
     1057identified as being of poor quality and is skipped in further
     1058analyses; the flag bit
     1059\code{PM_SOURCE_MOMENTS_FAILURE} is set for such sources.  In such
     1060a case, it is likely that the `peak' was identified in a region of
     1061flat flux distribution or many saturated or edge pixels.  During the
     1062analysis of the moments, the background (``sky'') model is also examined for the
     1063location of each source.  The value of the background and the variance
     1064of the background are recorded for each source.  In some cases, the
     1065sky model or the variance is not well defined at the location of a
     1066specific sources (e.g., due to an extrapolation failure).  In these
     1067cases, the flag bits \code{PM_SOURCE_SKY_FAILURE} or
     1068\code{PM_SOURCE_SKYVAR_FAILURE} are set as appropriate and the
     1069measurement of the moments is skipped. 
    10461070
    10471071In addition to the moments above, the 1st and half-radial moments,
     
    12541278produce a single peak.  To avoid detecting a peak from the unresolved
    12551279cosmic rays, sources which have second-moments very close to 0 are
    1256 ignored.
     1280ignored.  For these sources, the flag bit \code{PM_SOURCE_MODE_DEFECT}
     1281is set.
    12571282
    12581283Once a peak has been detected in this plane, the centroid and second
     
    12601285pixels of this centroid are selected as candidate PSF sources in the
    12611286image.
     1287
     1288When the second moments are measured, \ippprog{psphot} also counts the
     1289number of saturated pixels within the analysis aperture.  If more than
     1290a single saturated pixel is found, and if the second moments of that
     1291object are more than one standard deviation larger than the clump
     1292identified above, this source is identified as a highly saturated star
     1293and marked with the flag bit \code{PM_SOURCE_MODE_SATSTAR}.  Sources
     1294which have more than a single saturated pixel, but for which the
     1295second moments do not exceed the above limits are marked as likely
     1296saturated regions (e.g., bleed trails).  These sources are skipping in
     1297most additional analyses and are marked with the flag bit
     1298\code{PM_SOURCE_MODE_SATURATED}.
    12621299
    12631300\begin{figure}[htbp]
     
    13041341snuck into the sample).  Sources whose model parameters are rejected
    13051342by this iterative fitting technique are also marked as invalid PSF
    1306 sources and ignored in the later PSF model fitting stages.
     1343sources and ignored in the later PSF model fitting stages.  Sources
     1344which are actually used to define the PSF model for a given image have
     1345the flag bit \code{PM_SOURCE_MODE_PSFSTAR} set.
    13071346
    13081347The order of the fit or number of grid samples is modified if the
     
    13541393is measured here, with a more detailed correction measured after all
    13551394source analysis is performed (see
    1356 Section~\ref{sec:aperture.correction}).
     1395Section~\ref{sec:aperture.correction}).  Sources for which the
     1396aperture magnitude is measured have the flag bit
     1397\code{PM_SOURCE_MODE_AP_MAGS} set.  These aperture magnitudes are
     1398stored in the DVO field \code{Measure.Map} and exported to the PSPS as
     1399a flux in Janskies in the field \code{Detection.apFlux}.  The radius
     1400(in arcseconds)
     1401of the aperture used for each exposure is reported in PSPS as
     1402\code{Detection.apRadius}, while the unmasked fraction of the aperture
     1403is reported in PSPS as \code{Detection.apFillF}.
     1404
     1405When the PSF and aperture photometry for a source is measured, two
     1406additional quantities are measured which are useful to assess the
     1407quality of the measurements.  First, the mask image is examined and the
     1408number of unmasked pixels is summed, weighted by the normalized PSF
     1409model.  The resulting quantity, \code{PSF_QF} has a value between 0.0
     1410(totally masked) and 1.0 (totally unmasked).  Elsewhere in the IPP
     1411system, we use this value to filter out detections which are
     1412unreliable due to the masking.  For a generous cut, leaning toward
     1413completeness at the cost of some lower quality measurements,
     1414\code{PSF_QF} $> 0.85$ is used in some contexts; in other cases, we
     1415require \code{PSF_QF} $> 0.95$ to ensure a high-quality measurement
     1416\citep[see for example the calculation of average photometry
     1417  in][]{magnier2017.calibration}.  The second quantity is related to
     1418the first: \code{PSF_QF_PERFECT} uses all mask values to assess the
     1419quality factor, while \code{PSF_QF} uses only the ``bad'' mask bit
     1420values (see Section~\ref{sec:image.preparation}).
    13571421
    13581422\subsection{Bright Source Analysis}
     
    14581522PSF.  Sources for which a PSF model has been fitted (whether or not
    14591523this is retained as the best model in the end) has the flag field
    1460 \code{PM_SOURCE_MODE_PSFMODEL} set.
     1524\code{PM_SOURCE_MODE_PSFMODEL} set.  All sources which are included in
     1525the ensemble linear fit have the flag bit
     1526\code{PM_SOURCE_MODE_LINEAR_FIT} set, including those for which the
     1527model is not the PSF.
    14611528
    14621529\subsubsection{Radial Profile Wings}
     
    15441611Kron magnitudes and called \code{extNsigma}.  If \code{extNsigma} is
    15451612larger than \code{PSPHOT.EXT.NSIGMA.LIMIT} (3.0), the source is
    1546 considered to be extended.
     1613considered to be extended and the flag bit
     1614\code{PM_SOURCE_MODE_EXT_LIMIT} is set for the source.
    15471615
    15481616Cosmic rays are identified by a combination of the Kron magnitude and
     
    15571625identified as a cosmic ray and the associated pixels are masked.
    15581626These values are tuned empirically for the PV3 analysis based on
    1559 cosmic rays identified in the GPC1 images.
     1627cosmic rays identified in the GPC1 images.  Sources which are
     1628determined to the a cosmic ray in this manner have the flag bit
     1629\code{PM_SOURCE_MODE_DEFECT} set.
     1630
     1631The pixels of any suspected cosmic ray identified above are examined
     1632in additional detail to make a final judgement.  The Laplacian edge
     1633detection algorithm based on \cite{2001PASP..113.1420V} is used to
     1634check for sharp edges in the flux distribution.  If the sharpness
     1635exceeds a defined limit, then the pixels are masked and the flag bit
     1636\code{PM_SOURCE_MODE_CR_LIMIT} is set for the source.
    15601637
    15611638% Mminor < 0.8 && SN > 7
     
    15841661non-linear fitting.  The sources are fitted in their S/N order,
    15851662starting with the brightest and working down to the user-specified
    1586 limit, with the other sources subtracted as discussed above.
     1663limit, with the other sources subtracted as discussed above.  All
     1664sources for which a non-linear PSF model has been attempted have the
     1665flag bit \code{PM_SOURCE_MODE_FITTED} set, regardless of the quality
     1666of that fit.
     1667
     1668Since the PSF model describes the variation of the PSF across the
     1669image, the parameters used to fit a specific object are drawn from the
     1670model at the position corresponding to the object centroid.
     1671Occasionally, a PSF model for an image may not be well determined in
     1672all regions of the image.  For example, not enough bright stars were
     1673available across the full range of the image to model the PSF and the
     1674resulting fitted parameters yield non-sensical solutions in areas
     1675where detected (fainter) sources are found.  In such cases, the PSF
     1676fitting is skipped and the flag bit \code{PM_SOURCE_MODE_BADPSF} is set.
    15871677
    15881678For the PSF model fitting, only pixels within a circular aperture
     
    15941684window radius is $7 \times \sigma_w$.
    15951685
    1596 Sources which are blended with other sources are fitted together as a
     1686Sources which are blended with other sources may be fitted together as a
    15971687set of PSFs.  Blended objects are identified by first searching for
    15981688objects for which the PSF fit windows overlap.  For a group of such
     
    16041694blends of this next object.  All objects in the image are tested as
    16051695possible blends.  A single multi-source fit is performed on each group
    1606 of blended peaks.
     1696of blended peaks.  Sources which are identified as members of a
     1697blended group have the flag bit \code{PM_SOURCE_MODE_BLEND} set, while
     1698those for which a blended PSF fit succeeds have the flag bit
     1699\code{PM_SOURCE_MODE_BLEND_FIT} set.  {\em Note that for DR1 \& DR2,
     1700  this option was not used because it tended to prevent galaxies from
     1701  being fitted as extended objects; the rules for identifying blended
     1702  stars and galaxies will be revisited in future re-analyses.}
    16071703
    16081704%% Once a solution has been achieved for a source, \ippprog{psphot} attempts to
     
    16701766
    16711767Sources which are pass the above tests are marked as having a valid
    1672 non-linear PSF model fit (\code{PM_SOURCE_MODE_SATSTAR}).  Among these
    1673 sources, those for which the peak flux is greater than the saturation
    1674 limit (see Section~\ref{sec:image.preparation}) are marked as
    1675 saturated stars (\code{PM_SOURCE_MODE_SATSTAR}).  These model fits
    1676 should be considered with caution, but the fluxes and positions may
    1677 have some validity.
     1768non-linear PSF model fit with the flag bit
     1769\code{PM_SOURCE_MODE_NONLINEAR_FIT}.  Among these sources, those for
     1770which the peak flux is greater than the saturation limit (see
     1771Section~\ref{sec:image.preparation}) are marked as saturated stars
     1772(\code{PM_SOURCE_MODE_SATSTAR}).  These model fits should be
     1773considered with caution, but the fluxes and positions may have some
     1774validity.
    16781775
    16791776% \citep[see the discussion in][regarding the masking of saturated
     
    17081805as a valid PSF source.  Otherwise, the double-PSF model is rejected
    17091806and the source is fitted with the available non-PSF model or models.
     1807Sources for which a double-PSF model is fitted have the flag bit
     1808\code{PM_SOURCE_MODE_PAIR} set.
    17101809
    17111810\subsubsection{Non-PSF Sources}
     
    19142013saved as equal-length vectors in the FITS table (\code{PROF_FLUX} and
    19152014\code{PROF_FILL}).  The values of the radial bins are saved in the
    1916 output file FITS header (\code{RMIN_NN}, \code{RMAX_NN}).
     2015output file FITS header (\code{RMIN_NN}, \code{RMAX_NN}). 
    19172016
    19182017% \note{these profiles are not saved in PSPS}
     
    19632062Petrosian Flux, we can calculate two other interesting radii: $R_{50}$
    19642063and $R_{90}$, the radii inside which 50\% and 90\% of the total
    1965 Petrosian flux is contained. 
     2064Petrosian flux is contained.  Sources for which the Petrosian
     2065parameters are successfully measured have the flag bit
     2066\code{PM_SOURCE_MODE_EXTENDED_STATS} set.
     2067
    19662068
    19672069\subsubsection{Convolved Galaxy Model Fits}
     
    21112213We next perform 3 Levenberg-Marquardt minimization fits allowing the
    21122214shape parameters ($R_{xx}$, $R_{yy}$ , $R_{xy}$) and the normalization
    2113 to be fitted, holding the centroid ($x_0, y_0$), S\'ersic index $n$, and
    2114 sky constant.  In these fits, the index $n$ is set to the minimum
     2215to be fitted, holding the centroid ($x_0, y_0$), S\'ersic index $n$,
     2216and sky constant.  In these fits, the index $n$ is set to the minimum
    21152217value previously calculated as well as values halfway to the next, and
    21162218previous, values in the grid above.  E.g., if the minimum fitted index
    2117 value is 3.0, then the LMM fits are performed using $n$ = 2.5, 3.0, 3.5.
    2118 The resulting $\chi^2$ values are then used to perform quadratic
     2219value is 3.0, then the LMM fits are performed using $n$ = 2.5, 3.0,
     22203.5.  The resulting $\chi^2$ values are then used to perform quadratic
    21192221interpolation to find the index $n$ which produces the locally minimum
    21202222$\chi^2$ value.  Finally, this best-fit index value is held constant
    21212223while Levenberg-Marquardt minimization is used to find the best fit
    2122 values of all other parameters.
     2224values of all other parameters.  Sources for which a convolved galaxy
     2225model fit was successful have the flag bit
     2226\code{PM_SOURCE_MODE_EXTENDED_FIT} set.
    21232227
    21242228% Graham & Driver : Graham A. W., Driver S. P.  2005, PASA 22, 118
     
    22042308wasteful.  We only calculate the circular apertures out to the second
    22052309aperture larger than the ``sky radius'' (defined in
    2206 Section~\ref{sec:radial.profile}), but we calculate photometry for
    2207 at least the smallest 4 apertures.
     2310Section~\ref{sec:radial.profile}), but we calculate photometry for at
     2311least the smallest 4 apertures.  Sources for which photometry in these
     2312fixed aperture are calculated have the flag bit
     2313\code{PM_SOURCE_MODE_RADIAL_FLUX} set.
    22082314
    22092315% at least out to aperture # RADIAL_AP_MIN (= 4), but no further than
     
    24222528
    24232529Individual warp images are processed independently with separate
    2424 executions of the \ippprog{psphotFullForce} program.  Once all of the
    2425 forced photometry measurements (for point sources as well as galaxies,
    2426 discussed below) are completed for all of the warps which contributed
    2427 to a stack image, the measurements are combined together by other
    2428 portions of the IPP system.   The PSF photometry measurements are
    2429 combined in the context of the DVO database system
    2430 \citep{magnier2017.datasystem}, including recalibration of the zero
    2431 points for the individual warp. 
     2530executions of the \ippprog{psphotFullForce} program.  Sources which
     2531are loaded by \ippprog{psphotFullForce} for analysis are marked with
     2532the flag bit \code{PM_SOURCE_MODE_EXTERNAL}.  This bit is also used to
     2533mark user-supplied sources loaded for analysis by the regular version
     2534of \ippprog{psphot}.  Once all of the forced photometry measurements
     2535(for point sources as well as galaxies, discussed below) are completed
     2536for all of the warps which contributed to a stack image, the
     2537measurements are combined together by other portions of the IPP
     2538system.  The PSF photometry measurements are combined in the context
     2539of the DVO database system \citep{magnier2017.datasystem}, including
     2540recalibration of the zero points for the individual warp.
    24322541
    24332542\subsection{Forced Galaxy Models}
Note: See TracChangeset for help on using the changeset viewer.