IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2007, 11:12:44 AM (19 years ago)
Author:
Paul Price
Message:

Updating API

File:
1 edited

Legend:

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

    r14626 r14763  
    1414{
    1515    // Look up appropriate values from the ppSub recipe
     16    bool mdok;                          // Status of MD lookup
    1617    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
    1718    int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
     
    3435    psMaskType maskBlank = pmConfigMask(psMetadataLookupStr(NULL, recipe, "MASK.BLANK"),
    3536                                        config); // Mask for blank reg.
     37    bool optimum = psMetadataLookupBool(&mdok, config->arguments, "OPTIMUM"); // Derive optimum parameters?
     38    float optMin = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MIN"); // Minimum width for search
     39    float optMax = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MAX"); // Maximum width for search
     40    float optStep = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.STEP"); // Step for search
     41    float optThresh = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.TOL"); // Tolerance for search
     42    int optOrder = psMetadataLookupS32(&mdok, config->arguments, "OPTIMUM.ORDER"); // Order for search
    3643
    3744    // These values are specified specifically for stacking
     
    3946    float target = psMetadataLookupF32(NULL, config->arguments, "TARGET"); // Target PSF width
    4047
     48    psVector *optWidths = NULL;         // Vector with FWHMs for optimum search
     49    if (optimum) {
     50        optWidths = psVectorCreate(optWidths, optMin, optMax, optStep, PS_TYPE_F32);
     51    }
     52
    4153    // Do the image matching
    4254    if (!pmSubtractionMatch(output, input, NULL, footprint, regionSize, spacing, threshold, stampsName,
    43                             target, type, size, order, widths, orders, inner, ringsOrder, binning, iter,
    44                             rej, maskBad, maskBlank)) {
     55                            target, type, size, order, widths, orders, inner, ringsOrder, binning, optimum,
     56                            optWidths, optOrder, optThresh, iter, rej, maskBad, maskBlank)) {
    4557        psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    4658        return false;
Note: See TracChangeset for help on using the changeset viewer.