IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19952


Ignore:
Timestamp:
Oct 7, 2008, 10:07:49 AM (18 years ago)
Author:
eugene
Message:

adding IQ stats

File:
1 edited

Legend:

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

    r19912 r19952  
    115115
    116116    int nSrc = 0;
    117 
    118     // count the number of sources which will be written
     117    int nCR  = 0;
     118    int nEXT = 0;
     119
     120    // count the number of sources which will be written and other sub-types
     121    for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
     122        pmSource *source = (pmSource *) sources->data[i];
     123        pmModel *model = pmSourceGetModel (NULL, source);
     124        if (model == NULL)
     125            continue;
     126        if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) {
     127            nEXT ++;
     128        }
     129        if (source->mode & PM_SOURCE_MODE_CR_LIMIT) {
     130            nCR ++;
     131        }
     132        nSrc ++;
     133    }
     134
    119135    for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
    120136        pmSource *source = (pmSource *) sources->data[i];
     
    124140        nSrc ++;
    125141    }
    126     psMetadataAdd (recipe, PS_LIST_TAIL, "NSTARS", PS_DATA_S32 | PS_META_REPLACE, "NUMBER OF STARS", nSrc);
     142
     143    psMetadataAddS32 (recipe, PS_LIST_TAIL, "NSTARS",   PS_META_REPLACE, "Number of sources", nSrc);
     144    psMetadataAddS32 (recipe, PS_LIST_TAIL, "NDET_EXT", PS_META_REPLACE, "Number of extended sources", nEXT);
     145    psMetadataAddS32 (recipe, PS_LIST_TAIL, "NDET_CR",  PS_META_REPLACE, "Number of cosmic rays", nCR);
    127146    return true;
    128147}
     
    152171
    153172    // Image Quality measurements
     173    psMetadataItemSupplement (header, recipe, "IQ_NSTAR");
     174
     175    psMetadataItemSupplement (header, recipe, "IQ_FW1");
     176    psMetadataItemSupplement (header, recipe, "IQ_FW1_E");
     177    psMetadataItemSupplement (header, recipe, "IQ_FW2");
     178    psMetadataItemSupplement (header, recipe, "IQ_FW2_E");
     179
    154180    psMetadataItemSupplement (header, recipe, "IQ_M2");
    155     psMetadataItemSupplement (header, recipe, "IQ_D_M2");
     181    psMetadataItemSupplement (header, recipe, "IQ_M2_ER");
     182    psMetadataItemSupplement (header, recipe, "IQ_M2_LQ");
     183    psMetadataItemSupplement (header, recipe, "IQ_M2_UQ");
     184
     185    psMetadataItemSupplement (header, recipe, "IQ_M2C");
     186    psMetadataItemSupplement (header, recipe, "IQ_M2C_E");
     187    psMetadataItemSupplement (header, recipe, "IQ_M2C_L");
     188    psMetadataItemSupplement (header, recipe, "IQ_M2C_U");
     189
     190    psMetadataItemSupplement (header, recipe, "IQ_M2S");
     191    psMetadataItemSupplement (header, recipe, "IQ_M2S_E");
     192    psMetadataItemSupplement (header, recipe, "IQ_M2S_L");
     193    psMetadataItemSupplement (header, recipe, "IQ_M2S_U");
     194
    156195    psMetadataItemSupplement (header, recipe, "IQ_M3");
    157     psMetadataItemSupplement (header, recipe, "IQ_D_M3");
     196    psMetadataItemSupplement (header, recipe, "IQ_M3_ER");
     197    psMetadataItemSupplement (header, recipe, "IQ_M3_LQ");
     198    psMetadataItemSupplement (header, recipe, "IQ_M3_UQ");
     199
    158200    psMetadataItemSupplement (header, recipe, "IQ_M4");
    159     psMetadataItemSupplement (header, recipe, "IQ_D_M4");
     201    psMetadataItemSupplement (header, recipe, "IQ_M4_ER");
     202    psMetadataItemSupplement (header, recipe, "IQ_M4_LQ");
     203    psMetadataItemSupplement (header, recipe, "IQ_M4_UQ");
    160204
    161205    // XXX these need to be defined from elsewhere
Note: See TracChangeset for help on using the changeset viewer.