How to select sources based on flag =================================== 1. remove false sources by flag=11-15, 53, 54 in xsrc_flag_add (also exclude all sources in S4). 2. remove sources with real bad quality by flag = 21, 31, 37 in xsrc_flag_add by flag = 36 in xsrc_flag + xsrc_flag_add - xsrc_flag_rem 3. remove sources with moderately bad quality by flag = (32), 34, 35 in in xsrc_flag + xsrc_flag_add - xsrc_flag_rem 4. select or remove extended sources by flag = 51 in in xsrc_flag + xsrc_flag_add - xsrc_flag_rem 5. select or remove variable sources by flag = 55 in in xsrc_flag Note. For sources with flag=32 (nearby source), a new method will be applied to get src counts. For example, for log N - log S, I would apply 1, 2, 4. Probabaly the same for John G.'s study. 1. to list false sources for obsid=861 and ccdid=7: select * from xsrc_flag_add where ((flag between 11 and 14) or (flag between 53 and 54)) and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" or to list all the valid sources: select srcid from xsource_prop where obsid=00861 and ccdid=7 and srcid not in (select srcid from xsrc_flag_add where (flag between 11 and 14) or (flag between 53 and 54)) 2. to list source with bad quality for obsid=861 and ccdid=7 select * from xsrc_flag_add where flag in (21, 31, 37) and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" select * from xsrc_flag where flag=36 and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" and srcid not in (select srcid from xsrc_flag_rem) select * from xsrc_flag_add where flag=36 and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" 4. to list extended source for obsid=861 and ccdid=7 select * from xsrc_flag where flag=51 and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" and srcid not in (select srcid from xsrc_flag_rem) select * from xsrc_flag_add where flag=51 and substring(srcid,3,5)="00861" and substring(srcid,9,1)="7" ================================================== as of 07/25/2002 # of obsids with V&V done - 79 # of X1 obsids with V&V done - 62 (100%) last VV date - 2002170 (Jun 19) ================================================== as of 06/12/2002 # of obsids with V&V done - 58 -2 (431 and 868) # of X1 obsids with V&V done - 41 -2 (431 and 868) last VV date - 2002107 (apr 17) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ select count(obsid) from xvv -- 104 select count(distinct obsid) from xvv -- 79 select count(distinct obsid) from xvv where obsid in (select obsid from x1sample) -- 62 select max(vvid) from xvv ; -- 2002170 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RE-processed after V&V found an issue: 431 700103 Sep 6 2000 5:49PM 32.709801 ACIS-S ACIS-123678 868 700173 Oct 3 2000 11:12PM 21.555238 ACIS-I ACIS-012367 NOTE: 431 and 868 reprocessed - srcid changed! update xsrc_flag_add/rem - done ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ remove 431/868 from xsrc_flag_add/rem and add the followings: XS00431B7_002 20029990000 53 NULL XS00431B7_001 20029990000 53 NULL XS00431B6_002 20029990000 11 NULL XS00431B6_003 20029990000 11 NULL XS00431B6_004 20029990000 11 NULL XS00431B6_005 20029990000 11 NULL XS00868B3_001 20029990000 53 NULL XS00868B7_002 20029990000 34 NULL XS00868B7_001 20029990000 34 NULL XS00868B7_004 20029990000 35 NULL XS00868B7_001 20029990000 51 NULL XS00868B7_002 20029990000 51 NULL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ select flag, count(*) from xsrc_flag_add -- where srcid not like "XS%B8%" group by flag ; ---------------------------------------- flag total non-S4 ---------------------------------------- 11 24 24 12 42 5 13 269 269 14 72 38 15 1 1 21 10 5 31 41 29 34 15 15 35 9 7 36 16 16 37 18 18 51 18 18 52 2 2 53 107 106 54 13 13 ---------------------------------------- select flag, count(*) from xsrc_flag_rem -- where srcid not like "XS%B8%" group by flag ; ---------------------------------------- flag total non-S4 ---------------------------------------- 32 2 2 34 463 390 35 20 18 36 3 2 51 14 14 55 1 1 ---------------------------------------- ======= flag=14 ======= obsid with issueid=61 and 70 select * from ao12sample where obsid in ( 18, 333, 371, 443, 510, 659, 795, 861, 965,1383,1902,2010,2034,3403) ==> 861 all sources of obsid=861 in ccdid=1,3 flag=14 ======= flag=51 ======= select srcid, x,y,offaxis=power((power((x-4096.5),2)+power((y-4096.5), 2)),0.5)*0.4919 from xsource_prop where srcid in (select srcid from xsrc_flag_add where flag=51) ------------------------------------------------------------------------------------------------------------------------------- srcid x y offaxis srcid in S-band psf sigma ------------------------------------------------------------------------------------------------------------------------------- XS00525B3_010 4000.500000 3693.625000 203.722786 <== extended XS00525S3_008 4.300000 5.450000 XS00809B7_005 4112.650400 3965.765100 64.797346 <== extended XS00809S7_004 2.990000 2.820000 XS00809S7_016 3.010000 3.260000 XS00578B7_003 4089.110400 4114.720700 9.671811 <== extended XS00578S7_003 2.960000 3.790000 1.28 XS00578S7_012 2.960000 4.350000 1.47 XS00869B7_013 4027.418700 4137.723100 39.571421 <== extended XS00869S7_008 2.920000 3.130000 1.07 XS00869S7_023 2.920000 3.910000 1.34 XS00839B7_005 4055.822000 4024.537600 40.662272 <== extended + jet (?) XS00546B3_019 3449.500000 3886.500000 334.603744 -- could be extended, but faint XS03023B7_014 4165.388700 4149.888700 42.871579 -- could be extended, but faint XS01712B7_006 4079.185300 4082.820800 10.854388 -- pileup XS01712B7_007 4081.829100 4091.599400 7.608585 -- pileup XS01712B7_008 4085.178200 4079.369600 10.100538 -- pileup XS01712B7_009 4088.518800 4083.022500 7.704834 -- pileup XS01712B7_010 4088.252900 4088.705800 5.581802 -- pileup XS00512B3_001 5049.851100 4587.635700 527.525219 ? (positon off as well) XS00521B1_016 3851.674100 5339.564500 623.210137 ?? XS00624B3_003 5219.909200 2945.706500 791.083776 ?? ------------------------------------------------------------------------------------------------------------------------------- select srcid, x,y,offaxis=power((power((x-4096.5),2)+power((y-4096.5), 2)),0.5)*0.4919 from xsource_prop where srcid in (select srcid from xsrc_flag_rem where flag=51) select * from xsrc_flag where srcid in (select srcid from xsrc_flag_rem where flag=51) and flag=51 ------------------------------------------------------------------------------------------------------------------- srcid x y offaxis sigma/psf srcid in S-band ------------------------------------------------------------------------------------------------------------------- XS00520B3_007 4212.250000 3828.375000 143.655922 1.630000 XS00520S3_006 isolated point src XS00869B7_001 4033.274200 4122.855000 33.694568 1282.140000 XS00869S7_001 isolated point src XS00869B7_027 4142.899900 3980.300000 61.547268 2.000000 XS00869S7_024 isolated point src XS00869B7_037 3959.500000 4106.000000 67.552128 1.680000 XS00869S7_032 isolated point src XS00930B7_023 3525.750000 3563.464400 384.149182 120.460000 XS00930S7_018 isolated point src XS00541B3_014 4433.000000 3810.785600 217.141937 4.080000 XS00541S3_010 point src near extended src XS00789B7_003 4038.136500 3910.681900 95.806494 729.780000 XS00789S7_003 point src near extended src 600") XS00536B7_001 4364.467800 6104.298800 996.393539 2.300000 XS00536S7_006 XS00536B7_002 4766.762700 5955.484400 972.056519 3.200000 XS00536S7_001 XS00536B7_003 4806.969200 5723.173300 873.151253 3.020000 XS00536S7_002 XS00536B7_004 4510.958000 5496.030300 717.982014 3.030000 XS00536S7_007 XS00536B7_005 4878.267100 5384.189000 741.008250 4.230000 XS00536S7_003 XS00868B7_001 5233.333500 5079.214400 739.179883 2.470000 XS00868S7_001 XS00868B7_002 5301.500000 5248.685100 820.095631 2.630000 XS00868S7_002 -------------------------------------------------------------------------------------------------------------------