A new table (xflag_bit) in a bit format (actaully in string) 000000000000000000000000000000 flag_bit char(30) 123456789012345678901234567890 substring, stuff counts from 1 at the far left 987654321098765432109876543210 bit counts from 0 at the far right --------------------------------------------- bit flag --------------------------------------------- 1 29 011 2 28 012 3 27 013 4 26 014 5 25 015 double src by psf effect 6 24 016 same source in a different chip 7 23 037 false source by pipe-up 8 22 018 false source by cosmic-ray afterglows 9 21 019 possibly affected by cosmic-ray afterglows 10 20 021 false src determined by VI 11 19 031 12 18 032 overlapping src 13 17 033 14 16 034 src inside a nearby extended src 15 15 035 bkg region inside a nearby extended src 16 14 036 edge of chip 17 13 037 real pile-up source 18 12 032 + small overlap w/ value=1 19 11 032 + large overlap w/ value=1 20 10 uncetain pos by #15 21 9 051 extended src 22 8 052 same src in different obs 23 7 053 target 24 6 054 X-ray jet 25 5 055 26 4 27 3 28 2 29 1 30 0 --------------------------------------------- select srcid, flag_bit="000000000000000000000000000000" into xflag_bit from xsource_prop2_7gal where obsid!=318 # update flag_bit for overlapping src (flag=32) update xflag_bit set flag_bit=stuff(flag_bit,12,1,"1") where srcid in (select srcid from xsrc_flag_7gal where flag=42) update xflag_bit set flag_bit=stuff(flag_bit,18,1,"1") where srcid in (select a.srcid from xsrc_flag_7gal a, champ_temp..xoverlap_small b where flag=42 and a.srcid=b.srcid and value=1) update xflag_bit set flag_bit=stuff(flag_bit,19,1,"1") where srcid in (select a.srcid from xsrc_flag_7gal a, champ_temp..xoverlap_large b where flag=42 and a.srcid=b.srcid and value=1) # update flag_bit for flag = 34, 35 update xflag_bit set flag_bit=stuff(flag_bit,14,1,"1") where srcid in (select a.srcid from xsource_prop_bkg a where flag=34) update xflag_bit set flag_bit=stuff(flag_bit,15,1,"1") where srcid in (select a.srcid from xsource_prop_bkg a where flag=35) select srcid, substring(flag_bit,11,10) from xflag_bit where flag_bit>"000000000000000000000000000000" ; | more -------------------------------------------------- Source flags 01n It is not a valid X-ray source 011 false source by a hot pixel or by a bad bias value 012 false source by a bad column 013 false source along the readout direction of a very strong source 014 false source by the FEP 0/3 problem 015 double sources detected by the PSF effect 016 same (better) source in a different chip 02n It is not certain whether it is a valid X-ray source 021 V&Ver found it might be a spurious source. 03n source properties may be subject to a large uncertainty 031 bad pixel/column exists within source extraction radius *032 nearby source exists within the source extraction circle *033 nearby source exists within the bkgd extraction annulus *034 source is found near an extended source *035 bkgd reg overlaps with a src reg of a nearby extended src *036 source region fall near the edge of the chip 037 pileup 038 uncertain source position by flag=015 04n source properties may be subject to a large uncertainty *042 nearby source exists within the source extraction circle *043 nearby source exists within the bkgd extraction annulus *044 source is found near an extended source *045 bkgd reg overlaps with a src reg of a nearby extended src *046 source region fall near the edge of the chip 05n other cases *051 source is extended 052 same source in multiple observations 053 target of observation 054 X-ray jet 055 variable (* flagged by the XPIPE) -------------------------------------------------- To see a bad column, display the image in chip coordinates in ds9. For example, to see the bad column in the image used as an example for flag 012, use the following command /proj/champx3/bin/ds9 "/proj/champx2/XPIPE/OBS00945/XPIPE/evt2_ccdid0.fits.gz[bin=chipx,chipy]" & --------------------------------------------------- limit_exposure=0.80 (mean_ea/max_ea for source at the edge limit_extended=1.5 (sigma/psf for extended source) limit_nearby_ext=2.0 (sigma*2+src/bk radius) -------------------------------------------------- What the "value" column means for a flag: for 032, 033 : the number of nearby sources contaminating the source/background extraction radius. for 034 : ratio of the distance between the sources to the sum of the source radius and twice the gaussian sigma of the extended source, i.e. [distance / (2*sigma + src. radius)]. for 035 : same as for 034 except the bacground extraction radius is used instead of the source radius in the denominator, i.e. [distance / (2*sigma + 5*src.radius)]. for 036 : ratio of effective area within source extraction radius to maximum effective area for the observation. XPIPE assigns a source flag 036 when the ratio is below limit_exposure (given above). for 051 : ratio of the gaussian sigma of the radial profile of the extended source to the PSF (39% EE).