IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14528


Ignore:
Timestamp:
Aug 15, 2007, 5:58:29 PM (19 years ago)
Author:
Paul Price
Message:

Ensure correct region is used when cutting down the weight map.

File:
1 edited

Legend:

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

    r14527 r14528  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-08-16 03:55:52 $
     6 *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-08-16 03:58:29 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    696696            psImage *convolvedStamp = convolution->image; // Image of the convolution
    697697            psImage *input = stamp->input->image; // Input image postage stamp
     698            psImage *weight = stamp->weight->image; // Weight image postage stamp
    698699
    699700            // Region of interest
    700             psRegion region = psRegionSet(input->col0 + size, input->col0 + size + 2 * footprint + 1,
     701            psRegion inRegion = psRegionSet(input->col0 + size, input->col0 + size + 2 * footprint + 1,
    701702                                          input->row0 + size, input->row0 + size + 2 * footprint + 1);
    702 
    703             psImage *inStamp = psImageSubset(stamp->input->image, region); // Image of stamp
    704             psImage *wtStamp = psImageSubset(stamp->weight->image, region); // Image of stamp
     703            psRegion wtRegion = (input == weight ? inRegion :
     704                                 psRegionSet(weight->col0 + size, weight->col0 + size + 2 * footprint + 1,
     705                                             weight->row0 + size, weight->row0 + size + 2 * footprint + 1));
     706
     707            psImage *inStamp = psImageSubset(stamp->input->image, inRegion); // Image of stamp
     708            psImage *wtStamp = psImageSubset(stamp->weight->image, wtRegion); // Image of stamp
    705709            assert(convolvedStamp->numCols == inStamp->numCols &&
    706710                   convolvedStamp->numRows == inStamp->numRows);
Note: See TracChangeset for help on using the changeset viewer.