IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13593 for trunk/ppImage/src


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.

Location:
trunk/ppImage/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r13506 r13593  
    1818    // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine.
    1919    if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
    20         pmReadoutGenerateMask(input);
     20        pmReadoutGenerateMask(input, options->satMask, options->badMask);
    2121    }
    2222    // apply the externally supplied mask to the input->mask pixels
     
    6868    if (options->doFlat) {
    6969        pmReadout *flat = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.FLAT");
    70         if (!pmFlatField(input, flat)) {
     70        if (!pmFlatField(input, flat, options->flatMask)) {
    7171            return false;
    7272        }
  • trunk/ppImage/src/ppImageOptions.c

    r10214 r13593  
    2424    // default flags for various activities
    2525    options->doMask     = false;        // Mask bad pixels
    26     options->maskValue  = 0xff;         // Default mask value
     26    options->maskValue  = 0x00;         // Default mask value
     27    options->satMask    = 0x00;         // Saturated pixels
     28    options->badMask    = 0x00;         // Bad pixels
     29    options->flatMask   = 0x00;         // Bad flat pixels
    2730
    2831    options->doNonLin   = false;        // Non-linearity correction
     
    163166    // Mask recipe options
    164167    options->doMask = psMetadataLookupBool(NULL, recipe, "MASK");
    165     psMaskType maskValue = psMetadataLookupU8(&status, recipe, "MASK.VALUE");
     168    const char *masks = psMetadataLookupStr(&status, recipe, "MASK.VALUE");
    166169    if (status) {
    167         options->maskValue = maskValue;
    168     }
     170        options->maskValue = pmConfigMask(masks, config);
     171    }
     172    options->satMask = pmConfigMask("SAT", config);
     173    options->badMask = pmConfigMask("BAD", config);
     174    options->flatMask = pmConfigMask("FLAT", config);
     175
    169176
    170177    options->doBias = psMetadataLookupBool(NULL, recipe, "BIAS");
  • trunk/ppImage/src/ppImageOptions.h

    r9857 r13593  
    66    bool doMask;                        // Mask bad pixels
    77    psMaskType maskValue;               // apply this bit-mask to choose masked bits
     8    psMaskType satMask;                 // Mask value to give saturated pixels
     9    psMaskType badMask;                 // Mask value to give bad pixels
     10    psMaskType flatMask;                // Mask value to give bad flat pixels
    811
    912    bool doBias;                        // Bias subtraction
Note: See TracChangeset for help on using the changeset viewer.