IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 13, 2009, 4:59:22 PM (17 years ago)
Author:
eugene
Message:

if an external mask is supplied, ensure that NAN pixels are also masked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotImageLoop.c

    r23957 r25364  
    6767
    6868                // Update the header
    69                 {
    70                     pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell);
    71                     if (hdu && hdu != lastHDU) {
    72                         psphotVersionHeaderFull(hdu->header);
    73                         lastHDU = hdu;
    74                     }
     69                pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell);
     70                if (hdu && hdu != lastHDU) {
     71                    psphotVersionHeaderFull(hdu->header);
     72                    lastHDU = hdu;
    7573                }
    7674
    77                 psImageMaskType maskSat = pmConfigMaskGet("SAT", config); // Mask value for saturated pixels
    78                 if (!pmReadoutMaskNonfinite(readout, maskSat)) {
    79                     psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels.");
    80                     psFree(view);
    81                     return false;
    82                 }
     75                // if an external mask is supplied, ensure that NAN pixels are also masked
     76                if (readout->mask) {
     77                    psImageMaskType maskSat = pmConfigMaskGet("SAT", config); // Mask value for saturated pixels
     78                    if (!pmReadoutMaskNonfinite(readout, maskSat)) {
     79                        psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels.");
     80                        psFree(view);
     81                        return false;
     82                    }
     83                }
    8384
    8485                // run the actual photometry analysis on this chip/cell/readout
Note: See TracChangeset for help on using the changeset viewer.