IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11315


Ignore:
Timestamp:
Jan 25, 2007, 6:54:23 PM (19 years ago)
Author:
eugene
Message:

handle DATA error and NONE

File:
1 edited

Legend:

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

    r11263 r11315  
    66bool psphotReadoutCleanup (pmConfig *config, pmReadout *readout, psMetadata *recipe, pmPSF *psf, psArray *sources) {
    77
    8     psErrorCode err = psErrorCodeLast();
    9     if (err != PSPHOT_ERR_DATA) {
    10         return false;
    11     }
     8    if (psErrorCodeLast() == PSPHOT_ERR_DATA) {
     9        psErrorStackPrint(stderr, "Error in the psphot readout analysis");
     10        psErrorClear();
     11    }
     12    if (psErrorCodeLast() != PS_ERR_NONE) return false;
    1213
    1314    // use the psf-model to measure FWHM stats
     
    3132
    3233    // save the results of the analysis
    33     psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY,    "psphot sources", sources);
    3434    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER",  PS_DATA_METADATA, "header stats", header);
    35     psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF",     PS_DATA_UNKNOWN,  "psphot psf", psf);
     35    if (sources) {
     36        psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY,    "psphot sources", sources);
     37    }
     38    if (psf) {
     39        psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF",     PS_DATA_UNKNOWN,  "psphot psf", psf);
     40    }
    3641
    3742    // remove internal pmFPAfiles, if created
    3843    pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
    3944    pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
     45
     46    if (psErrorCodeLast() != PS_ERR_NONE) abort();
    4047
    4148    // XXX move this to top of loop
Note: See TracChangeset for help on using the changeset viewer.