| | 1 | [[PageOutline]] |
| | 2 | |
| | 3 | = SAS 10 FLAGS = |
| | 4 | |
| | 5 | There is a flag page here: http://web01.psps.ifa.hawaii.edu/psps-trac/wiki/PSPSFAQ which is out of date. |
| | 6 | |
| | 7 | Some decent description of the flags (but warning these are out of date, just use for more explanations than given below) |
| | 8 | * [wiki:IPP_DVO_Bitmasks] |
| | 9 | * [wiki:CMF_PS1_V3] |
| | 10 | |
| | 11 | |
| | 12 | |
| | 13 | Here is the short version (who has flags and where they come from) |
| | 14 | |
| | 15 | || type || flags column name || definition|| |
| | 16 | || detectionfull || infoFlag || DVO dbflags << 45 | smf FLAGS2 | smf FLAGS|| |
| | 17 | || stackdetectionfull || infoFlag || DVO dbflags << 45 | cmf FLAGS2 << 32 | cmf FLAGS|| |
| | 18 | || objects || objInfoFlag || FLAGS from the DVO 'average'|| |
| | 19 | || objects || xFlag || FLAGS from the DVO 'secfilt' (with one bit moved)|| |
| | 20 | |
| | 21 | * dvo flags come from: http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/browser/trunk/Ohana/src/libdvo/include/dvo.h |
| | 22 | |
| | 23 | * smf/cmf flags come from: http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/browser/trunk/psModules/src/objects/pmSourceMasks.h |
| | 24 | |
| | 25 | Below is each of the current flags (for sa10) |
| | 26 | |
| | 27 | |
| | 28 | == !DetectionFull.infoFlags and StackDetectionFull.infoFlag Lower 32 bits (these are FLAGs from smf/cmf) == |
| | 29 | |
| | 30 | === FLAGS Definition === |
| | 31 | |
| | 32 | {{{ |
| | 33 | Example to select detections which are extended |
| | 34 | |
| | 35 | WHERE (Detection.infoFlag & 0x4000 != 0) |
| | 36 | |
| | 37 | PM_SOURCE_MODE_DEFAULT = 0x00000000, ///< Initial value: resets all bits |
| | 38 | PM_SOURCE_MODE_PSFMODEL = 0x00000001, ///< Source fitted with a psf model (linear or non-linear) |
| | 39 | PM_SOURCE_MODE_EXTMODEL = 0x00000002, ///< Source fitted with an extended-source model |
| | 40 | PM_SOURCE_MODE_FITTED = 0x00000004, ///< Source fitted with non-linear model (PSF or EXT; good or bad) |
| | 41 | PM_SOURCE_MODE_FAIL = 0x00000008, ///< Fit (non-linear) failed (non-converge, off-edge, run to zero) |
| | 42 | PM_SOURCE_MODE_POOR = 0x00000010, ///< Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) |
| | 43 | PM_SOURCE_MODE_PAIR = 0x00000020, ///< Source fitted with a double psf |
| | 44 | PM_SOURCE_MODE_PSFSTAR = 0x00000040, ///< Source used to define PSF model |
| | 45 | PM_SOURCE_MODE_SATSTAR = 0x00000080, ///< Source model peak is above saturation |
| | 46 | PM_SOURCE_MODE_BLEND = 0x00000100, ///< Source is a blend with other sources |
| | 47 | PM_SOURCE_MODE_EXTERNAL = 0x00000200, ///< Source based on supplied input position |
| | 48 | PM_SOURCE_MODE_BADPSF = 0x00000400, ///< Failed to get good estimate of object's PSF |
| | 49 | PM_SOURCE_MODE_DEFECT = 0x00000800, ///< Source is thought to be a defect |
| | 50 | PM_SOURCE_MODE_SATURATED = 0x00001000, ///< Source is thought to be saturated pixels (bleed trail) |
| | 51 | PM_SOURCE_MODE_CR_LIMIT = 0x00002000, ///< Source has crNsigma above limit |
| | 52 | PM_SOURCE_MODE_EXT_LIMIT = 0x00004000, ///< Source has extNsigma above limit |
| | 53 | PM_SOURCE_MODE_MOMENTS_FAILURE = 0x00008000, ///< could not measure the moments |
| | 54 | PM_SOURCE_MODE_SKY_FAILURE = 0x00010000, ///< could not measure the local sky |
| | 55 | PM_SOURCE_MODE_SKYVAR_FAILURE = 0x00020000, ///< could not measure the local sky variance |
| | 56 | PM_SOURCE_MODE_BELOW_MOMENTS_SN = 0x00040000, ///< moments not measured due to low S/N |
| | 57 | PM_SOURCE_MODE_BIG_RADIUS = 0x00100000, ///< poor moments for small radius, try large radius |
| | 58 | PM_SOURCE_MODE_AP_MAGS = 0x00200000, ///< source has an aperture magnitude |
| | 59 | PM_SOURCE_MODE_BLEND_FIT = 0x00400000, ///< source was fitted as a blend |
| | 60 | PM_SOURCE_MODE_EXTENDED_FIT = 0x00800000, ///< full extended fit was used |
| | 61 | PM_SOURCE_MODE_EXTENDED_STATS = 0x01000000, ///< extended aperture stats calculated |
| | 62 | PM_SOURCE_MODE_LINEAR_FIT = 0x02000000, ///< source fitted with the linear fit |
| | 63 | PM_SOURCE_MODE_NONLINEAR_FIT = 0x04000000, ///< source fitted with the non-linear fit |
| | 64 | PM_SOURCE_MODE_RADIAL_FLUX = 0x08000000, ///< radial flux measurements calculated |
| | 65 | PM_SOURCE_MODE_SIZE_SKIPPED = 0x10000000, ///< size could not be determined |
| | 66 | PM_SOURCE_MODE_ON_SPIKE = 0x20000000, ///< peak lands on diffraction spike |
| | 67 | PM_SOURCE_MODE_ON_GHOST = 0x40000000, ///< peak lands on ghost or glint |
| | 68 | PM_SOURCE_MODE_OFF_CHIP = 0x80000000, ///< peak lands off edge of chip |
| | 69 | }}} |
| | 70 | |
| | 71 | == !Detection Flags Upper 32 bits - From smf/cmf FLAGS2 shifted 32 bits left == |
| | 72 | |
| | 73 | === FLAGS2 === |
| | 74 | |
| | 75 | {{{ |
| | 76 | Example to select real (not forced) stack detections |
| | 77 | |
| | 78 | WHERE CAST(StackDetection.infoFlag / 0x100000000 AS INT) & 4 = 0 |
| | 79 | |
| | 80 | PM_SOURCE_MODE2_DEFAULT = 0x00000000, ///< Initial value: resets all bits |
| | 81 | PM_SOURCE_MODE2_DIFF_WITH_SINGLE = 0x00000001, ///< diff source matched to a single positive detection |
| | 82 | PM_SOURCE_MODE2_DIFF_WITH_DOUBLE = 0x00000002, ///< diff source matched to positive detections in both images |
| | 83 | PM_SOURCE_MODE2_MATCHED = 0x00000004, ///< diff source matched to positive detections in both images |
| | 84 | PM_SOURCE_MODE2_ON_SPIKE = 0x00000008, ///< > 25% of (PSF-weighted) pixels land on diffraction spike |
| | 85 | PM_SOURCE_MODE2_ON_STARCORE = 0x00000010, ///< > 25% of (PSF-weighted) pixels land on starcore |
| | 86 | PM_SOURCE_MODE2_ON_BURNTOOL = 0x00000020, ///< > 25% of (PSF-weighted) pixels land on burntool |
| | 87 | PM_SOURCE_MODE2_ON_CONVPOOR = 0x00000040, ///< > 25% of (PSF-weighted) pixels land on convpoor |
| | 88 | PM_SOURCE_MODE2_PASS1_SRC = 0x00000080, ///< source detected in first pass analysis |
| | 89 | PM_SOURCE_MODE2_HAS_BRIGHTER_NEIGHBOR = 0x00000100, ///< peak is not the brightest in its footprint |
| | 90 | PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_1 = 0x00000200, ///< flux_n / (r^2 flux_p) > 1 |
| | 91 | PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_10 = 0x00000400, ///< flux_n / (r^2 flux_p) > 10 |
| | 92 | PM_SOURCE_MODE2_DIFF_SELF_MATCH = 0x00000800, ///< positive detection match is probably this source |
| | 93 | PM_SOURCE_MODE2_SATSTAR_PROFILE = 0x00001000, ///< saturated source is modeled with a radial profile |
| | 94 | }}} |
| | 95 | == !Detection Flags Upper bits - From DVO db Flags shifted left 45 bits == |
| | 96 | {{{ |
| | 97 | Example Cut to select the StackDetections that supplied values "stack values" for their Objects |
| | 98 | |
| | 99 | WHERE (CAST(StackDetectionFull.infoFlag / 0x200000000000 AS INT) & 0x20000) != 0 |
| | 100 | |
| | 101 | ID_MEAS_NOCAL = 0x00000001, // detection ignored for this analysis (photcode, time range) -- internal only |
| | 102 | ID_MEAS_POOR_PHOTOM = 0x00000002, // detection is photometry outlier |
| | 103 | ID_MEAS_SKIP_PHOTOM = 0x00000004, // detection was ignored for photometry measurement |
| | 104 | ID_MEAS_AREA = 0x00000008, // detection near image edge |
| | 105 | ID_MEAS_POOR_ASTROM = 0x00000010, // detection is astrometry outlier |
| | 106 | ID_MEAS_SKIP_ASTROM = 0x00000020, // detection was ignored for astrometry measurement |
| | 107 | ID_MEAS_USED_OBJ = 0x00000040, // detection was used during update objects |
| | 108 | ID_MEAS_USED_CHIP = 0x00000080, // detection was used during update chips (XXX this probably does not make it into the db) |
| | 109 | ID_MEAS_BLEND_MEAS = 0x00000100, // detection is within radius of multiple objects |
| | 110 | ID_MEAS_BLEND_OBJ = 0x00000200, // multiple detections within radius of object |
| | 111 | ID_MEAS_UNDEF_3 = 0x00000400, // unused |
| | 112 | ID_MEAS_UNDEF_4 = 0x00000800, // unused |
| | 113 | ID_MEAS_BLEND_MEAS_X = 0x00001000, // detection is within radius of multiple objects across catalogs |
| | 114 | ID_MEAS_ARTIFACT = 0x00002000, // detection is thought to be non-astronomical |
| | 115 | ID_MEAS_UNDEF_5 = 0x00004000, // unused |
| | 116 | ID_MEAS_PHOTOM_UBERCAL = 0x00008000, // externally-supplied zero point from ubercal analysis |
| | 117 | ID_MEAS_STACK_PRIMARY = 0x00010000, // externally-supplied zero point from ubercal analysis |
| | 118 | ID_MEAS_STACK_PHOT_SRC = 0x00020000, // this measurement supplied the stack photometry |
| | 119 | }}} |
| | 120 | |
| | 121 | == Object.objInfoFlags == |
| | 122 | |
| | 123 | {{{ |
| | 124 | ID_STAR_FEW = 0x00000001, // used within relphot: skip star |
| | 125 | ID_STAR_POOR = 0x00000002, // used within relphot: skip star |
| | 126 | * ID_PROPER = 0x00000400, // star with large proper motion |
| | 127 | * ID_TRANSIENT = 0x00001000, // is this mutually exclusive with USNO? |
| | 128 | * ID_VARIABLE = 0x00002000, // not currently set? |
| | 129 | * ID_ASTEROID = 0x00002000, // identified with an asteroid |
| | 130 | * ID_BAD_OBJECT = 0x00004000, // if all measurements are bad, set this bit |
| | 131 | * ID_MOVING = 0x00008000, // is a moving object |
| | 132 | * ID_ROCK = 0x0000a000, // 0x8000 + 0x2000 |
| | 133 | * ID_GHOST = 0x0000c001, // 0x8000 + 0x4000 + 0x0001 |
| | 134 | * ID_TRAIL = 0x0000c002, // 0x8000 + 0x4000 + 0x0002 |
| | 135 | * ID_BLEED = 0x0000c003, // 0x8000 + 0x4000 + 0x0003 |
| | 136 | * ID_COSMIC = 0x0000c004, // 0x8000 + 0x4000 + 0x0004 |
| | 137 | ID_STAR_FIT_AVE = 0x00010000, // average position fitted |
| | 138 | ID_STAR_FIT_PM = 0x00020000, // proper motion fitted |
| | 139 | ID_STAR_FIT_PAR = 0x00040000, // parallax fitted |
| | 140 | ID_STAR_USE_AVE = 0x00080000, // average position used (not PM or PAR) |
| | 141 | ID_STAR_USE_PM = 0x00100000, // proper motion used (not AVE or PAR) |
| | 142 | ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM) |
| | 143 | ID_STAR_NO_ASTROM = 0x00400000, // mean astrometry could not be measured |
| | 144 | ID_OBJ_EXT = 0x01000000, // extended in our data (eg, PS) |
| | 145 | ID_OBJ_EXT_ALT = 0x02000000, // extended in external data (eg, 2MASS) |
| | 146 | ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) |
| | 147 | ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) |
| | 148 | }}} |
| | 149 | |
| | 150 | the items marked * are deprecated and not set in sa9. They are here for historical purposes. |
| | 151 | == Object.xFlags == |
| | 152 | {{{ |
| | 153 | ID_SECF_STAR_FEW = 0x00000001, // used within relphot: skip star |
| | 154 | ID_SECF_STAR_POOR = 0x00000002, // used within relphot: skip star |
| | 155 | ID_SECF_USE_SYNTH = 0x00000004, // synthetic photometry used in average measurement |
| | 156 | ID_SECF_USE_UBERCAL = 0x00000008, // synthetic photometry used in average measurement |
| | 157 | ID_SECF_HAS_PS1 = 0x00000010, // PS1 photometry used in average measurement |
| | 158 | ID_SECF_HAS_STACK = 0x00000020, // PS1 stack photometry exists |
| | 159 | ID_PHOTOM_PASS_0 = 0x00000100, // average magnitude calculated in 0th pass |
| | 160 | ID_PHOTOM_PASS_1 = 0x00000200, // average magnitude calculated in 1th pass |
| | 161 | ID_PHOTOM_PASS_2 = 0x00000400, // average magnitude calculated in 2th pass |
| | 162 | ID_PHOTOM_PASS_3 = 0x00000800, // average magnitude calculated in 3th pass |
| | 163 | ID_PHOTOM_PASS_4 = 0x00001000, // average magnitude calculated in 4th pass |
| | 164 | ID_PSPS_OBJ_EXT = 0x00002000, // extended in this band (PSPS only) |
| | 165 | ID_SECF_OBJ_EXT = 0x01000000, // DVO location of "extended in this band" For PSPS this bit is moved |
| | 166 | }}} |
| | 167 | |
| | 168 | The gap between ID_SECF_HAS_STACK and ID_PHOTOM_PASS_0 is intentional (the bits between are not used) |
| | 169 | |
| | 170 | Note: ID_PSPS_OBJ_EXT contains the value of the bit ID_SECF_OBJ_EXT in DVO. For PSPS it is moved to fit into the 16 bit Object.xFlags |
| | 171 | |
| | 172 | |
| | 173 | |