IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28236


Ignore:
Timestamp:
Jun 6, 2010, 2:54:00 PM (16 years ago)
Author:
eugene
Message:

count causes for skipped detections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/Ohana.20100606/src/relphot/src/bcatalog.c

    r27435 r28236  
    77  off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm;
    88  float mag;
     9  int Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew;
    910
    1011  // XXX PhotNsec as a global is a bad idea; either get it from catalog
     
    2021  ALLOCATE (subcatalog[0].measure, Measure, NMEASURE);
    2122  Nmeasure = Naverage = 0;
     23
     24  Ncode = Ntime = Ndophot = Nmag = Nsigma = Nimag = Nfew = 0;
    2225
    2326  /* exclude stars not in range or with too few measurements */
     
    4649      /* select measurements by photcode */
    4750      ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode);
    48       if (ecode != photcode[0].code) continue;
     51      if (ecode != photcode[0].code) { Ncode ++; continue; }
    4952
    5053      /* select measurements by time */
    5154      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; }
    5457      }
    5558
     
    5760      // XXX ignore this criterion for REF measurements?
    5861      // 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; }
    6063
    6164      /* select measurements by mag limit */
    6265      mag = PhotCat (&catalog[0].measure[offset]);
    63       if (mag > MAG_LIM) continue;
     66      if (mag > MAG_LIM) { Nmag ++; continue; }
    6467
    6568      /* 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; }
    6770
    6871      /* select measurements by mag limit */
    6972      if (ImagSelect) {
    7073        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; }
    7376      }
    7477
     
    9497    if (Nm <= STAR_TOOFEW) { /* enough measurements in band? */
    9598      Nmeasure -= Nm;
     99      Nfew ++;
    96100      continue;
    97101    }
     
    114118
    115119  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);
    118124  }
    119125  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.