IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39362 for trunk


Ignore:
Timestamp:
Feb 21, 2016, 5:58:10 AM (10 years ago)
Author:
eugene
Message:

require all objects which a stack detection to have a best stack detection; ensure the primary is best if psfQF > 0.98

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r39325 r39362  
    538538      haveStackObject = TRUE;
    539539     
    540       // find the PRIMARY measurement
     540      // ** find the PRIMARY measurement
    541541
    542542      // if we request the primary (USE_TREE_FOR_PRIMARY), this is true if the measurement is from the
     
    549549      }
    550550
    551       // now choose the BEST measurements (may also be PRIMARY)
     551      // ** now choose the BEST measurements (may also be PRIMARY)
     552
     553      // ensure that we at least have a single best measure
     554      if (stackBestMeasure == -1) stackBestMeasure = k;
     555
     556      // choose the best psfQFperf value for the BEST measurement
     557      if (isfinite(measure[k].psfQFperf) && (measure[k].psfQFperf > psfQFbest)) {
     558        psfQFbest = measure[k].psfQFperf;
     559        stackBestMeasure = k;
     560      }
     561      // ... UNLESS psfQFperf > 0.98 for the primary, in which case just use the primary.
     562      if ((measure[k].dbFlags & ID_MEAS_STACK_PRIMARY) && isfinite(measure[k].psfQFperf) && (measure[k].psfQFperf > 0.98)) {
     563        psfQFbest = 1000; // force this to be the best entry
     564        stackBestMeasure = k;
     565      }
    552566
    553567      if (measure[k].dbFlags & MEAS_BAD) SKIP_THIS_MEAS_STACK(Nbad);
     
    577591      if (isnan(Finst)) SKIP_THIS_MEAS_STACK(Ninst);
    578592
    579       // choose the best psfQFperf value for the BEST measurement
    580       if (measure[k].psfQFperf > psfQFbest) {
    581         psfQFbest = measure[k].psfQFperf;
    582         stackBestMeasure = k;
    583       }
    584       // ... UNLESS psfQFperf > 0.98 for the primary, in which case just use the primary.
    585       if ((measure[k].dbFlags & ID_MEAS_STACK_PRIMARY) && (measure[k].psfQFperf > 0.98)) {
    586         stackBestMeasure = k;
    587       }
    588 
    589593      // data quality assessment
    590594      isBad |= (measure[k].photFlags & code->photomBadMask);
Note: See TracChangeset for help on using the changeset viewer.