IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34787 for trunk


Ignore:
Timestamp:
Dec 11, 2012, 9:06:46 AM (14 years ago)
Author:
bills
Message:

Save the number of forced (matched) detections in header with keyword NDET_FRC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotOutput.c

    r34528 r34787  
    201201    int nCR  = 0;
    202202    int nEXT = 0;
     203    int nForced = 0;
    203204
    204205    // count the number of sources which will be written and other sub-types
    205206    for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
    206207        pmSource *source = (pmSource *) sources->data[i];
     208        if (source->mode2 & PM_SOURCE_MODE2_MATCHED) {
     209            nForced ++;
     210        }
    207211        pmModel *model = pmSourceGetModel (NULL, source);
    208212        if (model == NULL)
     
    217221    }
    218222
     223    // XXX: This loop cauess nSrc to be twice as large as it should be. This is kept
     224    // for compatability
    219225    for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
    220226        pmSource *source = (pmSource *) sources->data[i];
     
    228234    psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_EXT", PS_META_REPLACE, "Number of extended sources", nEXT);
    229235    psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_CR",  PS_META_REPLACE, "Number of cosmic rays", nCR);
     236    psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_FRC", PS_META_REPLACE, "Number of Forced detections", nForced);
    230237    return true;
    231238}
     
    308315    psMetadataItemSupplement (&status, header, analysis, "NDET_EXT");
    309316    psMetadataItemSupplement (&status, header, analysis, "NDET_CR");
     317    psMetadataItemSupplement (&status, header, analysis, "NDET_FRC");
    310318
    311319    psMetadataItemSupplement (&status, header, analysis, "PSPHOT.PSF.APRESID");
Note: See TracChangeset for help on using the changeset viewer.