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/pswarp/src/pswarpLoop.c

    r23314 r23580  
    142142        psFree(resolved);
    143143        stats = psMetadataAlloc();
     144        psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", 0, "No problems", 0);
    144145    }
    145146
     
    364365    fileActivation(config, independentFiles, false);
    365366
    366     // We need a new PSF model for the warped frame.  It would be good to generate this analytically, but that's going to be tricky.
    367     // We have a list of sources, so we use those to redetermine the PSF model.
     367    // We need a new PSF model for the warped frame.  It would be good to generate this analytically, but
     368    // that's going to be tricky.  We have a list of sources, so we use those to redetermine the PSF model.
    368369
    369370    if (psMetadataLookupBool(&mdok, config->arguments, "PSF")) {
     
    394395        // measure the PSF using these sources
    395396        if (!psphotReadoutFindPSF(config, view, sources)) {
    396             psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF for warped image.");
    397             return false;
     397            // This is likely a data quality issue
     398            // XXX Split into multiple cases using error codes?
     399            psErrorStackPrint("Unable to determine PSF");
     400            psWarning("Unable to determine PSF --- suspect bad data quality.");
     401            if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) {
     402                psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE,
     403                                 "Unable to determine PSF", psErrorCodeLast());
     404            }
     405            psErrorClear();
     406            psphotFilesActivate(config, false);
    398407        }
    399408
Note: See TracChangeset for help on using the changeset viewer.