IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 2, 2007, 4:28:24 PM (19 years ago)
Author:
Paul Price
Message:

Adding function pmSubtractionOrder (choice of name is probably not the best) to determine which of the two images under consideration should be convolved to match the other. Originally was doing this by solving for a RING kernel of width 1, going both ways, and comparing the deviations for each. However, when doing stacks this didn't work (convolving the wider fake Gaussian image gave smaller deviations than convolving the narrower input image), so have settled on measuring the second moments for each stamp, and using the ratio of moments between the two images to determine which is wider; this seems to work for both subtracting and stacking images. In the process, plugged a few memory leaks, and added code to support convolving either way (or both ways; this will be useful when it comes time to code the dual convolution algorithm).

File:
1 edited

Legend:

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

    r15305 r15443  
    44#include <pslib.h>
    55
    6 #include "pmHDU.h"
    7 #include "pmFPA.h"
    8 #include "pmSubtractionKernels.h"
     6#include <pmHDU.h>
     7#include <pmFPA.h>
     8#include <pmSubtractionKernels.h>
     9#include <pmSubtractionStamps.h>
    910
    10 
     11/// Match two images
    1112bool pmSubtractionMatch(pmReadout *convolved, ///< Output convolved data
    12                         const pmReadout *reference, ///< Reference data
    13                         const pmReadout *input, ///< Input data
     13                        const pmReadout *ro1, ///< Image 1
     14                        const pmReadout *ro2, ///< Image 2
    1415                        // Stamp parameters
    1516                        int footprint,  ///< Stamp half-size
     
    1920                        const psArray *sources, ///< Sources for stamps
    2021                        const char *stampsName, ///< Filename for stamps
    21                         float targetWidth, ///< Width of PSF for simulated target
    2222                        // Kernel parameters
    2323                        pmSubtractionKernelsType type, ///< Kernel type
     
    3838                        psMaskType maskBad, ///< Value to mask
    3939                        psMaskType maskBlank, ///< Mask for blank region
    40                         float badFrac   ///< Maximum fraction of bad input pixels to accept
     40                        float badFrac,   ///< Maximum fraction of bad input pixels to accept
     41                        pmSubtractionMode mode ///< Mode of subtraction
    4142    );
    4243
     44/// Determine which image to convolve
     45pmSubtractionMode pmSubtractionOrder(pmSubtractionStampList *stamps, ///< Stamps that have been extracted
     46                                     int footprint ///< Stamp half-size
     47    );
     48
     49
    4350#endif
Note: See TracChangeset for help on using the changeset viewer.