IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7283


Ignore:
Timestamp:
Jun 1, 2006, 4:16:05 PM (20 years ago)
Author:
Paul Price
Message:

Restoring pmMaskBadPixels to the build (it has different functionality than pmReadoutSetMask, which only sets the mask on the basis of the image pixels, not on the basis of an independent bad pixel mask). Moved pmMaskValue to pmFPAMaskWeight.h, since it's related to the camera more than the detrend step. Changed a whole heap of #include statements to point to the new location.

Location:
trunk/psModules/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAMaskWeight.h

    r7017 r7283  
    44#include "pmFPA.h"
    55
     6// these defines are necessary to yield 8-bit results (use instead of ~)
     7#define NOT_U8(A)(UCHAR_MAX-(A))
     8#define NOT_U16(A)(USHORT_MAX-(A))
     9
    610/** Mask values */
    711typedef enum {
    8     PM_MASK_TRAP    = 0x0001,   ///< The pixel is a charge trap.
    9     PM_MASK_BADCOL  = 0x0002,   ///< The pixel is a bad column.
    10     PM_MASK_SAT     = 0x0004,   ///< The pixel is saturated.
    11     PM_MASK_BAD     = 0x0008,   ///< The pixel is low
    12     PM_MASK_FLAT    = 0x0010    ///< The pixel is non-positive in the flat-field.
     12    PM_MASK_CLEAR   = 0x00,   ///< The pixel is not masked
     13    PM_MASK_TRAP    = 0x01,   ///< The pixel is a charge trap.
     14    PM_MASK_BADCOL  = 0x02,   ///< The pixel is a bad column.
     15    PM_MASK_SAT     = 0x04,   ///< The pixel is saturated.
     16    PM_MASK_BAD     = 0x08,   ///< The pixel is low
     17    PM_MASK_FLAT    = 0x10,   ///< The pixel is non-positive in the flat-field.
     18    PM_MASK_MARK    = 0x20,   ///< The pixel is marked as temporarily ignored
     19    PM_MASK_EXT1    = 0x40,   ///< This mask value is not used
     20    PM_MASK_EXT2    = 0x80,   ///< This mask value is not used
    1321} pmMaskValue;
    1422
  • trunk/psModules/src/camera/pmFPAfile.c

    r7279 r7283  
    55#include "pmHDU.h"
    66#include "pmFPA.h"
    7 #include "pmMaskBadPixels.h"
     7#include "pmFPAMaskWeight.h"
    88#include "pmFPAConstruct.h"
    99#include "pmFPAview.h"
  • trunk/psModules/src/detrend/Makefile.am

    r7275 r7283  
    77        pmFlatNormalize.c \
    88        pmFringeStats.c \
     9        pmMaskBadPixels.c \
    910        pmNonLinear.c \
    1011        pmSubtractBias.c
    1112#       pmSubtractSky.c
    12 #       pmMaskBadPixels.c
    1313
    1414psmoduleincludedir = $(includedir)
     
    1818        pmFlatNormalize.h \
    1919        pmFringeStats.h \
     20        pmMaskBadPixelsErrors.h \
     21        pmMaskBadPixels.h \
    2022        pmNonLinear.h \
    2123        pmSubtractBias.h
    2224#       pmSubtractSky.c
    23 #       pmMaskBadPixelsErrors.h
    24 #       pmMaskBadPixels.h
    2525
    2626EXTRA_DIST = \
  • trunk/psModules/src/detrend/pmFlatField.c

    r7278 r7283  
    1818 *  @author Ross Harman, MHPCC
    1919 *
    20  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    21  *  @date $Date: 2006-06-02 00:55:23 $
     20 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     21 *  @date $Date: 2006-06-02 02:16:05 $
    2222 *
    2323 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434#include "pslib.h"
    3535#include "pmFlatField.h"
    36 #include "pmMaskBadPixels.h"
     36#include "pmFPAMaskWeight.h"
    3737#include "pmFlatFieldErrors.h"
    3838
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r6910 r7283  
    1 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    2 // XXX WARNING: I have completely replaced this file with an OLD VERSION (that works) instead of the
    3 // one that was being worked on.
    4 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    5 
    61/** @file  pmMaskBadPixels.c
    72 *
     
    2419 *  @author Ross Harman, MHPCC
    2520 *
    26  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    27  *  @date $Date: 2006-04-19 20:37:35 $
     21 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     22 *  @date $Date: 2006-06-02 02:16:05 $
    2823 *
    2924 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3429#endif
    3530
    36 #include<stdio.h>
    37 #include<math.h>
    38 #include<strings.h>
     31#include <stdio.h>
     32#include <math.h>
     33#include <strings.h>
    3934
     35#include "pmFPAMaskWeight.h"
    4036#include "pmMaskBadPixels.h"
    4137#include "pmMaskBadPixelsErrors.h"
     
    148144            /* Pixels which satisfy growVal and within the grow radius shall be masked */                    \
    149145            if(mask->data.PS_TYPE_MASK_DATA[j][i] & growVal) {                                               \
    150                 rowMin = PS_MAX(j-grow, 0);                                                                     \
    151                 rowMax = PS_MIN(j+grow+1, inImage->numRows);                                                    \
    152                 colMin = PS_MAX(i-grow, 0);                                                                     \
    153                 colMax = PS_MIN(i+grow+1, inImage->numCols);                                                    \
     146                rowMin = PS_MAX(j-grow, 0);                                                                  \
     147                rowMax = PS_MIN(j+grow+1, inImage->numRows);                                                 \
     148                colMin = PS_MAX(i-grow, 0);                                                                  \
     149                colMax = PS_MIN(i+grow+1, inImage->numCols);                                                 \
    154150                for(jj=rowMin; jj<rowMax; jj++) {                                                            \
    155151                    for(ii=colMin; ii<colMax; ii++) {                                                        \
  • trunk/psModules/src/detrend/pmMaskBadPixels.h

    r7060 r7283  
    1 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    2 // XXX WARNING: I have completely replaced this file with an OLD VERSION (that works) instead of the
    3 // one that was being worked on.
    4 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    5 
    61/** @file  pmMaskBadPixels.h
    72 *
     
    2419 *  @author Ross Harman, MHPCC
    2520 *
    26  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    27  *  @date $Date: 2006-05-04 03:57:32 $
     21 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     22 *  @date $Date: 2006-06-02 02:16:05 $
    2823 *
    2924 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    3025 */
     26#ifndef PM_MASK_BAD_PIXELS_H
     27#define PM_MASK_BAD_PIXELS_H
    3128
    3229#include "pslib.h"
    3330#include "pmFPA.h"
    34 
    35 // these defines are necessary to yield 8-bit results (use instead of ~)
    36 # define NOT_U8(A)(UCHAR_MAX-(A))
    37 # define NOT_U16(A)(USHORT_MAX-(A))
    38 
    39 /** Mask values */
    40 typedef enum {
    41     PM_MASK_CLEAR   = 0x00,   ///< The pixel is not masked
    42     PM_MASK_TRAP    = 0x01,   ///< The pixel is a charge trap.
    43     PM_MASK_BADCOL  = 0x02,   ///< The pixel is a bad column.
    44     PM_MASK_SAT     = 0x04,   ///< The pixel is saturated.
    45     PM_MASK_BAD     = 0x08,   ///< The pixel is low
    46     PM_MASK_FLAT    = 0x10,   ///< The pixel is non-positive in the flat-field.
    47     PM_MASK_MARK    = 0x20,   ///< The pixel is marked as temporarily ignored
    48     PM_MASK_EXT1    = 0x40,   ///< This mask value is not used
    49     PM_MASK_EXT2    = 0x80,   ///< This mask value is not used
    50 } pmMaskValue;
    51 
    52 bool pmReadoutSetMask(pmReadout *readout // Readout for which to set mask
    53                      );
    54 bool pmReadoutSetWeight(pmReadout *readout // Readout for which to set weight
    55                        );
    56 bool pmCellSetMaskWeight(pmCell *cell // Cell for which to set weights
    57                         );
    5831
    5932/** Execute bad pixels module.
     
    7447);
    7548
     49
     50#endif
  • trunk/psModules/src/imcombine/pmReadoutCombine.c

    r7278 r7283  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-06-02 00:55:23 $
     7 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-06-02 02:16:05 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717
    1818#include "pmFPA.h"
    19 #include "pmMaskBadPixels.h"
     19#include "pmFPAMaskWeight.h"
    2020
    2121#include "pmReadoutCombine.h"
  • trunk/psModules/src/objects/pmPSFtry.c

    r6960 r7283  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-04-23 01:07:51 $
     7 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-06-02 02:16:05 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515#include "pmHDU.h"
    1616#include "pmFPA.h"
    17 #include "pmMaskBadPixels.h"
     17#include "pmFPAMaskWeight.h"
    1818#include "pmPeaks.h"
    1919#include "pmMoments.h"
  • trunk/psModules/src/objects/pmSource.c

    r6944 r7283  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-04-21 21:29:01 $
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-06-02 02:16:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "pmHDU.h"
    2020#include "pmFPA.h"
    21 #include "pmMaskBadPixels.h"
     21#include "pmFPAMaskWeight.h"
    2222#include "pmPeaks.h"
    2323#include "pmMoments.h"
     
    133133
    134134/******************************************************************************
    135     pmSourcePSFClump(source, metadata): Find the likely PSF clump in the 
    136     sigma-x, sigma-y plane. return 0,0 clump in case of error. 
     135    pmSourcePSFClump(source, metadata): Find the likely PSF clump in the
     136    sigma-x, sigma-y plane. return 0,0 clump in case of error.
    137137*****************************************************************************/
    138138
     
    310310    pmSourceRoughClass(source, metadata): make a guess at the source
    311311    classification.
    312     
     312 
    313313    XXX: push the clump info into the metadata?
    314     
     314 
    315315    XXX: How can this function ever return FALSE?
    316     
     316 
    317317    EAM: I moved S/N calculation to pmSourceMoments, using weight image
    318318*****************************************************************************/
  • trunk/psModules/src/objects/pmSourcePhotometry.c

    r6960 r7283  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-04-23 01:07:51 $
     5 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-06-02 02:16:05 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1616#include "pmHDU.h"
    1717#include "pmFPA.h"
    18 #include "pmMaskBadPixels.h"
     18#include "pmFPAMaskWeight.h"
    1919#include "pmPeaks.h"
    2020#include "pmMoments.h"
     
    5252        - the source is a STAR (PSF)
    5353        - the option is selected (how??)
    54       
    55     - extMag : all sources with non-NULL modelEXT 
     54 
     55    - extMag : all sources with non-NULL modelEXT
    5656**/
    5757
  • trunk/psModules/src/objects/pmSourceSky.c

    r6910 r7283  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-04-19 20:37:35 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-06-02 02:16:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "pmHDU.h"
    2020#include "pmFPA.h"
    21 #include "pmMaskBadPixels.h"
     21#include "pmFPAMaskWeight.h"
    2222#include "pmPeaks.h"
    2323#include "pmMoments.h"
Note: See TracChangeset for help on using the changeset viewer.