IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 15, 2026, 4:51:41 PM (45 hours ago)
Author:
eugene
Message:

add an error message for all failure modes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/psphot/src/psphotForcedReadout.c

    r34215 r43120  
    11# include "psphotInternal.h"
     2
     3# define CLEANUP { \
     4  bool cleanupStatus = psphotReadoutCleanup (config, view, filerule); \
     5  if (!cleanupStatus) { \
     6    psError(psErrorCodeLast(), false, "failure in psphotForcedReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); \
     7  } \
     8  return cleanupStatus; }
    29
    310bool psphotForcedReadout(pmConfig *config, const pmFPAview *view, const char *filerule) {
    … …  
    3138    // Generate the mask and weight images, including the user-defined analysis region of interest
    3239    psphotSetMaskAndVariance (config, view, filerule);
    33     if (!strcasecmp (breakPt, "NOTHING")) {
    34         return psphotReadoutCleanup (config, view, filerule);
    35     }
     40    if (!strcasecmp (breakPt, "NOTHING")) CLEANUP;
    3641
    3742    // generate a background model (median, smoothed image)
    38     if (!psphotModelBackground (config, view, filerule)) {
    39         return psphotReadoutCleanup (config, view, filerule);
    40     }
    41     if (!psphotSubtractBackground (config, view, filerule)) {
    42         return psphotReadoutCleanup (config, view, filerule);
    43     }
    44     if (!strcasecmp (breakPt, "BACKMDL")) {
    45         return psphotReadoutCleanup (config, view, filerule);
    46     }
     43    if (!psphotModelBackground (config, view, filerule)) CLEANUP;
     44    if (!psphotSubtractBackground (config, view, filerule)) CLEANUP;
     45    if (!strcasecmp (breakPt, "BACKMDL")) CLEANUP;
    4746
    4847    if (!psphotLoadPSF (config, view, filerule)) {
    4948        // this only happens if we had a programming error in psphotLoadPSF
    5049        psError (PSPHOT_ERR_UNKNOWN, false, "error loading psf model");
    51         return psphotReadoutCleanup (config, view, filerule);
     50        CLEANUP;
    5251    }
    5352
    … …  
    8786
    8887    // create the exported-metadata and free local data
    89     return psphotReadoutCleanup (config, view, filerule);
     88    CLEANUP;
    9089}
Note: See TracChangeset for help on using the changeset viewer.