IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2007, 5:51:03 PM (19 years ago)
Author:
Paul Price
Message:

Adding pmConfigMask to use symbolic names for mask values. Need to adapt APIs that use mask values to accept the values for those masks (which can be obtained from pmConfigMask).

Location:
trunk/psModules/src/detrend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmFlatField.c

    r12696 r13591  
    1212#include "pmFlatField.h"
    1313
    14 bool pmFlatField(pmReadout *in, const pmReadout *flat)
     14bool pmFlatField(pmReadout *in, const pmReadout *flat, psMaskType badFlat)
    1515{
    1616    PS_ASSERT_PTR_NON_NULL(in, false);
     
    7979            if (flatValue <= 0.0 || (flatMask && flatMask->data.U8[j + yOffset][i + xOffset])) { \
    8080                if (inMask) { \
    81                     inMask->data.U8[j][i] |= PM_MASK_FLAT; \
     81                    inMask->data.PS_TYPE_MASK_DATA[j][i] |= badFlat; \
    8282                } \
    8383                inImage->data.TYPE[j][i] = SPECIAL; \
  • trunk/psModules/src/detrend/pmFlatField.h

    r12696 r13591  
    55 * @author Paul Price, IfA
    66 *
    7  * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2007-03-30 21:12:56 $
     7 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2007-06-02 03:51:03 $
    99 * Copyright 2004-2006 Institute for Astronomy, University of Hawaii
    1010 */
     
    2424/// are masked, if there is a mask present in the input readout.
    2525bool pmFlatField(pmReadout *in,         ///< Readout with input image
    26                  const pmReadout *flat  ///< Readout with flat image
     26                 const pmReadout *flat,  ///< Readout with flat image
     27                 psMaskType badFlat     ///< Mask value to give bad flat pixels
    2728                );
    2829/// @}
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r12696 r13591  
    6666            }
    6767        }
    68     } else {
    69         // set raised pixels in exMask which are selected by maskVal
    70         for (int j = 0; j < inMask->numRows; j++) {
    71             int xJ = j - offRow;
    72             for (int i = 0; i < inMask->numCols; i++) {
    73                 int xI = i - offCol;
    74                 if (exVal[xJ][xI] == 0) {
    75                     inVal[j][i] |= PM_MASK_BAD;
    76                 }
    77             }
    78         }
    7968    }
    8069
     
    8271    psString timeString = psTimeToISO(time); // String with time
    8372    psFree(time);
    84     psStringPrepend(&timeString, "Static mask applied at ");
     73    psStringPrepend(&timeString, "Static mask (selecting %x) applied at ", maskVal);
    8574    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK,
    8675                     timeString, "");
Note: See TracChangeset for help on using the changeset viewer.