IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 12, 2009, 3:23:37 PM (17 years ago)
Author:
Paul Price
Message:

Adding route for pre-calculated kernel using new function, pmSubtractionMatchPrecalc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubMatchPSFs.c

    r23235 r23309  
    4848
    4949    bool mdok;                          // Status of MD lookup
     50
     51    // Load pre-calculated kernel, if available
     52    pmReadout *kernelRO = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT.KERNEL"); // RO with kernel
    5053
    5154    // Sources in image, used for stamps: these must be loaded from previous analysis stages
     
    134137
    135138    // Match the PSFs
    136     if (!pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, stride, regionSize, spacing, threshold,
    137                             sources, stampsName, type, size, order, widths, orders, inner, ringsOrder,
    138                             binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej, sys,
    139                             maskVal, maskBad, maskPoor, poorFrac, badFrac, subMode)) {
    140         psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    141         return false;
     139    if (kernelRO) {
     140        if (!pmSubtractionMatchPrecalc(inConv, refConv, inRO, refRO, kernelRO->analysis,
     141                                       stride, sys, maskVal, maskBad, maskPoor, poorFrac, badFrac)) {
     142            psError(PS_ERR_UNKNOWN, false, "Unable to convolve images.");
     143            return false;
     144        }
     145    } else {
     146        if (!pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, stride, regionSize, spacing,
     147                                threshold, sources, stampsName, type, size, order, widths, orders, inner,
     148                                ringsOrder, binning, penalty, optimum, optWidths, optOrder, optThresh, iter,
     149                                rej, sys, maskVal, maskBad, maskPoor, poorFrac, badFrac, subMode)) {
     150            psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
     151            return false;
     152        }
    142153    }
    143154
Note: See TracChangeset for help on using the changeset viewer.