Changeset 28236
- Timestamp:
- Jun 6, 2010, 2:54:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/Ohana.20100606/src/relphot/src/bcatalog.c
r27435 r28236 7 7 off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm; 8 8 float mag; 9 int Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew; 9 10 10 11 // XXX PhotNsec as a global is a bad idea; either get it from catalog … … 20 21 ALLOCATE (subcatalog[0].measure, Measure, NMEASURE); 21 22 Nmeasure = Naverage = 0; 23 24 Ncode = Ntime = Ndophot = Nmag = Nsigma = Nimag = Nfew = 0; 22 25 23 26 /* exclude stars not in range or with too few measurements */ … … 46 49 /* select measurements by photcode */ 47 50 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode); 48 if (ecode != photcode[0].code) continue;51 if (ecode != photcode[0].code) { Ncode ++; continue; } 49 52 50 53 /* select measurements by time */ 51 54 if (TimeSelect) { 52 if (catalog[0].measure[offset].t < TSTART) continue;53 if (catalog[0].measure[offset].t > TSTOP) continue;55 if (catalog[0].measure[offset].t < TSTART) { Ntime ++; continue; } 56 if (catalog[0].measure[offset].t > TSTOP) { Ntime ++; continue; } 54 57 } 55 58 … … 57 60 // XXX ignore this criterion for REF measurements? 58 61 // XXX chnage this to select by bitflags 59 if (DophotSelect && ((catalog[0].measure[offset].photFlags >> 16) != DophotValue)) continue;62 if (DophotSelect && ((catalog[0].measure[offset].photFlags >> 16) != DophotValue)) { Ndophot ++; continue; } 60 63 61 64 /* select measurements by mag limit */ 62 65 mag = PhotCat (&catalog[0].measure[offset]); 63 if (mag > MAG_LIM) continue;66 if (mag > MAG_LIM) { Nmag ++; continue; } 64 67 65 68 /* select measurements by measurement error */ 66 if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM > SIGMA_LIM)) continue;69 if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM > SIGMA_LIM)) { Nsigma ++; continue; } 67 70 68 71 /* select measurements by mag limit */ 69 72 if (ImagSelect) { 70 73 mag = PhotInst (&catalog[0].measure[offset]); 71 if (mag < ImagMin) continue;72 if (mag > ImagMax) continue;74 if (mag < ImagMin) { Nimag ++; continue; } 75 if (mag > ImagMax) { Nimag ++; continue; } 73 76 } 74 77 … … 94 97 if (Nm <= STAR_TOOFEW) { /* enough measurements in band? */ 95 98 Nmeasure -= Nm; 99 Nfew ++; 96 100 continue; 97 101 } … … 114 118 115 119 if (VERBOSE) { 116 fprintf (stderr, "%lld: using %lld stars (%lld measures) for catalog\n", (long long) i, 117 (long long) subcatalog[0].Naverage, (long long) subcatalog[0].Nmeasure); 120 fprintf (stderr, "using "OFF_T_FMT" stars ("OFF_T_FMT" measures) of "OFF_T_FMT" for catalog\n", 121 subcatalog[0].Naverage, subcatalog[0].Nmeasure, i); 122 fprintf (stderr, "rejections: %d code, %d time, %d dophot, %d mag, %d sigma, %d imag, %d few\n", 123 Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew); 118 124 } 119 125 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
