Flag use examples#
The flag use examples below include only a small set of flags that apply to most science analyses.
Note
These examples are not recipes for a “clean” sample (i.e., pure or complete). The correct application of flags depends on the science analysis.
General advice:
It is recommended to test queries with and without flag cuts to understand the selection effects and how they impact the science analysis.
When a measured quantity is used in an analysis, check also that the quantity’s general failure flag is false. For example, when using
r_cModelFlux, check that the value ofr_cModel_flagis false (or 0). In the snippets below,{band}stands for one ofu,g,r,i,z,y.
Object table#
Guidance:
Use the
{band}flag for each band that is necessary for the analysis.In the example below, replace
{band}_psfFlux_flagwith the failure flag for the flux type used in the analysis (e.g.,{band}_cModel_flag,{band}_free_psfFlux_flag).For model photometry and shapes, require the matching general flag when using the quantity, e.g.,
{band}_cModel_flag = 0for CModel fluxes,{band}_kronFlux_flag = 0for Kron fluxes, or{band}_hsmShapeRegauss_flag = 0for HSM shapes.
Selection effects: For a spatial query on the Object table near the edge of the COSMOS field, the example below reduces by about 10% the number of objects returned; with the two additional examples, the total reduction is about 23%. The fraction of objects cut will change depending on the observations obtained in the region being queried, and the filters included. It is important to consider which flag cuts are necessary for a given science analysis, and to characterize the selection effects.
Example:
WHERE {band}_inputCount > 0 -- At least one input image at the position
AND {band}_psfFlux_flag = 0 -- Successful flux measurement (replace with flux type used)
AND {band}_invalidPsfFlag = 0 -- Valid PSF model
AND {band}_pixelFlags_saturatedCenter = 0 -- No saturation at the center
AND {band}_pixelFlags_interpolatedCenter = 0 -- No interpolated pixels at the center
Additional examples:
AND {band}_pixelFlags_crCenter = 0 -- No cosmic ray at center
AND {band}_pixelFlags_interpolated = 0 -- No interpolated pixels anywhere in the footprint
Extendedness#
Key points:
An “extendedness” parameter provides a measure of whether an astrophysical sources is point-like or extended. These parameters can help to distinguish between point-like stars and extended galaxies, but keep in mind that high-redshift objects can also appear point-like.
There are three measures of extendedness in the Object table, per band, plus one multi-band variant. Each differ with respect to what is measured, whether a companion failure flag exists, and how meaningful the numeric value is.
Guidance:
The extendedness parameters have not been characterized or validated as a star/galaxy separation parameter, and performance will vary across the DP2 fields due to their varying image depth and image quality. Any selection based on the extendedness parameters should be tested and validated for the science analysis.
The
model_extendednessparameter is the most likely to have a finite value for a given object, and thegriz_model_extendednesscombines the four bands with the best signal. However, the drawback is that there is no associated flag column and thegriz_model_extendednesstends to classify everything as a galaxy fainter than approximatelyi= 24 mag (see the discussion under Measurement).See also the tutorial notebook on extendedness.
Columns |
Range |
Notes |
|---|---|---|
{band}_extendedness{band}_extendedness_flag |
0 or 1
0 or 1
|
PSF-to-CModel flux ratio, thresholded by the pipeline. |
refExtendednessno flag
|
0 or 1 |
PSF-to-CModel flux ratio, in the |
{band}_sizeExtendedness{band}_sizeExtendedness_flag |
0 to 1
0 or 1
|
Moments-based comparison of the source size to the local PSF. |
refSizeExtendednessno flag
|
0 to 1 |
Moments-based extendedness, in the |
{band}_model_extendednessno flag
|
0 to 1 |
Sersic model flux- and size-based, single band. |
griz_model_extendednessno flag
|
0 to 1 |
Sersic model flux- and size-based, combining the |
Source table#
Guidance:
Unlike the Object table,
pixelFlags_bad,pixelFlags_edge, andpixelFlags_suspectare valid in the Source table.When selecting or excluding calibration stars, use the
calib_*flags (see Calibration flags).
Example:
WHERE centroid_flag = 0 -- Centroid succeeded
AND psfFlux_flag = 0 -- (or the flag for whichever flux you use)
AND pixelFlags_saturatedCenter = 0 -- No saturation at center
AND pixelFlags_interpolatedCenter = 0 -- No interpolation at center
Additional examples:
AND pixelFlags_crCenter = 0 -- No cosmic ray at center
AND pixelFlags_edge = 0 -- Not on the exposure edge
AND pixelFlags_bad = 0 -- No known-bad pixels in footprint
AND pixelFlags_suspectCenter = 0 -- No suspect pixels at center
ForcedSource table#
Guidance:
When building light curves, apply these flags per measurement (row) so that poor epochs are dropped while good epochs for the same object are kept.
Example:
WHERE psfFlux_flag = 0 -- Science-image PSF flux succeeded
AND invalidPsfFlag = 0 -- Valid PSF model
AND pixelFlags_saturatedCenter = 0 -- No saturation at the forced position
If using the difference-image flux, add:
AND psfDiffFlux_flag = 0 -- Difference-image flux succeeded
AND diff_PixelFlags_nodataCenter = 0 -- Difference image has coverage at this position
DiaSource table#
Guidance:
No cut on the
reliabilitycolumn was applied before writing the DiaSource catalog (Reliability score is a machine-learned real/bogus score).
Example:
WHERE isDipole = 0 -- Not a dipole subtraction artifact
AND psfFlux_flag = 0 -- Difference-image flux succeeded
AND pixelFlags_saturatedCenter = 0 -- No saturation at center
Additional examples:
AND centroid_flag = 0 -- Reliable position
AND pixelFlags_crCenter = 0 -- Not a cosmic-ray residual at center
AND glint_trail = 0 -- Exclude probable orbital-debris glint trails
AND isNegative = 0 -- Exclude flux-decrease detections (keep them for fading/disappearing sources)
ForcedSourceOnDiaObject table#
Guidance:
As with ForcedSource, filter per measurement (row) to remove bad epochs while keeping good ones.
Example when using difference-image flux:
WHERE psfDiffFlux_flag = 0 -- Difference-image flux succeeded
AND diff_PixelFlags_nodataCenter = 0 -- Difference image has coverage
AND invalidPsfFlag = 0 -- Valid PSF model
AND pixelFlags_saturatedCenter = 0 -- No saturation at position
If using the science-image flux instead:
WHERE psfFlux_flag = 0 -- Science-image flux succeeded
AND invalidPsfFlag = 0 -- Valid PSF model
AND pixelFlags_saturatedCenter = 0 -- No saturation at position