Quality flags

Thirteen warning bits on every measurement, plus eleven moving-object bits for asteroids and comets. They are warnings, not cuts: you decide what to drop.

API 3.1 · stars release 55c97bc0c218a6c5 · SS release ef7caf53a399bc1f

How the flags work#

The 13 quality bits#

stored when measureddetector positiondecile of this curveunused
BitValueNameRaised when
01 0x1BAD_PIXEL_APERTUREA bad pixel overlaps the aperture: a pixel on the pipeline's bad-pixel list, or an unstable ("telegraph") dark-current pixel of the image's dark frame.
12 0x2SATURATED_APERTUREA saturated pixel overlaps the aperture.
24 0x4IMAGE_NOT_GOODThe image was not explicitly marked good by the pipeline.
38 0x8SUBTRACTION_FAILEDNo successful difference image exists for this image.
416 0x10NEGATIVE_PIXELA pixel in the aperture lies more than 5σ below the local sky (an over-subtracted pixel, whatever the cause).
532 0x20SKY_FALLBACKThe local sky estimate fell back to a plain median of the annulus, or found no usable sky pixel.
664 0x40NEAR_CHIP_EDGEThe aperture centre is within 25 pixels of the detector edge.
7128 0x80NEAR_CHIP_CORNERThe aperture centre is within 50 pixels of a detector corner, measured along the diagonal.
8256 0x100POOR_FWHMThe image FWHM is in the worst 10% of this curve. With 8″ pixels this is mostly the camera's focus, not the seeing.
9512 0x200POOR_WCSThe image's astrometric residual (wcs_med) is in the worst 10%.
101024 0x400POOR_ZP_FITThe zero-point fit scatter is in the worst 10%. Evaluated only when at least 10 calibration stars were used.
112048 0x800POOR_THROUGHPUTThe zero point is in the lowest 10%: clouds, extinction or other light loss.
124096 0x1000POOR_DEPTHThe limiting magnitude is in the shallowest 10%.

Bits 0–5: stored with the measurement#

These bits record facts about this source's pixels in this image (bits 0, 1, 4, 5) or about the image as a whole (bits 2, 3). They were fixed when the image was measured and do not change.

Bits 6–7: detector position#

These bits are computed from the stored aperture position each time a light curve is returned. Photometry near the edge or a corner of the detector is more often affected by vignetting, a poor flat field or distortion.

Bits 8–12: deciles#

Each decile bit marks the epochs that were among the worst 10% of this light curve for one image property. They are computed when a light curve is returned, and you should keep in mind what that means:

Presets and exclude_quality#

PresetMaskHides
All (API default)0Nothing
Recommended (website default)23 = 0x17BAD_PIXEL_APERTURE, SATURATED_APERTURE, IMAGE_NOT_GOOD, NEGATIVE_PIXEL
Strict8063 = 0x1F7FEvery bit except NEAR_CHIP_CORNER

The website default (Recommended, 0x17) is waiting for Ben's approval.

Pass a mask as exclude_quality, in decimal or hex, to drop rows that have any of its bits. Or fetch everything and filter yourself:

Shell
curl -s "https://asassn-v3.ifa.hawaii.edu/v3/stars/11010359/lc?format=csv&exclude_quality=0x17" -o oj287_clean.csv

Solar-system moving_quality bits#

Asteroid and comet rows carry the 13 quality bits above and a second column, moving_quality, for problems that only moving objects have:

BitValueNameMeaning
01TRAILThe object moved more than 0.25 pixel during the exposure
12EPHEMERIS_UNVALIDATEDThe ephemeris was not validated. Set on every SS-1 row.
24REFERENCE_CONTAMINATIONDifference rows: a static source in the reference image lies under the aperture (|ref| > 3σ)
38PARTIAL_APERTUREThe aperture runs off the image
416NONFINITENon-finite flux, variance or zero point; the row is not valid
532NO_FLATNo flat-field value at this position
664NO_DARKThe dark frame was unavailable, so unstable dark pixels were not checked
7128COADD_MOTIONCoadded images only; none in SS-1
8256ERROR_APPROXIMATIONDifference rows: the error budget is approximate (reference and kernel covariance not modelled)
9512UNKNOWN_MAGNITUDENo predicted magnitude
101024POSITION_UNCERTAINThe predicted position's uncertainty is unknown or larger than 1″. Set on every SS-1 row.

EPHEMERIS_UNVALIDATED and POSITION_UNCERTAIN are set on every SS-1 row because the release has no orbit-uncertainty information. They do not mean the measurement is bad; ignore them unless you need validated positions. exclude_quality applies to quality only; filter moving_quality yourself.

Stars
No recommended column. The website's Recommended preset hides quality 0x17; use exclude_quality=0x17 or (quality & 0x17) == 0 to get the same rows.
Solar system
The recommended column and rows=recommended: detected, quality bits 0–5 clear, moving_quality 8, 16 and 32 clear, a measured image position and, for reduced-image rows, a small blend ratio. The solar-system page gives the rule in full.

Earlier versions#

Q5 is the only flag version served by V3. Earlier versions (Q1–Q4) numbered some bits differently and stored the edge bit at a fixed 50 pixels; the server translates older stored values, so every served quality value follows the table above.