IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16586


Ignore:
Timestamp:
Feb 21, 2008, 4:27:40 PM (18 years ago)
Author:
Paul Price
Message:

Allow background to be applied optionally. This is to support the stacking, where we want to apply a matched filter --- the background term corrupts the filtered image.

Location:
branches/pap_branch_080214/psModules/src/imcombine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080214/psModules/src/imcombine/pmSubtraction.c

    r16585 r16586  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.79.2.1 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2008-02-22 02:00:30 $
     6 *  @version $Revision: 1.79.2.2 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2008-02-22 02:27:40 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    636636bool pmSubtractionConvolve(pmReadout *out1, pmReadout *out2, const pmReadout *ro1, const pmReadout *ro2,
    637637                           const psImage *subMask, psMaskType blank, const psRegion *region,
    638                            const pmSubtractionKernels *kernels, bool useFFT)
     638                           const pmSubtractionKernels *kernels, bool doBG, bool useFFT)
    639639{
    640640    PS_ASSERT_PTR_NON_NULL(out1, false);
     
    802802            // (with the stamps) that it does not vary rapidly on this scale.
    803803            polyValues = p_pmSubtractionPolynomial(polyValues, kernels->spatialOrder, xNorm, yNorm);
    804             float background = p_pmSubtractionSolutionBackground(kernels, polyValues); // Background term
    805             background = 0.0;
     804            float background = doBG ? p_pmSubtractionSolutionBackground(kernels, polyValues) :
     805                0.0; // Background term
    806806            psRegion subRegion = psRegionSet(i, xSubMax, j, ySubMax); // Sub-region to convolve
    807807
  • branches/pap_branch_080214/psModules/src/imcombine/pmSubtraction.h

    r15756 r16586  
    66 * @author GLG, MHPCC
    77 *
    8  * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    9  * @date $Date: 2007-12-07 01:57:15 $
     8 * @version $Revision: 1.22.6.1 $ $Name: not supported by cvs2svn $
     9 * @date $Date: 2008-02-22 02:27:40 $
    1010 * Copyright 2004-207 Institute for Astronomy, University of Hawaii
    1111 */
     
    9292                           const psRegion *region, ///< Region to convolve (or NULL)
    9393                           const pmSubtractionKernels *kernels, ///< Kernel parameters
     94                           bool doBG,   ///< Apply background term?
    9495                           bool useFFT  ///< Use Fast Fourier Transform for the convolution?
    9596    );
  • branches/pap_branch_080214/psModules/src/imcombine/pmSubtractionMatch.c

    r16406 r16586  
    463463
    464464            psTrace("psModules.imcombine", 2, "Convolving...\n");
    465             if (!pmSubtractionConvolve(conv1, conv2, ro1, ro2, subMask, maskBlank, region, kernels, useFFT)) {
     465            if (!pmSubtractionConvolve(conv1, conv2, ro1, ro2, subMask, maskBlank, region, kernels,
     466                                       true, useFFT)) {
    466467                psError(PS_ERR_UNKNOWN, false, "Unable to convolve image.");
    467468                goto MATCH_ERROR;
Note: See TracChangeset for help on using the changeset viewer.