IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16622


Ignore:
Timestamp:
Feb 22, 2008, 4:29:09 PM (18 years ago)
Author:
Paul Price
Message:

Updating to use new pmStackCombine API

Location:
trunk/ppStack/src
Files:
2 edited

Legend:

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

    r16605 r16622  
    122122    psMetadataAddStr(arguments, PS_LIST_TAIL, "-psf-model", 0, "Model name for PSF generation", "PS_MODEL_RGAUSS");
    123123    psMetadataAddS32(arguments, PS_LIST_TAIL, "-psf-order", 0, "Spatial order for PSF generation", 3);
     124    psMetadataAddBool(arguments, PS_LIST_TAIL, "-variance", 0, "Use variance for rejection?", false);
     125    psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, "Play safe with small numbers of pixels to combine?", false);
    124126
    125127    if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) {
     
    174176    }
    175177
     178    if (psMetadataLookupBool(NULL, arguments, "-variance") ||
     179        psMetadataLookupBool(NULL, recipe, "VARIANCE")) {
     180        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "VARIANCE", 0,
     181                          "Use variance for rejection?", true);
     182    }
     183
     184    if (psMetadataLookupBool(NULL, arguments, "-safe") ||
     185        psMetadataLookupBool(NULL, recipe, "SAFE")) {
     186        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "SAFE", 0,
     187                          "Play safe with small number of pixels to combine?", true);
     188    }
     189
    176190    psTrace("ppStack", 1, "Done reading command-line arguments\n");
    177191    psFree(arguments);
  • trunk/ppStack/src/ppStackReadout.c

    r16605 r16622  
    3131
    3232    // Get the recipe values
     33    bool mdok;                          // Status of MD lookup
    3334    int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Rejection iterations
    3435    float combineRej = psMetadataLookupF32(NULL, config->arguments, "COMBINE.REJ"); // Combination threshold
     
    3637    psMaskType maskBlank = psMetadataLookupU8(NULL, config->arguments, "MASK.BLANK"); // Mask for blank reg.
    3738    float threshold = psMetadataLookupF32(NULL, config->arguments, "THRESHOLD.MASK"); // Threshold for mask deconvolution
     39    bool useVariance = psMetadataLookupBool(&mdok, config->arguments, "VARIANCE"); // Use variance for rejection?
     40    bool safe = psMetadataLookupBool(&mdok, config->arguments, "SAFE"); // Play safe when combining small numbers of pixels?
    3841
    3942    int num = readouts->n;              // Number of inputs
     
    106109    }
    107110
    108     if (!pmStackCombine(outRO, stack, maskBad, maskBlank, iter, combineRej)) {
     111    if (!pmStackCombine(outRO, stack, maskBad, maskBlank, iter, combineRej, useVariance, safe)) {
    109112        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection.");
    110113        psFree(fpaList);
     
    175178#endif
    176179
    177     if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, combineRej)) {
     180    if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, combineRej, useVariance, safe)) {
    178181        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
    179182        psFree(fpaList);
Note: See TracChangeset for help on using the changeset viewer.