IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 7:34:39 PM (16 years ago)
Author:
eugene
Message:

updates from eam_branches/20091201 (substantially changes to the kernel matching code; updates to pmDetection container, added pmPattern, etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionStamps.h

    r26035 r26893  
    2424    psArray *flux;                      ///< Fluxes for possible stamps (or NULL)
    2525    int footprint;                      ///< Half-size of stamps
     26    psKernel *window;                   ///< window function generated from ensemble of stamps
     27    float normFrac;                     ///< Fraction of flux in window for normalisation window
     28    int normWindow;                     ///< Size of window for measuring normalisation
    2629    float sysErr;                       ///< Systematic error
     30    float skyErr;                       ///< increase effective readnoise
    2731} pmSubtractionStampList;
    2832
    2933/// Allocate a list of stamps
    30 pmSubtractionStampList *pmSubtractionStampListAlloc(int numCols, // Number of columns in image
    31                                                     int numRows, // Number of rows in image
    32                                                     const psRegion *region, // Region for stamps, or NULL
    33                                                     int footprint, // Half-size of stamps
    34                                                     float spacing, // Rough average spacing between stamps
    35                                                     float sysErr  // Relative systematic error or NAN
     34pmSubtractionStampList *pmSubtractionStampListAlloc(
     35    int numCols, // Number of columns in image
     36    int numRows, // Number of rows in image
     37    const psRegion *region, // Region for stamps, or NULL
     38    int footprint, // Half-size of stamps
     39    float spacing, // Rough average spacing between stamps
     40    float normFrac, // Fraction of flux in window for normalisation window
     41    float sysErr,  // Relative systematic error or NAN
     42    float skyErr  // Relative systematic error or NAN
    3643    );
    3744
     
    7380    psArray *convolutions1;             ///< Convolutions of image 1 for each kernel component, or NULL
    7481    psArray *convolutions2;             ///< Convolutions of image 2 for each kernel component, or NULL
    75     psImage *matrix1, *matrix2;         ///< Least-squares matrices for each image, or NULL
    76     psImage *matrixX;                   ///< Cross-matrix (for mode DUAL), or NULL
    77     psVector *vector1, *vector2;        ///< Least-squares vectors for each image, or NULL
     82    psImage *matrix;                    ///< Least-squares matrix, or NULL
     83    psVector *vector;                   ///< Least-squares vector, or NULL
     84    double norm;                        ///< Normalisation difference
    7885    pmSubtractionStampStatus status;    ///< Status of stamp
    7986} pmSubtractionStamp;
     
    8390
    8491/// Find stamps on an image
    85 pmSubtractionStampList *pmSubtractionStampsFind(pmSubtractionStampList *stamps, ///< Output stamps, or NULL
    86                                                 const psImage *image1, ///< Image for which to find stamps
    87                                                 const psImage *image2, ///< Image for which to find stamps
    88                                                 const psImage *mask, ///< Mask, or NULL
    89                                                 const psRegion *region, ///< Region to search, or NULL
    90                                                 float thresh1, ///< Threshold for stamps in image 1
    91                                                 float thresh2, ///< Threshold for stamps in image 2
    92                                                 int size, ///< Kernel half-size
    93                                                 int footprint, ///< Half-size for stamps
    94                                                 float spacing, ///< Rough spacing for stamps
    95                                                 float sysErr,  ///< Relative systematic error in images
    96                                                 pmSubtractionMode mode ///< Mode for subtraction
     92pmSubtractionStampList *pmSubtractionStampsFind(
     93    pmSubtractionStampList *stamps, ///< Output stamps, or NULL
     94    const psImage *image1, ///< Image for which to find stamps
     95    const psImage *image2, ///< Image for which to find stamps
     96    const psImage *mask, ///< Mask, or NULL
     97    const psRegion *region, ///< Region to search, or NULL
     98    float thresh1, ///< Threshold for stamps in image 1
     99    float thresh2, ///< Threshold for stamps in image 2
     100    int size, ///< Kernel half-size
     101    int footprint, ///< Half-size for stamps
     102    float spacing, ///< Rough spacing for stamps
     103    float normFrac, // Fraction of flux in window for normalisation window
     104    float sysErr,  ///< Relative systematic error in images
     105    float skyErr,  ///< Relative systematic error in images
     106    pmSubtractionMode mode ///< Mode for subtraction
    97107    );
    98108
    99109/// Set stamps based on a list of x,y
    100 pmSubtractionStampList *pmSubtractionStampsSet(const psVector *x, ///< x coordinates for each stamp
    101                                                const psVector *y, ///< y coordinates for each stamp
    102                                                const psImage *image, ///< Image for flux of stamp
    103                                                const psImage *mask, ///< Mask, or NULL
    104                                                const psRegion *region, ///< Region to search, or NULL
    105                                                int size, ///< Kernel half-size
    106                                                int footprint, ///< Half-size for stamps
    107                                                float spacing, ///< Rough spacing for stamps
    108                                                float sysErr,  ///< Systematic error in images
    109                                                pmSubtractionMode mode ///< Mode for subtraction
     110pmSubtractionStampList *pmSubtractionStampsSet(
     111    const psVector *x, ///< x coordinates for each stamp
     112    const psVector *y, ///< y coordinates for each stamp
     113    const psImage *image, ///< Image for flux of stamp
     114    const psImage *mask, ///< Mask, or NULL
     115    const psRegion *region, ///< Region to search, or NULL
     116    int size, ///< Kernel half-size
     117    int footprint, ///< Half-size for stamps
     118    float spacing, ///< Rough spacing for stamps
     119    float normFrac, // Fraction of flux in window for normalisation window
     120    float sysErr,  ///< Systematic error in images
     121    float skyErr,  ///< Systematic error in images
     122    pmSubtractionMode mode ///< Mode for subtraction
    110123    );
    111124
     
    119132    int footprint,                      ///< Half-size for stamps
    120133    float spacing,                      ///< Rough spacing for stamps
     134    float normFrac, // Fraction of flux in window for normalisation window
    121135    float sysErr,                       ///< Systematic error in images
     136    float skyErr,                       ///< Systematic error in images
    122137    pmSubtractionMode mode              ///< Mode for subtraction
    123138    );
     
    132147    int footprint,                      ///< Half-size for stamps
    133148    float spacing,                      ///< Rough spacing for stamps
     149    float normFrac, // Fraction of flux in window for normalisation window
    134150    float sysErr,                       ///< Systematic error in images
     151    float skyErr,                       ///< Systematic error in images
    135152    pmSubtractionMode mode              ///< Mode for subtraction
     153    );
     154
     155/// Calculate the window and normalisation window from the stamps
     156bool pmSubtractionStampsGetWindow(
     157    pmSubtractionStampList *stamps,     ///< List of stamps
     158    int kernelSize                      ///< Half-size of kernel
    136159    );
    137160
     
    141164                                psImage *image2, ///< Input image (or NULL)
    142165                                psImage *variance, ///< Variance map
    143                                 int kernelSize ///< Kernel half-size
     166                                int kernelSize, ///< Kernel half-size
     167                                psRegion bounds ///< Bounds of validity
    144168    );
    145169
     
    168192    );
    169193
     194
     195bool pmSubtractionStampsResetStatus (pmSubtractionStampList *stamps);
     196
    170197#endif
Note: See TracChangeset for help on using the changeset viewer.