IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15862


Ignore:
Timestamp:
Dec 16, 2007, 12:20:45 PM (18 years ago)
Author:
eugene
Message:

added mode option for masking

Location:
trunk/ppMerge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeMask.c

    r15663 r15862  
    110110
    111111            pmReadout *roOut = pmReadoutAlloc(cellOut); // Output readout
    112             roOut->mask = pmMaskIdentifyBadPixels(suspect, options->maskBad, options->combine->maskVal);
     112            roOut->mask = pmMaskIdentifyBadPixels(suspect, options->combine->maskVal, filenames->n, options->maskBad, options->maskMode);
    113113            roOut->data_exists = cellOut->data_exists = chipOut->data_exists = true;
    114114
  • trunk/ppMerge/src/ppMergeOptions.c

    r15476 r15862  
    5050    options->maskSuspect = 5.0;
    5151    options->maskBad = 10.0;
     52    options->maskMode = PM_MASK_ID_VALUE;
    5253    options->onOff = 0;
    5354    options->combine = pmCombineParamsAlloc(PS_STAT_SAMPLE_MEAN);
     
    235236    }
    236237
     238    const char *maskMode = psMetadataLookupStr(NULL, recipe, "MASK.MODE"); // The type of calibration frame
     239    if (!maskMode) {
     240        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "No mask mode specified in recipe.");
     241        psFree(options);
     242        return NULL;
     243    }
     244
     245    options->maskMode = pmMaskIdentifyModeFromString (maskMode);
     246    if (options->maskMode == PM_MASK_ID_NONE) {
     247        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "invalid mask mode %s.", maskMode);
     248        psFree(options);
     249        return NULL;
     250    }
     251
    237252#if 0
    238253    // Or you can set them individually
  • trunk/ppMerge/src/ppMergeOptions.h

    r14356 r15862  
    3737    float maskSuspect;                  // Threshold for identifying suspect pixels
    3838    float maskBad;                      // Threshold for identifying bad pixels
     39    pmMaskIdentifyMode maskMode;        // how to set the limit based on the threshold value above?
    3940    ppOnOff onOff;                      // On/off pairs?
    4041    pmCombineParams *combine;           // Combination parameters
Note: See TracChangeset for help on using the changeset viewer.