IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 1:36:01 PM (17 years ago)
Author:
Paul Price
Message:

First attempt (untested) at reading input files from the RUN metadata, and using the precalculated PSF-matching kernel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackMatch.c

    r23287 r23357  
    381381
    382382            // Do the image matching
    383             if (!pmSubtractionMatch(output, NULL, readout, fake, footprint, stride, regionSize, spacing,
    384                                     threshold, stampSources, stampsName, type, size, order, widths, orders,
    385                                     inner, ringsOrder, binning, penalty, optimum, optWidths, optOrder,
    386                                     optThresh, iter, rej, sysError, maskVal, maskBad, maskPoor, poorFrac,
    387                                     badFrac, PM_SUBTRACTION_MODE_1)) {
    388                 psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    389                 psFree(fake);
    390                 psFree(optWidths);
    391                 psFree(stampSources);
    392                 psFree(output);
    393                 return false;
     383            pmSubtractionKernels *kernel = psMetadataLookupPtr(&mdok, readout->analysis,
     384                                                               PM_SUBTRACTION_ANALYSIS_KERNEL); // Conv kernel
     385            if (kernel) {
     386                if (!pmSubtractionMatchPrecalc(output, NULL, readout, fake, output->analysis,
     387                                               stride, sysError, maskVal, maskBad, maskPoor,
     388                                               poorFrac, badFrac)) {
     389                    psError(PS_ERR_UNKNOWN, false, "Unable to convolve images.");
     390                    psFree(fake);
     391                    psFree(optWidths);
     392                    psFree(stampSources);
     393                    psFree(output);
     394                    return false;
     395                }
     396            } else {
     397                if (!pmSubtractionMatch(output, NULL, readout, fake, footprint, stride, regionSize, spacing,
     398                                        threshold, stampSources, stampsName, type, size, order, widths,
     399                                        orders, inner, ringsOrder, binning, penalty,
     400                                        optimum, optWidths, optOrder, optThresh, iter, rej, sysError,
     401                                        maskVal, maskBad, maskPoor, poorFrac, badFrac,
     402                                        PM_SUBTRACTION_MODE_1)) {
     403                    psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
     404                    psFree(fake);
     405                    psFree(optWidths);
     406                    psFree(stampSources);
     407                    psFree(output);
     408                    return false;
     409                }
    394410            }
    395411
Note: See TracChangeset for help on using the changeset viewer.