IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2007, 6:16:29 PM (19 years ago)
Author:
Paul Price
Message:

Updating high-level programs to use symbolic names for mask values in the recipes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpArguments.c

    r13104 r13593  
    102102
    103103        // Get mask parameters
    104         psMaskType maskIn = psMetadataLookupU8(&status, recipe, "MASK.IN"); // Mask for input data
    105         if (!status) {
     104        psMaskType maskIn, maskPoor, maskBad; // Mask values for input, "poor" and "bad" pixels
     105
     106        psString maskNames = psMetadataLookupStr(&status, recipe, "MASK.IN");
     107         if (!status) {
    106108            maskIn = 0x00;
    107109            psWarning("MASK.IN is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskIn);
    108110        }
    109         psMaskType maskPoor = psMetadataLookupU8(&status, recipe, "MASK.POOR"); // Mask for "poor" warped data
     111        maskIn = pmConfigMask(maskNames, config); // Mask for input data
     112
     113        maskNames = psMetadataLookupStr(&status, recipe, "MASK.POOR");
    110114        if (!status) {
    111115            maskPoor = 0x00;
    112116            psWarning("MASK.POOR is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskPoor);
    113117        }
    114         psMaskType maskBad = psMetadataLookupU8(&status, recipe, "MASK.IN"); // Mask for bad warped data
     118        maskPoor = pmConfigMask(maskNames, config); // Mask for "poor" warped data
     119
     120        maskNames = psMetadataLookupStr(&status, recipe, "MASK.BAD");
    115121        if (!status) {
    116122            maskBad = 0x00;
    117123            psWarning("MASK.BAD is not set in the %s recipe --- defaulting to %x.", PSWARP_RECIPE, maskBad);
    118124        }
     125        maskBad = pmConfigMask(maskNames, config); // Mask for bad warped data
     126
    119127        float poorFrac = psMetadataLookupF32(&status, recipe, "POOR.FRAC"); // Frac of bad flux for a "poor"
    120128        if (!status) {
Note: See TracChangeset for help on using the changeset viewer.