IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41500 for trunk/psastro


Ignore:
Timestamp:
Feb 19, 2021, 2:15:14 PM (5 years ago)
Author:
eugene
Message:

fix build error and logic for chip failure fraction

Location:
trunk/psastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastro.h

    r41499 r41500  
    109109bool              psastroMosaicCommonScale (pmFPA *fpa, psMetadata *recipe);
    110110bool              psastroMosaicAstrom (pmConfig *config, psMetadata *stats);
    111 bool              psastroMosaicChipAstrom (pmFPA *fpa, psMetadata *recipe, int iteration);
     111bool              psastroMosaicChipAstrom (pmFPA *fpa, psMetadata *stats, psMetadata *recipe, int iteration);
    112112bool              psastroMosaicSetMatch (pmFPA *fpa, psMetadata *recipe, int iteration);
    113113bool              psastroMosaicSetAstrom (pmFPA *fpa);
  • trunk/psastro/src/psastroMosaicChipAstrom.c

    r41499 r41500  
    2929
    3030    int nChipGood = 0;
    31     int nChipFail = 0;
     31    int nChipTotal = 0;
    3232
    3333    // this loop selects the matched stars for all chips
    3434    while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
     35        nChipTotal ++;
    3536        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    3637        if (!chip->process || !chip->file_exists) { continue; }
     
    6061                    psErrorStackPrint(stderr, "failure for one chip\n");
    6162                    psErrorClear();
    62                     nChipFail ++;
    6363                    continue;
    6464                }
     
    7070                    psErrorStackPrint(stderr, "failure for one chip\n");
    7171                    psErrorClear();
    72                     nChipFail ++;
    7372                    continue;
    7473                }
     
    8079
    8180    // if basically the entire exposure is bad, return false (calling function sets bad quality)
    82     float fGood = nChipGood / ((float) (nChipGood + nChipFail));
     81    float fGood = nChipGood / ((float) nChipTotal);
     82    psLogMsg ("psastro", PS_LOG_INFO, "%d good chips of %d = %.2f\n", nChipGood, nChipTotal, fGood);
    8383    if (fGood < minGoodChipFraction) {
    84       psWarning ("Too few good chips (%d of %d = %.2f), setting bad quality for this exposure\n", nChipGood, (nChipGood + nChipFail), fGood);
     84      psWarning ("Too few good chips (%d of %d = %.2f), setting bad quality for this exposure\n", nChipGood, nChipTotal, fGood);
    8585      // NOTE: set bad data quality here
    8686      if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) {
Note: See TracChangeset for help on using the changeset viewer.