IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2009, 4:46:10 PM (17 years ago)
Author:
Paul Price
Message:

Get QUALITY (error code from non-fatal failure, e.g., psphot) into the output statistics and parse for flag to give to ippTools.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppSub/src/ppSubReadoutPhotometry.c

    r21524 r23580  
    4545    pmPSF *psf = psMetadataLookupPtr(NULL, psfInputChip->analysis, "PSPHOT.PSF"); // PSF for photometry
    4646    if (!psf) {
    47         psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF from psphot");
    48         return false;
     47        psWarning("No PSF available --- suspect bad data quality.");
     48        if (stats && psMetadataLookupBool(NULL, stats, "QUALITY")) {
     49            psError(PS_ERR_UNEXPECTED_NULL, false, "Bad or unset QUALITY flag");
     50            return false;
     51        }
     52        psErrorClear();
     53        psphotFilesActivate(config, false);
    4954    }
    5055    psMetadataAddPtr(psfLoadChip->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN | PS_META_REPLACE,
     
    8691
    8792    if (!psphotReadoutMinimal(config, view)) {
    88         psWarning("Unable to perform photometry on subtracted image.");
    89         psErrorStackPrint(stderr, "Error stack from photometry:");
     93        // This is likely a data quality issue
     94        // XXX Split into multiple cases using error codes?
     95        psErrorStackPrint("Unable to perform photometry on image");
     96        psWarning("Unable to perform photometry on image --- suspect bad data quality.");
     97        if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) {
     98            psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE,
     99                             "Unable to perform photometry on image", psErrorCodeLast());
     100        }
    90101        psErrorClear();
     102        psphotFilesActivate(config, false);
    91103    }
    92104#if 1
Note: See TracChangeset for help on using the changeset viewer.