IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27676


Ignore:
Timestamp:
Apr 13, 2010, 4:50:44 PM (16 years ago)
Author:
eugene
Message:

do not treat saturated or otherwise bad image as an error for pmPatternCell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmPattern.c

    r26893 r27676  
    290290    psStats *cellStats = psStatsAlloc(cellStat); // Statistics on cells
    291291    if (!psVectorStats(cellStats, mean, NULL, meanMask, PM_PATTERN_ALL)) {
     292        // an error in psVectorStats implies a programming error
    292293        psError(PS_ERR_UNKNOWN, false, "Unable to calculate mean cell background.");
    293294        psFree(mean);
     
    300301    psFree(cellStats);
    301302    if (!isfinite(background)) {
    302         psError(PS_ERR_UNKNOWN, false, "Non-finite mean cell background.");
     303        // this can happen if all data in the image is bad -- in this case, do not correct, but
     304        // do not treat this as an error (other functions are responsible for check data validity)
     305        psLogMsg("psModules.detrend", PS_LOG_DETAIL, "Non-finite mean cell background -- skipping correction (data probabaly bad).");
    303306        psFree(mean);
    304307        psFree(meanMask);
    305         return false;
     308        return true;
    306309    }
    307310
Note: See TracChangeset for help on using the changeset viewer.