IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 21, 2007, 6:23:24 PM (19 years ago)
Author:
Paul Price
Message:

Fix order of creation of mask and weight.

File:
1 edited

Legend:

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

    r10415 r13461  
    1515    // find the currently selected readout
    1616    pmReadout *input = pmFPAfileThisReadout(config->files, view, "PPIMAGE.INPUT");
     17
     18    // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine.
     19    if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
     20        // create the target mask and weight images
     21        pmReadoutGenerateMaskWeight(input, true);
     22    }
     23    // apply the externally supplied mask to the input->mask pixels
     24    if (options->doMask) {
     25        pmReadout *mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.MASK");
     26        pmMaskBadPixels(input, mask, options->maskValue);
     27    }
    1728
    1829# if 0
     
    4152    }
    4253
    43     if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
    44         // create the target mask and weight images
    45         pmReadoutGenerateMaskWeight(input, true);
    46     }
    47 
    48     // apply the externally supplied mask to the input->mask pixels
    49     if (options->doMask) {
    50         pmReadout *mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.MASK");
    51         pmMaskBadPixels(input, mask, options->maskValue);
    52     }
    53 
    5454    // Shutter correction
    5555    if (options->doShutter) {
     
    6262    // Flat-field correction (no options used?)
    6363    if (options->doFlat) {
    64         pmReadoutGenerateMaskWeight(input, true);
    6564        pmReadout *flat = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.FLAT");
    6665        if (!pmFlatField(input, flat)) {
Note: See TracChangeset for help on using the changeset viewer.