IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40447


Ignore:
Timestamp:
Jun 11, 2018, 2:33:59 PM (8 years ago)
Author:
eugene
Message:

return false from psphotReadoutCleanup if quality is bad

Location:
trunk/psphot/src
Files:
2 edited

Legend:

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

    r37466 r40447  
    9494    // generate a background model (median, smoothed image)
    9595    if (!psphotModelBackground (config, view, filerule)) {
     96      // XXX this should result in a bad quality flag
    9697        return psphotReadoutCleanup (config, view, filerule);
    9798    }
  • trunk/psphot/src/psphotReadoutCleanup.c

    r37941 r40447  
    5555    // XXX where do we free these, in here (psMetadataRemove?)
    5656
     57    // XXX this is currently only set by psphotModelBackground / psphotModelBackgroundReadoutFileIndex / psphotModelBackgroundReadout
     58    // if the image background cannot be measured (no valid pixels)
    5759    int quality = psMetadataLookupS32 (&status, readout->analysis, "PSPHOT_QUALITY");
    5860    if (quality) {
     
    7476            return false;
    7577        }
     78    }
     79
     80    // Check to see if any sources were detected
     81    // This is not necessarily a quality error: e.g., ppSub
     82    if (0 && !psf && !sources) {
     83      psError(PSPHOT_ERR_DATA, false, "Unable to detect sources in the image");
     84      return false;
    7685    }
    7786
     
    115124
    116125    psFree (header);
     126    if (quality) return false;
     127
    117128    return true;
    118129}
Note: See TracChangeset for help on using the changeset viewer.