IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13866


Ignore:
Timestamp:
Jun 18, 2007, 3:17:04 PM (19 years ago)
Author:
eugene
Message:

data error only for invalid background

File:
1 edited

Legend:

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

    r13808 r13866  
    255255        }
    256256    }
    257     assert (Count > 0);
     257    if (Count == 0) {
     258        psError (PSPHOT_ERR_DATA, true, "failed to build background image");
     259        psFree(stats);
     260        psFree(statsDefaults);
     261        psFree(binning);
     262        psFree(rng);
     263        return false;
     264    }
     265
    258266    Value /= Count;
    259267    ValueStdev /= Count;
     
    321329    // linear interpolation to full-scale
    322330    if (!psImageUnbin (background->image, model->image, binning)) {
    323         psError (PSPHOT_ERR_PROG, true, "failed to build background image");
     331        psError (PSPHOT_ERR_PROG, true, "inconsistent sizes for unbinning");
    324332        return false;
    325333    }
Note: See TracChangeset for help on using the changeset viewer.