IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33442


Ignore:
Timestamp:
Mar 8, 2012, 3:54:02 PM (14 years ago)
Author:
bills
Message:

avoid assertion failure that occurs during psphotStack extended
source analysis where psf image has a negative sum.
Instead of asserting skip the source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPCMdata.c

    r32725 r33442  
    136136            sum += value;
    137137        }
     138    }
     139
     140    if (!(sum > 0.0)) {
     141        // Crazy PSF image print out some debugging information ...
     142        fprintf(stderr, "invalid kernel sum %f found by pmPCMkernelFromPSF\n", sum);    for (int j = psf->yMin; j <= psf->yMax; j++) {
     143            fprintf(stderr, "Row %d\n", j);
     144            for (int i = psf->xMin; i <= psf->xMax; i++) {
     145                double value = source->psfImage->data.F32[y0 + j][x0 + i];
     146                fprintf(stderr, "  %d %f\n", i, value);
     147            }
     148        }
     149        fflush(stderr);
     150        // ... but avoid the asssertion two lines down by escaping
     151        goto escape;
    138152    }
    139153    assert (sum > 0.0);
Note: See TracChangeset for help on using the changeset viewer.