IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2007, 2:34:04 PM (19 years ago)
Author:
Paul Price
Message:

Was getting a SEGV when no weight map was provided (bug 901).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmStack.c

    r14282 r14459  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-07-18 03:54:01 $
     10 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-08-10 00:34:04 $
    1212 *
    1313 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    226226        psImage *mask = data->sky->mask; // Mask of interest
    227227        pixelData->data.F32[i] = image->data.F32[y][x];
    228         pixelWeights->data.F32[i] = weight->data.F32[y][x];
     228        if (weight) {
     229            pixelWeights->data.F32[i] = weight->data.F32[y][x];
     230        }
    229231        pixelMasks->data.PS_TYPE_MASK_DATA[i] = mask->data.PS_TYPE_MASK_DATA[y][x];
    230232        if (pixelMasks->data.PS_TYPE_MASK_DATA[i] & maskVal) {
     
    254256        (weight && !combinationVariance(&variance, pixelWeights, weights, pixelMasks, maskVal))) {
    255257        image->data.F32[y][x] = NAN;
    256         mask->data.PS_TYPE_MASK_DATA[y][x] = bad;
     258            mask->data.PS_TYPE_MASK_DATA[y][x] = bad;
    257259        if (weight) {
    258260            weight->data.F32[y][x] = NAN;
Note: See TracChangeset for help on using the changeset viewer.